MySQL 8.4.3
Source Code Documentation
|
EXPLAIN functionality for Query_result_insert, Query_result_update and Query_result_delete. More...
#include <opt_explain.h>
Public Member Functions | |
Query_result_explain (Query_expression *unit_arg, Query_result *interceptor_arg) | |
bool | use_protocol_adapter () const override |
Public Member Functions inherited from Query_result_send | |
Query_result_send () | |
bool | send_result_set_metadata (THD *thd, const mem_root_deque< Item * > &list, uint flags) override |
bool | send_data (THD *thd, const mem_root_deque< Item * > &items) override |
bool | send_eof (THD *thd) override |
bool | check_supports_cursor () const override |
Check if this query result set supports cursors. More... | |
void | abort_result_set (THD *thd) override |
void | cleanup () override |
Cleanup after this execution. More... | |
bool | use_protocol_adapter () const override |
An alternative implementation may provide an optimized protocol adapter for this object. More... | |
Public Member Functions inherited from Query_result | |
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 | need_explain_interceptor () const |
virtual bool | create_table_for_query_block (THD *) |
Create table, only needed to support CREATE TABLE ... SELECT. More... | |
virtual uint | field_count (const mem_root_deque< Item * > &fields) const |
virtual bool | reset () |
Cleanup after one execution of the unit, to be ready for a next execution inside the same statement. More... | |
virtual bool | use_protocol_wrapper () const |
virtual void | set_limit (ha_rows) |
Only overridden (and non-empty) for Query_result_union, q.v. More... | |
virtual Server_side_cursor * | cursor () const |
Protected Member Functions | |
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 | start_execution (THD *thd) override |
Prepare for execution of the query expression or DML statement. More... | |
void | cleanup () override |
Cleanup after this execution. More... | |
Protected Attributes | |
Query_result * | interceptor |
Pointer to underlying Query_result_insert, Query_result_update or Query_result_delete object. More... | |
Protected Attributes inherited from Query_result | |
Query_expression * | unit |
Additional Inherited Members | |
Public Attributes inherited from Query_result | |
ha_rows | estimated_rowcount |
Number of records estimated in this result. More... | |
double | estimated_cost |
Cost to execute the subquery which produces this result. More... | |
EXPLAIN functionality for Query_result_insert, Query_result_update and Query_result_delete.
This class objects substitute Query_result_insert, Query_result_update and Query_result_delete data interceptor objects to implement EXPLAIN for INSERT, REPLACE and multi-table UPDATE and DELETE queries. Query_result_explain class object initializes tables like Query_result_insert, Query_result_update or Query_result_delete data interceptor do, but it suppresses table data modification by the underlying interceptor object. Thus, we can use Query_result_explain object in the context of EXPLAIN INSERT/ REPLACE/UPDATE/DELETE query like we use Query_result_send in the context of EXPLAIN SELECT command: 1) in presence of lex->describe flag, pass Query_result_explain object to execution function, 2) it calls prepare(), optimize() and start_execution() functions to mark modified tables etc.
|
inline |
|
inlineoverrideprotectedvirtual |
Cleanup after this execution.
Completes the execution and resets object before next execution of a prepared statement/stored procedure.
Reimplemented from Query_result.
|
inlineoverrideprotectedvirtual |
Perform preparation specific to the query expression or DML statement.
Reimplemented from Query_result.
|
inlineoverrideprotectedvirtual |
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).
Reimplemented from Query_result.
|
inlineoverridevirtual |
Reimplemented from Query_result.
|
protected |
Pointer to underlying Query_result_insert, Query_result_update or Query_result_delete object.