1#ifndef SQL_ITERATORS_UPDATE_ROWS_ITERATOR_H_
2#define SQL_ITERATORS_UPDATE_ROWS_ITERATOR_H_
49 TABLE *outermost_table,
TABLE *immediate_table,
62 m_source->EndPSIBatchModeIfStarted();
120 bool *transactional_tables);
This class encapsulates a data change operation.
Definition: sql_data_change.h:74
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
Definition: sql_list.h:434
A context for reading through a single table using a chosen access method: index read,...
Definition: row_iterator.h:82
THD * thd() const
Definition: row_iterator.h:228
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
An iterator that performs updates to rows returned by its child iterator.
Definition: update_rows_iterator.h:46
ha_rows updated_rows() const
Definition: update_rows_iterator.h:69
COPY_INFO ** m_update_operations
The update operations of each table in m_update_tables (indexed in the same order as m_update_tables)...
Definition: update_rows_iterator.h:92
Copy_field * m_copy_fields
Objects that copy the updated values from a temporary table to the update target table,...
Definition: update_rows_iterator.h:86
TABLE * m_immediate_table
The table to perform immediate update on, or nullptr if immediate update is not possible.
Definition: update_rows_iterator.h:79
mem_root_deque< Item * > ** m_fields_for_table
The fields list decomposed into separate lists per table.
Definition: update_rows_iterator.h:94
table_map m_hash_join_tables
All the tables that are part of a hash join.
Definition: update_rows_iterator.h:109
int Read() override
Read a single row.
Definition: sql_update.cc:2862
bool DoDelayedUpdates(bool *trans_safe, bool *transactional_tables)
Perform all the delayed updates.
Definition: sql_update.cc:2582
mem_root_deque< Item * > ** m_values_for_table
The values list decomposed into separate lists per table.
Definition: update_rows_iterator.h:96
ha_rows m_found_rows
The number of rows matching the WHERE and join conditions.
Definition: update_rows_iterator.h:98
bool DoImmediateUpdatesAndBufferRowIds(bool *trans_safe, bool *transactional_tables)
Perform all the immediate updates for the current row returned by the join, and buffer row IDs for th...
Definition: sql_update.cc:2416
void StartPSIBatchMode() override
Start performance schema batch mode, if supported (otherwise ignored).
Definition: update_rows_iterator.h:60
~UpdateRowsIterator() override
Definition: sql_update.cc:2856
TABLE * m_outermost_table
The outermost table of the join.
Definition: update_rows_iterator.h:76
ha_rows m_updated_rows
The number of rows actually updated.
Definition: update_rows_iterator.h:100
bool Init() override
Initialize or reinitialize the iterator.
Definition: sql_update.cc:2841
List< TABLE > m_unupdated_check_opt_tables
Tables referenced in the CHECK OPTION condition of the updated view excluding the updated table.
Definition: update_rows_iterator.h:89
Table_ref * m_update_tables
Pointer to list of updated tables, linked via 'next_local'.
Definition: update_rows_iterator.h:81
TABLE ** m_tmp_tables
Temporary tables used to store cached updates.
Definition: update_rows_iterator.h:83
ha_rows found_rows() const
Definition: update_rows_iterator.h:68
UpdateRowsIterator(THD *thd, unique_ptr_destroy_only< RowIterator > source, TABLE *outermost_table, TABLE *immediate_table, Table_ref *update_tables, TABLE **tmp_tables, Copy_field *copy_fields, List< TABLE > unupdated_check_opt_tables, COPY_INFO **update_operations, mem_root_deque< Item * > **fields_for_table, mem_root_deque< Item * > **values_for_table, table_map tables_with_rowid_in_buffer)
Definition: sql_update.cc:3040
unique_ptr_destroy_only< RowIterator > m_source
The iterator producing the rows to update.
Definition: update_rows_iterator.h:73
void SetNullRowFlag(bool is_null_row) override
Mark the current row buffer as containing a NULL row or not, so that if you read from it and the flag...
Definition: update_rows_iterator.h:64
void EndPSIBatchModeIfStarted() override
Ends performance schema batch mode, if started.
Definition: update_rows_iterator.h:61
void UnlockRow() override
Definition: update_rows_iterator.h:67
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:110
bool copy_fields(Temp_table_param *param, const THD *thd, bool reverse_copy)
Make a copy of all simple SELECT'ed fields.
Definition: sql_executor.cc:4243
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:489
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
uint64_t table_map
Definition: my_table_map.h:30
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:42