24#ifndef OPT_EXPLAIN_INCLUDED
25#define OPT_EXPLAIN_INCLUDED
104 bool need_tmp_table_arg,
bool need_sort_arg,
105 bool used_key_is_modified_arg,
ha_rows rows);
108 const char *message_arg,
bool zero_result_arg,
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
Table modification plan for JOIN-less statements (update/delete)
Definition: opt_explain.h:82
TABLE * table
Table to modify.
Definition: opt_explain.h:87
ha_rows limit
Limit.
Definition: opt_explain.h:93
THD *const thd
Owning thread.
Definition: opt_explain.h:84
const enum_mod_type mod_type
Modification type - MT_INSERT/MT_UPDATE/etc.
Definition: opt_explain.h:86
uint key
Key to use.
Definition: opt_explain.h:92
bool need_sort
Whether to use filesort.
Definition: opt_explain.h:95
Modification_plan(THD *thd_arg, enum_mod_type mt, TABLE *table_arg, enum join_type type_arg, AccessPath *quick_arg, Item *condition_arg, uint key_arg, ha_rows limit_arg, bool need_tmp_table_arg, bool need_sort_arg, bool used_key_is_modified_arg, ha_rows rows)
Modification_plan's constructor, to represent that we will use an access method on the table.
Definition: opt_explain.cc:2537
Item * condition
Definition: opt_explain.h:91
bool zero_result
true <=> plan will not be executed
Definition: opt_explain.h:98
void register_in_thd()
Definition: opt_explain.cc:2503
enum join_type type
Definition: opt_explain.h:89
bool used_key_is_modified
Whether the key used to scan is modified.
Definition: opt_explain.h:96
ha_rows examined_rows
Definition: opt_explain.h:99
~Modification_plan()
Definition: opt_explain.cc:2596
bool need_tmp_table
Whether tmp table needs to be used.
Definition: opt_explain.h:94
const char * message
Arbitrary message.
Definition: opt_explain.h:97
AccessPath * range_scan
Definition: opt_explain.h:90
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1156
This class represents a query expression (one query block or several query blocks combined with UNION...
Definition: sql_lex.h:623
EXPLAIN functionality for Query_result_insert, Query_result_update and Query_result_delete.
Definition: opt_explain.h:136
bool prepare(THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override
Perform preparation specific to the query expression or DML statement.
Definition: opt_explain.h:152
bool start_execution(THD *thd) override
Prepare for execution of the query expression or DML statement.
Definition: opt_explain.h:158
Query_result_explain(Query_expression *unit_arg, Query_result *interceptor_arg)
Definition: opt_explain.h:145
void cleanup() override
Cleanup after this execution.
Definition: opt_explain.h:163
Query_result * interceptor
Pointer to underlying Query_result_insert, Query_result_update or Query_result_delete object.
Definition: opt_explain.h:142
Definition: query_result.h:185
void cleanup() override
Cleanup after this execution.
Definition: query_result.h:201
Definition: query_result.h:54
virtual bool prepare(THD *, const mem_root_deque< Item * > &, Query_expression *u)
Perform preparation specific to the query expression or DML statement.
Definition: query_result.h:95
virtual void cleanup()
Cleanup after this execution.
Definition: query_result.h:148
Query_expression * unit
Definition: query_result.h:56
virtual bool start_execution(THD *)
Prepare for execution of the query expression or DML statement.
Definition: query_result.h:110
Query term tree structure.
Definition: query_term.h:209
Definition: opt_explain.h:178
my_thread_id m_thread_id
connection_id in EXPLAIN FOR CONNECTION <connection_id>
Definition: opt_explain.h:191
bool execute(THD *thd) override
Entry point for EXPLAIN CONNECTION: locates the connection by its ID, takes proper locks,...
Definition: opt_explain.cc:2396
Sql_cmd_explain_other_thread(my_thread_id thread_id)
Definition: opt_explain.h:180
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: opt_explain.h:183
Representation of an SQL command.
Definition: sql_cmd.h:65
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:110
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_EXPLAIN_OTHER
Definition: my_sqlcommand.h:182
static my_thread_id thread_id
Definition: my_thr_init.cc:63
uint32 my_thread_id
Definition: my_thread_local.h:34
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1052
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2879
const char * join_type_str[]
Definition: opt_explain.cc:115
bool explain_query_specification(THD *explain_thd, const THD *query_thd, Query_term *query_term, enum_parsing_context ctx)
Explain query_block's join.
Definition: opt_explain.cc:2002
bool explain_query(THD *explain_thd, const THD *query_thd, Query_expression *unit)
EXPLAIN handling for SELECT, INSERT/REPLACE SELECT, and multi-table UPDATE/DELETE queries.
Definition: opt_explain.cc:2219
bool explain_single_table_modification(THD *explain_thd, const THD *query_thd, const Modification_plan *plan, Query_block *select)
EXPLAIN handling for single-table INSERT VALUES, UPDATE, and DELETE queries.
Definition: opt_explain.cc:1902
void print_query_for_explain(const THD *query_thd, Query_expression *unit, String *str)
This code which prints the extended description is not robust against malformed queries,...
Definition: opt_explain.cc:2158
enum_parsing_context
Names for different query parse tree parts.
Definition: parse_tree_node_base.h:58
Representation of an SQL command.
Common types of the Optimizer, used by optimization and execution.
join_type
Definition: sql_opt_exec_shared.h:186
@ JT_UNKNOWN
Definition: sql_opt_exec_shared.h:188
Access paths are a query planning structure that correspond 1:1 to iterators, in that an access path ...
Definition: access_path.h:193
unsigned int uint
Definition: uca9-dump.cc:75