#include <sql_update.h>
|
| Query_result_update (mem_root_deque< Item * > *field_list, mem_root_deque< Item * > *value_list) |
|
bool | need_explain_interceptor () const override |
|
bool | prepare (THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override |
| Perform preparation specific to the query expression or DML statement. More...
|
|
bool | optimize () |
| Set up data structures for multi-table UPDATE. More...
|
|
bool | start_execution (THD *thd) override |
| Prepare for execution of the query expression or DML statement. More...
|
|
bool | send_data (THD *thd, const mem_root_deque< Item * > &items) override |
|
bool | do_updates (THD *thd) |
|
bool | send_eof (THD *thd) override |
|
void | cleanup () override |
| Cleanup after this execution. More...
|
|
unique_ptr_destroy_only< RowIterator > | create_iterator (THD *thd, MEM_ROOT *mem_root, unique_ptr_destroy_only< RowIterator > source) |
|
| Query_result_interceptor () |
|
uint | field_count (const mem_root_deque< Item * > &) const override |
|
bool | send_result_set_metadata (THD *, const mem_root_deque< Item * > &, uint) override |
|
bool | is_interceptor () const final |
| Checks if this Query_result intercepts and transforms the result set. More...
|
|
| Query_result () |
|
virtual | ~Query_result ()=default |
|
virtual bool | needs_file_privilege () const |
|
virtual bool | change_query_result (THD *, Query_result *) |
| Change wrapped Query_result. More...
|
|
virtual bool | create_table_for_query_block (THD *) |
| Create table, only needed to support CREATE TABLE ... SELECT. More...
|
|
virtual bool | check_supports_cursor () const |
| Check if this query result set supports cursors. More...
|
|
virtual void | abort_result_set (THD *) |
|
virtual bool | reset () |
| Cleanup after one execution of the unit, to be ready for a next execution inside the same statement. More...
|
|
virtual void | set_limit (ha_rows) |
| Only overridden (and non-empty) for Query_result_union, q.v. More...
|
|
virtual Server_side_cursor * | cursor () const |
|
◆ Query_result_update()
◆ cleanup()
void Query_result_update::cleanup |
( |
void |
| ) |
|
|
overridevirtual |
Cleanup after this execution.
Completes the execution and resets object before next execution of a prepared statement/stored procedure.
Reimplemented from Query_result.
◆ create_iterator()
◆ do_updates()
bool Query_result_update::do_updates |
( |
THD * |
thd | ) |
|
◆ need_explain_interceptor()
bool Query_result_update::need_explain_interceptor |
( |
| ) |
const |
|
inlineoverridevirtual |
- Returns
- true if an interceptor object is needed for EXPLAIN
Reimplemented from Query_result.
◆ optimize()
bool Query_result_update::optimize |
( |
| ) |
|
Set up data structures for multi-table UPDATE.
IMPLEMENTATION
- Update first table in join on the fly, if possible
- Create temporary tables to store changed values for all other tables that are updated (and main_table if the above doesn't hold).
◆ prepare()
Perform preparation specific to the query expression or DML statement.
- Returns
- false if success, true if error
Reimplemented from Query_result.
◆ send_data()
◆ send_eof()
bool Query_result_update::send_eof |
( |
THD * |
thd | ) |
|
|
overridevirtual |
◆ start_execution()
bool Query_result_update::start_execution |
( |
THD * |
| ) |
|
|
overridevirtual |
Prepare for execution of the query expression or DML statement.
Generally, this will have an implementation only for outer-most Query_block objects, such as data change statements (for preparation of the target table(s)) or dump statements (for preparation of target file).
- Returns
- false if success, true if error
Reimplemented from Query_result.
◆ copy_field
◆ fields
List of pointers to fields to update, in order from statement.
◆ fields_for_table
The fields list decomposed into separate lists per table.
◆ main_table
The first table in the join operation.
◆ table_to_update
In a multi-table update, this is equal to the first table in the join operation (main_table) if that table can be updated on the fly while scanning it.
It is nullptr
otherwise.
- See also
- safe_update_on_fly
◆ tmp_table_param
Array of parameter structs for creation of temporary tables.
◆ tmp_tables
Array of references to temporary tables used to store cached updates.
◆ unupdated_check_opt_tables
List<TABLE> Query_result_update::unupdated_check_opt_tables |
|
private |
List of tables referenced in the CHECK OPTION condition of the updated view excluding the updated table.
◆ update_operations
Array of update operations, arranged per updated table.
For each updated table in the multiple table update statement, a COPY_INFO pointer is present at the table's position in this array.
The array is allocated and populated during Query_result_update::prepare(). The position that each table is assigned is also given here and is stored in the member TABLE::pos_in_table_list::shared. However, this is a publicly available field, so nothing can be trusted about its integrity.
This member is NULL when the Query_result_update is created.
- See also
- Query_result_update::prepare
◆ update_table_count
uint Query_result_update::update_table_count {0} |
|
private |
Number of tables being updated.
◆ update_tables
Pointer to list of updated tables, linked via 'next_local'.
◆ values
List of pointers to values to update with, in order from statement.
◆ values_for_table
The values list decomposed into separate lists per table.
The documentation for this class was generated from the following files: