MySQL 9.1.0
Source Code Documentation
anonymous_namespace{opt_explain.cc}::Explain_table_base Class Reference

Common base class for Explain_join and Explain_table. More...

Inheritance diagram for anonymous_namespace{opt_explain.cc}::Explain_table_base:
[legend]

Protected Member Functions

 Explain_table_base (enum_parsing_context context_type_arg, THD *const explain_thd_arg, const THD *query_thd_arg, Query_block *query_block_arg=nullptr, TABLE *const table_arg=nullptr)
 
bool explain_partitions () override
 
bool explain_possible_keys () override
 
bool explain_key_parts (int key, uint key_parts)
 
bool explain_key_and_len_quick (AccessPath *range_scan)
 
bool explain_key_and_len_index (int key)
 
bool explain_key_and_len_index (int key, uint key_length, uint key_parts)
 
bool explain_extra_common (int range_scan_type, uint keyno)
 
bool explain_tmptable_and_filesort (bool need_tmp_table_arg, bool need_sort_arg)
 
- Protected Member Functions inherited from anonymous_namespace{opt_explain.cc}::Explain
 Explain (enum_parsing_context context_type_arg, THD *explain_thd_arg, const THD *query_thd_arg, Query_block *query_block_arg)
 
virtual bool shallow_explain ()
 Explain everything but subqueries. More...
 
bool explain_subqueries ()
 Explain the rest of things after the shallow_explain() call. More...
 
bool mark_subqueries (Item *item, qep_row *destination)
 Qualify subqueries with WHERE/HAVING/ORDER BY/GROUP BY clause type marker. More...
 
bool prepare_columns ()
 Pre-calculate table property values for further EXPLAIN output. More...
 
bool push_extra (Extra_tag tag)
 Push a part of the "extra" column into formatter. More...
 
bool push_extra (Extra_tag tag, const String &arg)
 Push a part of the "extra" column into formatter. More...
 
bool push_extra (Extra_tag tag, const char *arg)
 Push a part of the "extra" column into formatter. More...
 
virtual bool explain_id ()
 
virtual bool explain_select_type ()
 
virtual bool explain_table_name ()
 
virtual bool explain_join_type ()
 
virtual bool explain_key_and_len ()
 fill col_key and and col_key_len fields together More...
 
virtual bool explain_ref ()
 
virtual bool explain_rows_and_filtered ()
 fill col_rows and col_filtered fields together More...
 
virtual bool explain_extra ()
 
virtual bool explain_modify_flags ()
 
virtual bool can_walk_clauses ()
 Returns true if the WHERE, ORDER BY, GROUP BY, etc clauses can safely be traversed: it means that we can iterate through them (no element is added/removed/replaced); the internal details of an element can change though (in particular if that element is an Item_subselect). More...
 
virtual enum_parsing_context get_subquery_context (Query_expression *unit) const
 

Protected Attributes

QEP_TABtab {nullptr}
 The QEP_TAB which we are currently explaining. More...
 
const TABLEtable {nullptr}
 
join_type type {JT_UNKNOWN}
 
AccessPathrange_scan_path {nullptr}
 
Itemcondition {nullptr}
 
bool dynamic_range {false}
 
Table_reftable_ref {nullptr}
 
bool skip_records_in_range {false}
 
bool reversed_access {false}
 
Key_map usable_keys
 
- Protected Attributes inherited from anonymous_namespace{opt_explain.cc}::Explain
THD *const explain_thd
 cached THD which runs the EXPLAIN command More...
 
const THDquery_thd
 THD which runs the query to be explained. More...
 
const CHARSET_INFO *const cs
 cached pointer to system_charset_info More...
 
Query_block *const query_block
 Cached Query_block of the explained query. More...
 
Explain_format *const fmt
 shortcut for thd->lex->explain_format More...
 
enum_parsing_context context_type
 associated value for struct. explain More...
 
bool order_list
 if query block has ORDER BY More...
 
const bool explain_other
 if we explain other thread than us More...
 

Additional Inherited Members

- Public Member Functions inherited from anonymous_namespace{opt_explain.cc}::Explain
virtual ~Explain ()=default
 
bool send ()
 Explain class main function. More...
 
bool can_print_clauses () const
 Tells if it is allowed to print the WHERE / GROUP BY / etc clauses. More...
 

Detailed Description

Common base class for Explain_join and Explain_table.

Constructor & Destructor Documentation

◆ Explain_table_base()

anonymous_namespace{opt_explain.cc}::Explain_table_base::Explain_table_base ( enum_parsing_context  context_type_arg,
THD *const  explain_thd_arg,
const THD query_thd_arg,
Query_block query_block_arg = nullptr,
TABLE *const  table_arg = nullptr 
)
inlineprotected

Member Function Documentation

◆ explain_extra_common()

bool Explain_table_base::explain_extra_common ( int  range_scan_type,
uint  keyno 
)
protected

◆ explain_key_and_len_index() [1/2]

bool Explain_table_base::explain_key_and_len_index ( int  key)
protected

◆ explain_key_and_len_index() [2/2]

bool Explain_table_base::explain_key_and_len_index ( int  key,
uint  key_length,
uint  key_parts 
)
protected

◆ explain_key_and_len_quick()

bool Explain_table_base::explain_key_and_len_quick ( AccessPath range_scan)
protected

◆ explain_key_parts()

bool Explain_table_base::explain_key_parts ( int  key,
uint  key_parts 
)
protected

◆ explain_partitions()

bool Explain_table_base::explain_partitions ( )
overrideprotectedvirtual

◆ explain_possible_keys()

bool Explain_table_base::explain_possible_keys ( )
overrideprotectedvirtual

◆ explain_tmptable_and_filesort()

bool Explain_table_base::explain_tmptable_and_filesort ( bool  need_tmp_table_arg,
bool  need_sort_arg 
)
protected

Member Data Documentation

◆ condition

Item* anonymous_namespace{opt_explain.cc}::Explain_table_base::condition {nullptr}
protected

◆ dynamic_range

bool anonymous_namespace{opt_explain.cc}::Explain_table_base::dynamic_range {false}
protected

◆ range_scan_path

AccessPath* anonymous_namespace{opt_explain.cc}::Explain_table_base::range_scan_path {nullptr}
protected

◆ reversed_access

bool anonymous_namespace{opt_explain.cc}::Explain_table_base::reversed_access {false}
protected

◆ skip_records_in_range

bool anonymous_namespace{opt_explain.cc}::Explain_table_base::skip_records_in_range {false}
protected

◆ tab

QEP_TAB* anonymous_namespace{opt_explain.cc}::Explain_table_base::tab {nullptr}
protected

The QEP_TAB which we are currently explaining.

It is NULL for the inserted table in INSERT/REPLACE SELECT, and single-table UPDATE/DELETE.

Note
that you should never read quick() or condition() even for SELECT, they may change under your feet without holding the mutex; read quick and condition in this class instead.

◆ table

const TABLE* anonymous_namespace{opt_explain.cc}::Explain_table_base::table {nullptr}
protected

◆ table_ref

Table_ref* anonymous_namespace{opt_explain.cc}::Explain_table_base::table_ref {nullptr}
protected

◆ type

join_type anonymous_namespace{opt_explain.cc}::Explain_table_base::type {JT_UNKNOWN}
protected

◆ usable_keys

Key_map anonymous_namespace{opt_explain.cc}::Explain_table_base::usable_keys
protected

The documentation for this class was generated from the following file: