MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
opt_explain_json_namespace::context Class Reference
Inheritance diagram for opt_explain_json_namespace::context:
Collaboration diagram for opt_explain_json_namespace::context:

Public Member Functions

 context (Explain_context_enum type_arg, const char *name_arg, context *parent_arg)
virtual bool format (Opt_trace_context *json)
bool is_query_block () const
virtual size_t id (bool hide=false)=0
virtual bool cacheable ()
virtual bool dependent ()
virtual class qep_rowentry ()
virtual void set_child (context *child)
virtual void set_union_result (union_result_ctx *ctx)
 associate CTX_UNION_RESULT node with CTX_UNION node
virtual bool add_subquery (subquery_list_enum subquery_type, subquery_ctx *ctx)
virtual bool format_nested_loop (Opt_trace_context *json)
virtual bool add_join_tab (joinable_ctx *ctx)
virtual void set_sort (sort_ctx *ctx)
virtual bool add_query_spec (context *ctx)
virtual bool find_and_set_derived (context *subquery)
virtual bool add_where_subquery (subquery_ctx *ctx, SELECT_LEX_UNIT *subquery)
virtual bool format_derived (Opt_trace_context *json)
 Helper function to format output for derived subquery if any.
virtual bool format_where (Opt_trace_context *json)
 Helper function to format output for associated WHERE subqueries if any.
virtual bool format_unit (Opt_trace_context *json)
 Helper function to format output for HAVING, ORDER/GROUP BY subqueries.
- Public Member Functions inherited from Explain_context
 Explain_context (Explain_context_enum type_arg)

Public Attributes

contextparent
 link to parent node or NULL
- Public Attributes inherited from Explain_context
Explain_context_enum type
 type tag

Protected Attributes

const char * name

Additional Inherited Members

- Static Public Member Functions inherited from Sql_alloc
static void * operator new (size_t size) throw ()
static void * operator new[] (size_t size) throw ()
static void * operator new[] (size_t size, MEM_ROOT *mem_root) throw ()
static void * operator new (size_t size, MEM_ROOT *mem_root) throw ()
static void operator delete (void *ptr, size_t size)
static void operator delete (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, MEM_ROOT *mem_root)
static void operator delete[] (void *ptr, size_t size)

Detailed Description

Base class for all intermediate tree nodes

Definition at line 145 of file opt_explain_json.cc.

Member Function Documentation

virtual bool opt_explain_json_namespace::context::add_join_tab ( joinable_ctx ctx)
inlinevirtual

Add a CTX_JOIN_TAB node to a CTX_JOIN node

Parameters
ctxCTX_JOIN_TAB node
Return values
falseOk
trueError

Reimplemented in opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::join_ctx, and opt_explain_json_namespace::simple_sort_ctx.

Definition at line 249 of file opt_explain_json.cc.

virtual bool opt_explain_json_namespace::context::add_query_spec ( context ctx)
inlinevirtual

Add a query specification node to the CTX_UNION node

Parameters
ctxquery specification node
Return values
falseOk
trueError

Reimplemented in opt_explain_json_namespace::union_ctx.

Definition at line 269 of file opt_explain_json.cc.

virtual bool opt_explain_json_namespace::context::add_subquery ( subquery_list_enum  subquery_type,
subquery_ctx ctx 
)
inlinevirtual

Append a subquery node to the specified list of the unit node

Parameters
subquery_typeDescribes the Item tree where the subquery exists
ctxSubquery node
Return values
falseOk
trueError

Reimplemented in opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::sort_with_subqueries_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::simple_sort_with_subqueries_ctx, opt_explain_json_namespace::union_result_ctx, and opt_explain_json_namespace::unit_ctx.

Definition at line 228 of file opt_explain_json.cc.

Here is the caller graph for this function:

virtual bool opt_explain_json_namespace::context::add_where_subquery ( subquery_ctx ctx,
SELECT_LEX_UNIT *  subquery 
)
inlinevirtual

Associate WHERE subqueries of given context and unit with this object

Parameters
ctxContext of WHERE subquery
subqueryFor CTX_JOIN_TAB: match given unit with a previously collected by the register_where_subquery function.

Reimplemented in opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_tab_ctx, and opt_explain_json_namespace::message_ctx.

Definition at line 293 of file opt_explain_json.cc.

Here is the caller graph for this function:

virtual bool opt_explain_json_namespace::context::find_and_set_derived ( context subquery)
inlinevirtual

Try to associate a derived subquery node with this or underlying node

Parameters
subqueryDerived subquery node
Return values
trueSuccess
falseCan't associate: this node or its child nodes are not derived from the subquery

Reimplemented in opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_tab_ctx, and opt_explain_json_namespace::message_ctx.

Definition at line 280 of file opt_explain_json.cc.

Here is the caller graph for this function:

virtual bool opt_explain_json_namespace::context::format ( Opt_trace_context json)
inlinevirtual

Pass the node with its child nodes to a JSON formatter

Parameters
jsonFormatter
Return values
falseOk
trueError
Note
The join_ctx class overloads this function.

Reimplemented in opt_explain_json_namespace::union_result_ctx, and opt_explain_json_namespace::subquery_ctx.

Definition at line 172 of file opt_explain_json.cc.

Here is the caller graph for this function:

virtual bool opt_explain_json_namespace::context::format_nested_loop ( Opt_trace_context json)
inlinevirtual

Format nested loop join subtree (if any) to JSON formatter

Parameters
jsonFormatter
Return values
falseOk
trueError

Reimplemented in opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::join_ctx.

Definition at line 238 of file opt_explain_json.cc.

virtual size_t opt_explain_json_namespace::context::id ( bool  hide = false)
pure virtual

Analogue of the "id" column in the traditional EXPLAIN output

Parameters
hideif true, ban the output of K_SELECT_ID JSON property in the underlying table_with_where_and_derived_ctx objects
Returns
"Select number" that is associated with this node

Implemented in opt_explain_json_namespace::union_ctx, opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, opt_explain_json_namespace::join_ctx, opt_explain_json_namespace::simple_sort_ctx, opt_explain_json_namespace::join_tab_ctx, opt_explain_json_namespace::message_ctx, opt_explain_json_namespace::table_with_where_and_derived, opt_explain_json_namespace::union_result_ctx, opt_explain_json_namespace::table_base_ctx, and opt_explain_json_namespace::subquery_ctx.

Here is the caller graph for this function:

virtual void opt_explain_json_namespace::context::set_child ( context child)
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.

Definition at line 214 of file opt_explain_json.cc.

virtual void opt_explain_json_namespace::context::set_sort ( sort_ctx ctx)
inlinevirtual

Set nested ORDER BY/GROUP BY/DISTINCT node to ctx

Parameters
jsonFormatter
Return values
falseOk
trueError

Reimplemented in opt_explain_json_namespace::duplication_weedout_ctx, opt_explain_json_namespace::materialize_ctx, and opt_explain_json_namespace::join_ctx.

Definition at line 259 of file opt_explain_json.cc.


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