27#ifndef PARSE_TREE_HINTS_INCLUDED
28#define PARSE_TREE_HINTS_INCLUDED
136 :
PT_hint(hint_type_arg, switch_state_arg),
143 :
PT_hint(hint_type_arg, switch_state_arg),
185 :
PT_hint(hint_type_arg, switch_state_arg),
216 :
PT_hint(hint_type_arg, switch_state_arg),
297 Item *sys_var_value_arg)
void append_identifier(String *packet, const char *name, size_t length)
Convert and quote the given identifier if needed and append it to the target string.
Definition: sql_show.cc:1456
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:850
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:425
Definition: parse_tree_hints.h:97
PT_hint_list(MEM_ROOT *mem_root)
Definition: parse_tree_hints.h:103
bool contextualize(Parse_context *pc) override
Function handles list of the hints we get after parse procedure.
Definition: parse_tree_hints.cc:337
Parse_tree_node super
Definition: parse_tree_hints.h:98
bool push_back(PT_hint *hint)
Definition: parse_tree_hints.h:117
Mem_root_array< PT_hint * > hints
Definition: parse_tree_hints.h:100
Parse tree hint object for MAX_EXECUTION_TIME hint.
Definition: parse_tree_hints.h:266
PT_hint_max_execution_time(ulong milliseconds_arg)
Definition: parse_tree_hints.h:272
PT_hint super
Definition: parse_tree_hints.h:267
void append_args(const THD *, String *str) const override
Append additional hint arguments.
Definition: parse_tree_hints.h:284
bool contextualize(Parse_context *pc) override
Function initializes MAX_EXECUTION_TIME hint.
Definition: parse_tree_hints.cc:496
ulong milliseconds
Definition: parse_tree_hints.h:270
Parse tree hint object for QB_NAME hint.
Definition: parse_tree_hints.h:239
const LEX_CSTRING qb_name
Definition: parse_tree_hints.h:240
void append_args(const THD *thd, String *str) const override
Append additional hint arguments.
Definition: parse_tree_hints.h:257
bool contextualize(Parse_context *pc) override
Function sets query block name.
Definition: parse_tree_hints.cc:477
PT_hint super
Definition: parse_tree_hints.h:242
PT_hint_qb_name(const LEX_CSTRING qb_name_arg)
Definition: parse_tree_hints.h:245
Parse tree hint object for RESOURCE_GROUP hint.
Definition: parse_tree_hints.h:316
bool contextualize(Parse_context *pc) override
Function initializes resource group name and checks for presence of resource group.
Definition: parse_tree_hints.cc:565
void append_args(const THD *thd, String *str) const override
Append hint arguments to given string.
Definition: parse_tree_hints.h:345
PT_hint super
Definition: parse_tree_hints.h:319
PT_hint_resource_group(const LEX_CSTRING &name)
Definition: parse_tree_hints.h:322
const LEX_CSTRING m_resource_group_name
Definition: parse_tree_hints.h:317
Definition: parse_tree_hints.h:289
PT_hint_sys_var(const LEX_CSTRING sys_var_name_arg, Item *sys_var_value_arg)
Definition: parse_tree_hints.h:296
Item * sys_var_value
Definition: parse_tree_hints.h:291
const LEX_CSTRING sys_var_name
Definition: parse_tree_hints.h:290
bool contextualize(Parse_context *pc) override
Function initializes SET_VAR hint.
Definition: parse_tree_hints.cc:523
PT_hint super
Definition: parse_tree_hints.h:293
The class is a base class for representation of the different types of the hints.
Definition: parse_tree_hints.h:57
PT_hint(opt_hints_enum hint_type_arg, bool switch_state_arg)
Definition: parse_tree_hints.h:61
virtual void print_warn(THD *thd, uint err_code, const LEX_CSTRING *qb_name_arg, LEX_CSTRING *table_name_arg, LEX_CSTRING *key_name_arg, PT_hint *hint) const
Print warning issuing in processing of the hint.
Definition: parse_tree_hints.cc:172
bool state
Definition: parse_tree_hints.h:59
opt_hints_enum hint_type
Definition: parse_tree_hints.h:58
bool switch_on() const
Definition: parse_tree_hints.h:65
virtual void append_args(const THD *thd, String *str) const
Append additional hint arguments.
Definition: parse_tree_hints.h:86
bool supports_view()
Definition: parse_tree_hints.h:88
opt_hints_enum type() const
Definition: parse_tree_hints.h:64
Parse tree hint object for key level hints.
Definition: parse_tree_hints.h:206
void append_args(const THD *thd, String *str) const override
Append additional hint arguments.
Definition: parse_tree_hints.cc:392
Hint_param_table table_name
Definition: parse_tree_hints.h:207
PT_key_level_hint(Hint_param_table &table_name_arg, const Hint_param_index_list &key_list_arg, bool switch_state_arg, opt_hints_enum hint_type_arg)
Definition: parse_tree_hints.h:213
bool contextualize(Parse_context *pc) override
Function handles key level hint.
Definition: parse_tree_hints.cc:405
Hint_param_index_list key_list
Definition: parse_tree_hints.h:208
PT_hint super
Definition: parse_tree_hints.h:210
Parse tree hint object for query block level hints.
Definition: parse_tree_hints.h:123
PT_qb_level_hint(const LEX_CSTRING qb_name_arg, bool switch_state_arg, enum opt_hints_enum hint_type_arg, uint arg)
Definition: parse_tree_hints.h:134
void append_args(const THD *thd, String *str) const override
Append hint arguments to given string.
Definition: parse_tree_hints.cc:286
Hint_param_table_list table_list
List of tables specified in join order hint.
Definition: parse_tree_hints.h:129
const LEX_CSTRING qb_name
Name of query block.
Definition: parse_tree_hints.h:125
PT_hint super
Definition: parse_tree_hints.h:131
uint get_args() const
Definition: parse_tree_hints.h:148
virtual Hint_param_table_list * get_table_list()
Definition: parse_tree_hints.h:168
PT_qb_level_hint(const LEX_CSTRING qb_name_arg, bool switch_state_arg, enum opt_hints_enum hint_type_arg, const Hint_param_table_list &table_list_arg)
Definition: parse_tree_hints.h:140
uint args
Bit mask of arguments to hint.
Definition: parse_tree_hints.h:127
bool contextualize(Parse_context *pc) override
Function handles query block level hint.
Definition: parse_tree_hints.cc:224
Parse tree hint object for table level hints.
Definition: parse_tree_hints.h:175
PT_table_level_hint(const LEX_CSTRING qb_name_arg, const Hint_param_table_list &table_list_arg, bool switch_state_arg, opt_hints_enum hint_type_arg)
Definition: parse_tree_hints.h:182
bool contextualize(Parse_context *pc) override
Function handles table level hint.
Definition: parse_tree_hints.cc:353
Hint_param_table_list table_list
Definition: parse_tree_hints.h:177
const LEX_CSTRING qb_name
Definition: parse_tree_hints.h:176
PT_hint super
Definition: parse_tree_hints.h:179
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:138
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:166
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:33
static MEM_ROOT mem_root
Definition: client_plugin.cc:109
Header for compiler-dependent features.
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1063
opt_hints_enum
Hint types, MAX_HINT_ENUM should be always last.
Definition: opt_hints.h:63
@ MAX_HINT_ENUM
Definition: opt_hints.h:87
@ ORDER_INDEX_HINT_ENUM
Definition: opt_hints.h:85
@ RESOURCE_GROUP_HINT_ENUM
Definition: opt_hints.h:79
@ QB_NAME_HINT_ENUM
Definition: opt_hints.h:70
@ MAX_EXEC_TIME_HINT_ENUM
Definition: opt_hints.h:69
@ INDEX_HINT_ENUM
Definition: opt_hints.h:82
Mem_root_array_YY< LEX_CSTRING > Hint_param_index_list
Definition: parse_tree_hints.h:49
Mem_root_array_YY< Hint_param_table > Hint_param_table_list
Definition: parse_tree_hints.h:50
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:32
Definition: parse_tree_hints.h:44
LEX_CSTRING table
Definition: parse_tree_hints.h:45
LEX_CSTRING opt_query_block
Definition: parse_tree_hints.h:46
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:82
Definition: mysql_lex_string.h:39
const char * str
Definition: mysql_lex_string.h:40
size_t length
Definition: mysql_lex_string.h:41
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:120
unsigned int uint
Definition: uca-dump.cc:29