MySQL 8.0.39
Source Code Documentation
anonymous_namespace{opt_explain.cc}::Explain_no_table Class Reference

Explain_no_table class outputs a trivial EXPLAIN row with "extra" column. More...

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

Public Member Functions

 Explain_no_table (THD *explain_thd_arg, const THD *query_thd_arg, Query_block *query_block_arg, const char *message_arg, enum_parsing_context context_type_arg=CTX_JOIN, ha_rows rows_arg=HA_POS_ERROR)
 
- 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...
 

Protected Member Functions

bool shallow_explain () override
 Explain everything but subqueries. More...
 
bool explain_rows_and_filtered () override
 fill col_rows and col_filtered fields together More...
 
bool explain_extra () override
 
bool explain_modify_flags () override
 
- 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)
 
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_partitions ()
 
virtual bool explain_join_type ()
 
virtual bool explain_possible_keys ()
 
virtual bool explain_key_and_len ()
 fill col_key and and col_key_len fields together More...
 
virtual bool explain_ref ()
 
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...
 

Private Member Functions

enum_parsing_context get_subquery_context (Query_expression *unit) const override
 

Private Attributes

const char * message
 cached "message" argument More...
 
const ha_rows rows
 HA_POS_ERROR or cached "rows" argument. More...
 

Additional Inherited Members

- 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...
 

Detailed Description

Explain_no_table class outputs a trivial EXPLAIN row with "extra" column.

This class is intended for simple cases to produce EXPLAIN output with "No tables used", "No matching records" etc. Optionally it can output number of estimated rows in the "row" column.

Note
This class also produces EXPLAIN rows for inner units (if any).

Constructor & Destructor Documentation

◆ Explain_no_table()

anonymous_namespace{opt_explain.cc}::Explain_no_table::Explain_no_table ( THD explain_thd_arg,
const THD query_thd_arg,
Query_block query_block_arg,
const char *  message_arg,
enum_parsing_context  context_type_arg = CTX_JOIN,
ha_rows  rows_arg = HA_POS_ERROR 
)
inline

Member Function Documentation

◆ explain_extra()

bool Explain_no_table::explain_extra ( )
overrideprotectedvirtual

◆ explain_modify_flags()

bool Explain_no_table::explain_modify_flags ( )
overrideprotectedvirtual

◆ explain_rows_and_filtered()

bool Explain_no_table::explain_rows_and_filtered ( )
overrideprotectedvirtual

fill col_rows and col_filtered fields together

Reimplemented from anonymous_namespace{opt_explain.cc}::Explain.

◆ get_subquery_context()

enum_parsing_context Explain_no_table::get_subquery_context ( Query_expression unit) const
overrideprivatevirtual

◆ shallow_explain()

bool Explain_no_table::shallow_explain ( )
overrideprotectedvirtual

Explain everything but subqueries.

Reimplemented from anonymous_namespace{opt_explain.cc}::Explain.

Member Data Documentation

◆ message

const char* anonymous_namespace{opt_explain.cc}::Explain_no_table::message
private

cached "message" argument

◆ rows

const ha_rows anonymous_namespace{opt_explain.cc}::Explain_no_table::rows
private

HA_POS_ERROR or cached "rows" argument.


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