MySQL 8.0.40
Source Code Documentation
|
Base class for all intermediate tree nodes. More...
Public Member Functions | |
context (enum_parsing_context type_arg, const char *name_arg, context *parent_arg) | |
virtual | ~context ()=default |
virtual bool | format (Opt_trace_context *json) |
Pass the node with its child nodes to a JSON formatter. More... | |
bool | is_query_block () const |
virtual size_t | id (bool hide=false)=0 |
Analogue of the "id" column in the traditional EXPLAIN output. More... | |
virtual bool | cacheable () |
virtual bool | dependent () |
virtual class qep_row * | entry () |
virtual enum_mod_type | get_mod_type () |
virtual void | set_child (context *) |
Associate a child node with this node. More... | |
virtual void | set_setop_result (setop_result_ctx *) |
associate CTX_UNION_RESULT node with CTX_UNION node More... | |
virtual bool | add_subquery (subquery_list_enum subquery_type, subquery_ctx *ctx) |
Append a subquery node to the specified list of the unit node. More... | |
virtual bool | format_nested_loop (Opt_trace_context *json) |
Format nested loop join subtree (if any) to JSON formatter. More... | |
virtual bool | add_join_tab (joinable_ctx *ctx) |
Add a CTX_QEP_TAB node to a CTX_JOIN node. More... | |
virtual void | set_sort (sort_ctx *ctx) |
Set nested ORDER BY/GROUP BY/DISTINCT node to ctx . More... | |
virtual void | set_window (window_ctx *ctx) |
Set nested WINDOW node to ctx . More... | |
virtual bool | add_query_spec (context *ctx) |
Add a query specification node to the CTX_UNION node. More... | |
virtual bool | find_and_set_derived (context *subquery) |
Try to associate a derived subquery node with this or underlying node. More... | |
virtual int | add_where_subquery (subquery_ctx *ctx, Query_expression *subquery) |
Associate WHERE subqueries of given context and unit with this object. More... | |
virtual bool | format_derived (Opt_trace_context *) |
Helper function to format output for derived subquery if any. More... | |
virtual bool | format_where (Opt_trace_context *) |
Helper function to format output for associated WHERE subqueries if any. More... | |
virtual bool | format_query_expression (Opt_trace_context *) |
Helper function to format output for HAVING, ORDER/GROUP BY subqueries. More... | |
Public Member Functions inherited from Explain_context | |
Explain_context (enum_parsing_context type_arg) | |
Public Attributes | |
context * | parent |
link to parent node or NULL More... | |
Public Attributes inherited from Explain_context | |
enum_parsing_context | type |
type tag More... | |
Protected Attributes | |
const char * | name |
Private Member Functions | |
virtual bool | format_body (Opt_trace_context *json, Opt_trace_object *obj)=0 |
Format JSON object body. More... | |
Base class for all intermediate tree nodes.
|
inline |
|
virtualdefault |
|
inlinevirtual |
Add a CTX_QEP_TAB node to a CTX_JOIN node.
ctx | CTX_QEP_TAB node |
false | Ok |
true | Error |
Reimplemented in opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Add a query specification node to the CTX_UNION node.
ctx | query specification node |
false | Ok |
true | Error |
Reimplemented in opt_explain_json_namespace::setop_ctx.
|
inlinevirtual |
Append a subquery node to the specified list of the unit node.
subquery_type | Describes the Item tree where the subquery exists |
ctx | Subquery node |
false | Ok |
true | Error |
Reimplemented in opt_explain_json_namespace::unit_ctx, opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::simple_sort_with_subqueries_ctx, and opt_explain_json_namespace::sort_with_subqueries_ctx.
|
inlinevirtual |
Associate WHERE subqueries of given context and unit with this object.
ctx | Context of WHERE subquery |
subquery | For CTX_QEP_TAB: match given unit with a previously collected by the register_where_subquery function. |
Reimplemented in opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Reimplemented in opt_explain_json_namespace::subquery_ctx, opt_explain_json_namespace::table_base_ctx, opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::duplication_weedout_ctx, and opt_explain_json_namespace::setop_ctx.
|
inlinevirtual |
Reimplemented in opt_explain_json_namespace::subquery_ctx, opt_explain_json_namespace::table_base_ctx, opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::duplication_weedout_ctx, and opt_explain_json_namespace::setop_ctx.
|
inlinevirtual |
Reimplemented in opt_explain_json_namespace::subquery_ctx, opt_explain_json_namespace::table_base_ctx, opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Try to associate a derived subquery node with this or underlying node.
subquery | Derived subquery node |
true | Success |
false | Can't associate: this node or its child nodes are not derived from the subquery |
Reimplemented in opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Pass the node with its child nodes to a JSON formatter.
json | Formatter |
false | Ok |
true | Error |
join_ctx
class overloads this function. Reimplemented in opt_explain_json_namespace::subquery_ctx, and opt_explain_json_namespace::setop_result_ctx.
|
privatepure virtual |
Format JSON object body.
json | Formatter |
obj | Object of this body |
false | Ok |
true | Error |
Implemented in opt_explain_json_namespace::setop_ctx, opt_explain_json_namespace::subquery_ctx, opt_explain_json_namespace::table_base_ctx, opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::simple_sort_with_subqueries_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::sort_ctx, opt_explain_json_namespace::sort_with_subqueries_ctx, opt_explain_json_namespace::window_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Helper function to format output for derived subquery if any.
Reimplemented in opt_explain_json_namespace::table_with_where_and_derived, opt_explain_json_namespace::message_ctx, and opt_explain_json_namespace::join_tab_ctx.
|
inlinevirtual |
Format nested loop join subtree (if any) to JSON formatter.
json | Formatter |
false | Ok |
true | Error |
Reimplemented in opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Helper function to format output for HAVING, ORDER/GROUP BY subqueries.
Reimplemented in opt_explain_json_namespace::unit_ctx, opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Helper function to format output for associated WHERE subqueries if any.
Reimplemented in opt_explain_json_namespace::table_with_where_and_derived, opt_explain_json_namespace::message_ctx, and opt_explain_json_namespace::join_tab_ctx.
|
inlinevirtual |
Reimplemented in opt_explain_json_namespace::join_tab_ctx.
|
pure virtual |
Analogue of the "id" column in the traditional EXPLAIN output.
hide | if true, ban the output of K_SELECT_ID JSON property in the underlying table_with_where_and_derived_ctx objects |
Implemented in opt_explain_json_namespace::subquery_ctx, opt_explain_json_namespace::setop_result_ctx, opt_explain_json_namespace::table_with_where_and_derived, opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::setop_ctx, and opt_explain_json_namespace::table_base_ctx.
|
inline |
|
inlinevirtual |
Associate a child node with this node.
This function is to be overloaded by subquery_ctx.
Reimplemented in opt_explain_json_namespace::subquery_ctx.
|
inlinevirtual |
associate CTX_UNION_RESULT node with CTX_UNION node
Reimplemented in opt_explain_json_namespace::setop_ctx.
|
inlinevirtual |
Set nested ORDER BY/GROUP BY/DISTINCT node to ctx
.
Reimplemented in opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
inlinevirtual |
Set nested WINDOW node to ctx
.
Reimplemented in opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::duplication_weedout_ctx.
|
protected |
context* opt_explain_json_namespace::context::parent |
link to parent node or NULL