MySQL 5.6.14 Source Code Document
|
Classes | |
class | Lazy_condition |
Public Member Functions | |
bool | send () |
Protected Member Functions | |
Explain (Explain_context_enum context_type_arg, THD *thd_arg, JOIN *join_arg=NULL) | |
virtual bool | shallow_explain () |
bool | explain_subqueries (select_result *result) |
bool | mark_subqueries (Item *item, qep_row *destination, Explain_context_enum type) |
bool | mark_order_subqueries (const JOIN::ORDER_with_src &order) |
bool | prepare_columns () |
bool | describe (uint8 mask) const |
SELECT_LEX * | select_lex () const |
bool | prepare (select_result *result) |
bool | push_extra (Extra_tag tag) |
bool | push_extra (Extra_tag tag, const String &arg) |
bool | push_extra (Extra_tag tag, const char *arg) |
virtual bool | explain_id () |
virtual bool | explain_select_type () |
virtual bool | explain_table_name () |
virtual bool | explain_partitions () |
virtual bool | explain_join_type () |
virtual bool | explain_possible_keys () |
virtual bool | explain_key_and_len () |
virtual bool | explain_ref () |
virtual bool | explain_rows_and_filtered () |
virtual bool | explain_extra () |
virtual bool | explain_modify_flags () |
Protected Attributes | |
THD *const | thd |
cached THD pointer | |
const CHARSET_INFO *const | cs |
cached pointer to system_charset_info | |
JOIN *const | join |
top-level JOIN (if any) provided by caller | |
select_result *const | external_result |
stream (if any) provided by caller | |
Explain_format *const | fmt |
shortcut for thd->lex->explain_format | |
Explain_context_enum | context_type |
associated value for struct. explain | |
JOIN::ORDER_with_src | order_list |
JOIN::ORDER_with_src | group_list |
A base for all Explain_* classes
Explain_* classes collect and output EXPLAIN data.
This class hierarchy is a successor of the old select_describe() function of 5.5.
Definition at line 51 of file opt_explain.cc.
|
inlineprotectedvirtual |
fill col_key and and col_key_len fields together
Reimplemented in Explain_join.
Definition at line 220 of file opt_explain.cc.
|
inlineprotectedvirtual |
fill col_rows and col_filtered fields together
Reimplemented in Explain_join, and Explain_no_table.
Definition at line 223 of file opt_explain.cc.
|
protected |
Explain the rest of things after the shallow_explain()
call
Traverses SQL clauses of this query specification to identify children subqueries, marks each of them with the clause they belong to. Then goes though all children subqueries and produces their EXPLAIN output, attached to the proper clause's context.
result | result stream |
false | Ok |
true | Error (OOM) |
Definition at line 539 of file opt_explain.cc.
|
protected |
Qualify subqueries with WHERE/HAVING/ORDER BY/GROUP BY clause type marker
item | Item tree to find subqueries |
destination | For WHERE clauses |
type | Clause type |
destination
parameter provides a pointer to QEP data for such a table to associate a future subquery EXPLAIN output with table QEP provided.false | OK |
true | Error |
Definition at line 464 of file opt_explain.cc.
|
inlineprotected |
Prepare the self-allocated result object
For queries with top-level JOIN the caller provides pre-allocated select_send object. Then that JOIN object prepares the select_send object calling result->prepare() in JOIN::prepare(), result->initalize_tables() in JOIN::optimize() and result->prepare2() in JOIN::exec(). However without the presence of the top-level JOIN we have to prepare/initialize select_send object manually.
Definition at line 145 of file opt_explain.cc.
|
protected |
Pre-calculate table property values for further EXPLAIN output
Definition at line 656 of file opt_explain.cc.
|
inlineprotected |
Push a part of the "extra" column into formatter
Traditional formatter outputs traditional_extra_tags[tag] as is. Hierarchical formatter outputs a property with the json_extra_tags[tag] name and a boolean value of true.
tag | type of the "extra" part |
false | Ok |
true | Error (OOM) |
Definition at line 165 of file opt_explain.cc.
|
inlineprotected |
Push a part of the "extra" column into formatter
tag | type of the "extra" part |
arg | for traditional formatter: rest of the part text, for hierarchical format: string value of the property |
false | Ok |
true | Error (OOM) |
Definition at line 181 of file opt_explain.cc.
|
inlineprotected |
Push a part of the "extra" column into formatter
tag | type of the "extra" part |
arg | for traditional formatter: rest of the part text, for hierarchical format: string value of the property |
NOTE: arg must be a long-living string constant.
false | Ok |
true | Error (OOM) |
Definition at line 201 of file opt_explain.cc.
bool Explain::send | ( | ) |
Explain class main function
This function: a) allocates a select_send object (if no one pre-allocated available), b) calculates and sends whole EXPLAIN data.
Definition at line 682 of file opt_explain.cc.
|
protectedvirtual |
Explain everything but subqueries
Reimplemented in Explain_join, and Explain_no_table.
Definition at line 443 of file opt_explain.cc.