MySQL 8.0.40
Source Code Documentation
THD::Query_plan Class Reference

Query plan for EXPLAINable commands, should be locked with LOCK_query_plan before using. More...

#include <sql_class.h>

Public Member Functions

void assert_plan_is_locked_if_other () const
 Asserts that current_thd has locked this plan, if it does not own it. More...
 
 Query_plan (THD *thd_arg)
 
void set_query_plan (enum_sql_command sql_cmd, LEX *lex_arg, bool ps)
 Set query plan. More...
 
enum_sql_command get_command () const
 
LEXget_lex () const
 
Modification_plan const * get_modification_plan () const
 
bool is_ps_query () const
 
bool is_single_table_plan () const
 
void set_modification_plan (Modification_plan *plan_arg)
 

Private Member Functions

 Query_plan (const Query_plan &)
 not defined More...
 
Query_planoperator= (const Query_plan &)
 not defined More...
 

Private Attributes

THD *const thd
 
enum_sql_command sql_command
 Original sql_command;. More...
 
LEXlex
 LEX of topmost statement. More...
 
const Modification_planmodification_plan
 Query plan for UPDATE/DELETE/INSERT/REPLACE. More...
 
bool is_ps
 True if query is run in prepared statement. More...
 

Detailed Description

Query plan for EXPLAINable commands, should be locked with LOCK_query_plan before using.

Constructor & Destructor Documentation

◆ Query_plan() [1/2]

THD::Query_plan::Query_plan ( const Query_plan )
explicitprivate

not defined

◆ Query_plan() [2/2]

THD::Query_plan::Query_plan ( THD thd_arg)
inlineexplicit

Member Function Documentation

◆ assert_plan_is_locked_if_other()

void THD::Query_plan::assert_plan_is_locked_if_other ( ) const

Asserts that current_thd has locked this plan, if it does not own it.

◆ get_command()

enum_sql_command THD::Query_plan::get_command ( ) const
inline

◆ get_lex()

LEX * THD::Query_plan::get_lex ( ) const
inline

◆ get_modification_plan()

Modification_plan const * THD::Query_plan::get_modification_plan ( ) const
inline

◆ is_ps_query()

bool THD::Query_plan::is_ps_query ( ) const
inline

◆ is_single_table_plan()

bool THD::Query_plan::is_single_table_plan ( ) const

◆ operator=()

Query_plan & THD::Query_plan::operator= ( const Query_plan )
private

not defined

◆ set_modification_plan()

void THD::Query_plan::set_modification_plan ( Modification_plan plan_arg)

◆ set_query_plan()

void THD::Query_plan::set_query_plan ( enum_sql_command  sql_cmd,
LEX lex_arg,
bool  ps 
)

Set query plan.

Note
This function takes THD::LOCK_query_plan mutex.

Member Data Documentation

◆ is_ps

bool THD::Query_plan::is_ps
private

True if query is run in prepared statement.

◆ lex

LEX* THD::Query_plan::lex
private

LEX of topmost statement.

◆ modification_plan

const Modification_plan* THD::Query_plan::modification_plan
private

Query plan for UPDATE/DELETE/INSERT/REPLACE.

◆ sql_command

enum_sql_command THD::Query_plan::sql_command
private

Original sql_command;.

◆ thd

THD* const THD::Query_plan::thd
private

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