MySQL 8.4.3
Source Code Documentation
Query_result_explain_into_var Class Referencefinal

Wrapper class for writing EXPLAIN output to a user variable. More...

#include <opt_explain.h>

Inheritance diagram for Query_result_explain_into_var:
[legend]

Public Member Functions

 Query_result_explain_into_var (Query_expression *expr, Query_result *child, std::string_view variable_name)
 
bool send_result_set_metadata (THD *, const mem_root_deque< Item * > &, uint) override
 
bool send_data (THD *thd, const mem_root_deque< Item * > &items) override
 
bool send_eof (THD *thd) override
 
- Public Member Functions inherited from Query_result_explain
 Query_result_explain (Query_expression *unit_arg, Query_result *interceptor_arg)
 
bool use_protocol_adapter () const override
 
- Public Member Functions inherited from Query_result_send
 Query_result_send ()
 
bool send_result_set_metadata (THD *thd, const mem_root_deque< Item * > &list, uint flags) override
 
bool send_data (THD *thd, const mem_root_deque< Item * > &items) override
 
bool send_eof (THD *thd) override
 
bool check_supports_cursor () const override
 Check if this query result set supports cursors. More...
 
void abort_result_set (THD *thd) override
 
void cleanup () override
 Cleanup after this execution. More...
 
bool use_protocol_adapter () const override
 An alternative implementation may provide an optimized protocol adapter for this object. More...
 
- Public Member Functions inherited from Query_result
 Query_result ()
 
virtual ~Query_result ()=default
 
virtual bool needs_file_privilege () const
 
virtual bool change_query_result (THD *, Query_result *)
 Change wrapped Query_result. More...
 
virtual bool need_explain_interceptor () const
 
virtual bool create_table_for_query_block (THD *)
 Create table, only needed to support CREATE TABLE ... SELECT. More...
 
virtual uint field_count (const mem_root_deque< Item * > &fields) const
 
virtual bool reset ()
 Cleanup after one execution of the unit, to be ready for a next execution inside the same statement. More...
 
virtual bool use_protocol_wrapper () const
 
virtual void set_limit (ha_rows)
 Only overridden (and non-empty) for Query_result_union, q.v. More...
 
virtual Server_side_cursorcursor () const
 

Private Attributes

std::string_view m_variable_name
 

Additional Inherited Members

- Public Attributes inherited from Query_result
ha_rows estimated_rowcount
 Number of records estimated in this result. More...
 
double estimated_cost
 Cost to execute the subquery which produces this result. More...
 
- Protected Member Functions inherited from Query_result_explain
bool prepare (THD *thd, const mem_root_deque< Item * > &list, Query_expression *u) override
 Perform preparation specific to the query expression or DML statement. More...
 
bool start_execution (THD *thd) override
 Prepare for execution of the query expression or DML statement. More...
 
void cleanup () override
 Cleanup after this execution. More...
 
- Protected Attributes inherited from Query_result_explain
Query_resultinterceptor
 Pointer to underlying Query_result_insert, Query_result_update or Query_result_delete object. More...
 
- Protected Attributes inherited from Query_result
Query_expressionunit
 

Detailed Description

Wrapper class for writing EXPLAIN output to a user variable.

This class overrides Query_result_send::send_data() to write the output of the EXPLAIN query to the user variable specified by m_variable_name.

Constructor & Destructor Documentation

◆ Query_result_explain_into_var()

Query_result_explain_into_var::Query_result_explain_into_var ( Query_expression expr,
Query_result child,
std::string_view  variable_name 
)
inline

Member Function Documentation

◆ send_data()

bool Query_result_explain_into_var::send_data ( THD thd,
const mem_root_deque< Item * > &  items 
)
overridevirtual

Implements Query_result.

◆ send_eof()

bool Query_result_explain_into_var::send_eof ( THD thd)
overridevirtual

Implements Query_result.

◆ send_result_set_metadata()

bool Query_result_explain_into_var::send_result_set_metadata ( THD ,
const mem_root_deque< Item * > &  ,
uint   
)
inlineoverridevirtual

Implements Query_result.

Member Data Documentation

◆ m_variable_name

std::string_view Query_result_explain_into_var::m_variable_name
private

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