23#ifndef PARSE_TREE_ITEMS_INCLUDED
24#define PARSE_TREE_ITEMS_INCLUDED
81 obj->
add_alias(
"operator", create_dom_ptr<Json_string>(
97 obj->
add_alias(
"operator", create_dom_ptr<Json_string>(
98 (*
comp_op)(
false)->symbol(
false)));
140 const char *table_arg,
const char *field_arg)
154 const char *field_arg)
177 :
super(pos, dec_arg) {}
281 :
super(pos, is_7bit_arg, literal_arg) {}
292 :
super(pos, is_7bit_arg, literal_arg) {}
306 :
super(pos, is_7bit_arg, literal_arg),
cs(cs_arg) {}
327 :
super(pos, is_7bit_arg, tail),
head(head_arg) {}
395 :
super(pos, var, expr) {}
510 bool is_negation_arg,
Item *right_arg)
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
Definition: item_func.h:3247
Definition: item_timefunc.h:1182
This class is used to implement operations like SET @variable or @variable:= expression.
Definition: item_func.h:3179
Dynamic parameters used as placeholders ('?') inside prepared statements.
Definition: item.h:4734
void set_cs_specified(bool cs_specified)
Set the value of m_cs_specified attribute.
Definition: item.h:5599
void init(const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv, uint repertoire)
Definition: item.h:5425
void set_repertoire_from_value()
Definition: item.h:5533
Definition: item_sum.h:1065
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:932
String str_value
str_values's main purpose is to cache the value in save_in_field
Definition: item.h:3496
virtual bool do_itemize(Parse_context *pc, Item **res)
The core function that does the actual itemization.
Definition: item.cc:750
Bool_test
< Modifier for result transformation
Definition: item.h:1015
String * check_well_formed_result(String *str, bool send_error, bool truncate)
Verifies that the input string is well-formed according to its character set.
Definition: item.cc:6448
Represents a JSON container value of type "object" (ECMA), type J_OBJECT here.
Definition: json_dom.h:374
bool add_alias(const std::string &key, Json_dom *value)
Insert the value into the object.
Definition: json_dom.h:416
Definition: parse_tree_items.h:86
Item * left
Definition: parse_tree_items.h:89
bool is_all
Definition: parse_tree_items.h:91
Parse_tree_item super
Definition: parse_tree_items.h:87
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:177
PTI_comp_op_all(const POS &pos, Item *left_arg, chooser_compare_func_creator comp_op_arg, bool is_all_arg, PT_subquery *subselect_arg)
Definition: parse_tree_items.h:102
PT_subquery * subselect
Definition: parse_tree_items.h:92
chooser_compare_func_creator comp_op
Definition: parse_tree_items.h:90
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.h:95
Definition: parse_tree_items.h:61
Parse_tree_item super
Definition: parse_tree_items.h:62
chooser_compare_func_creator boolfunc2creator
Definition: parse_tree_items.h:65
PTI_comp_op(const POS &pos, Item *left_arg, chooser_compare_func_creator boolfunc2creator_arg, Item *right_arg)
Definition: parse_tree_items.h:69
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.h:80
Item * right
Definition: parse_tree_items.h:66
Item * left
Definition: parse_tree_items.h:64
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:168
Definition: parse_tree_items.h:581
PTI_context(const POS &pos, Item *expr_arg, enum_parsing_context place)
Definition: parse_tree_items.h:587
Item * expr
Definition: parse_tree_items.h:583
const enum_parsing_context m_parsing_place
Definition: parse_tree_items.h:584
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:730
Parse_tree_item super
Definition: parse_tree_items.h:582
Definition: parse_tree_items.h:436
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:628
Item_sum_count super
Definition: parse_tree_items.h:437
PTI_count_sym(const POS &pos, PT_window *w)
Definition: parse_tree_items.h:440
Definition: parse_tree_items.h:470
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:334
Parse_tree_item super
Definition: parse_tree_items.h:471
PT_subquery * subselect
Definition: parse_tree_items.h:473
PTI_exists_subselect(const POS &pos, PT_subquery *subselect_arg)
Definition: parse_tree_items.h:476
Definition: parse_tree_items.h:522
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:349
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.cc:367
Symbol_location expr_loc
Definition: parse_tree_items.h:526
Parse_tree_item super
Definition: parse_tree_items.h:523
PTI_expr_with_alias(const POS &pos, Item *expr_arg, const Symbol_location &expr_loc_arg, const LEX_CSTRING &alias_arg)
Definition: parse_tree_items.h:530
LEX_CSTRING alias
Definition: parse_tree_items.h:527
Item * expr
Definition: parse_tree_items.h:525
Parse tree Item wrapper for 2-dimentional functional names (ex.
Definition: parse_tree_items.h:241
PTI_function_call_generic_2d(const POS &pos, const LEX_STRING &db_arg, const LEX_STRING &func_arg, PT_item_list *opt_expr_list_arg)
Definition: parse_tree_items.h:249
LEX_STRING db
Definition: parse_tree_items.h:244
LEX_STRING func
Definition: parse_tree_items.h:245
PT_item_list * opt_expr_list
Definition: parse_tree_items.h:246
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:289
Parse_tree_item super
Definition: parse_tree_items.h:242
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.cc:277
Definition: parse_tree_items.h:213
PT_item_list * opt_udf_expr_list
Definition: parse_tree_items.h:217
Parse_tree_item super
Definition: parse_tree_items.h:214
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:236
PTI_function_call_generic_ident_sys(const POS &pos, const LEX_STRING &ident_arg, PT_item_list *opt_udf_expr_list_arg)
Definition: parse_tree_items.h:222
LEX_STRING ident
Definition: parse_tree_items.h:216
udf_func * udf
Definition: parse_tree_items.h:219
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.h:232
Definition: parse_tree_items.h:172
PTI_function_call_nonkeyword_now(const POS &pos, uint8 dec_arg)
Definition: parse_tree_items.h:176
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:526
Item_func_now_local super
Definition: parse_tree_items.h:173
Definition: parse_tree_items.h:182
Parse_tree_item super
Definition: parse_tree_items.h:183
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:187
uint8 dec
Definition: parse_tree_items.h:185
PTI_function_call_nonkeyword_sysdate(const POS &pos, uint8 dec_arg)
Definition: parse_tree_items.h:188
Parse tree Item wrapper for 3-dimentional variable names.
Definition: parse_tree_items.h:414
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:604
const enum_var_type m_scope
Definition: parse_tree_items.h:430
const POS m_name_pos
Definition: parse_tree_items.h:431
Parse_tree_item super
Definition: parse_tree_items.h:415
const LEX_CSTRING m_name
Definition: parse_tree_items.h:433
PTI_get_system_variable(const POS &pos, enum_var_type scope, const POS &name_pos, const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name)
Definition: parse_tree_items.h:418
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_items.h:432
Definition: parse_tree_items.h:501
bool is_negation
Definition: parse_tree_items.h:505
PTI_handle_sql2003_note184_exception(const POS &pos, Item *left_arg, bool is_negation_arg, Item *right_arg)
Definition: parse_tree_items.h:509
Item * right
Definition: parse_tree_items.h:506
Item * left
Definition: parse_tree_items.h:504
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:340
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.h:517
Parse_tree_item super
Definition: parse_tree_items.h:502
Definition: parse_tree_items.h:600
PTI_having(const POS &pos, Item *expr_arg)
Definition: parse_tree_items.h:602
Definition: parse_tree_items.h:446
Parse_tree_item super
Definition: parse_tree_items.h:447
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:634
Item * expr
Definition: parse_tree_items.h:449
PTI_in_sum_expr(const POS &pos, Item *expr_arg)
Definition: parse_tree_items.h:452
Definition: parse_tree_items.h:541
PTI_int_splocal(const POS &pos, const LEX_CSTRING &name)
Definition: parse_tree_items.h:545
const LEX_CSTRING m_name
Same data as in PTI_in_sum_expr::m_location but 0-terminated "for free".
Definition: parse_tree_items.h:555
const POS m_location
Location of the variable name.
Definition: parse_tree_items.h:552
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:680
Definition: parse_tree_items.h:558
PTI_limit_option_ident(const POS &pos, const LEX_CSTRING &name)
Definition: parse_tree_items.h:562
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:704
Definition: parse_tree_items.h:568
Item_param * param_marker
Definition: parse_tree_items.h:571
PTI_limit_option_param_marker(const POS &pos, Item_param *param_marker_arg)
Definition: parse_tree_items.h:574
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:711
Parse_tree_item super
Definition: parse_tree_items.h:569
Definition: parse_tree_items.h:371
Item_string super
Definition: parse_tree_items.h:372
PTI_literal_underscore_charset_bin_num(const POS &pos, const CHARSET_INFO *charset, const LEX_STRING &literal)
Definition: parse_tree_items.h:375
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.h:382
Definition: parse_tree_items.h:351
Item_string super
Definition: parse_tree_items.h:352
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.h:362
PTI_literal_underscore_charset_hex_num(const POS &pos, const CHARSET_INFO *charset, const LEX_STRING &literal)
Definition: parse_tree_items.h:355
Definition: parse_tree_items.h:482
LEX_STRING ident
Definition: parse_tree_items.h:485
Item * expr
Definition: parse_tree_items.h:486
Parse_tree_item super
Definition: parse_tree_items.h:483
PTI_odbc_date(const POS &pos, const LEX_STRING &ident_arg, Item *expr_arg)
Definition: parse_tree_items.h:495
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.h:489
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:642
Definition: parse_tree_items.h:114
Parse_tree_item super
Definition: parse_tree_items.h:115
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:373
PTI_simple_ident_ident(const POS &pos, const LEX_CSTRING &ident_arg)
Definition: parse_tree_items.h:121
Symbol_location raw
Definition: parse_tree_items.h:118
LEX_CSTRING ident
Definition: parse_tree_items.h:117
Definition: parse_tree_items.h:160
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:481
LEX_STRING ident
Definition: parse_tree_items.h:163
Parse_tree_item super
Definition: parse_tree_items.h:161
PTI_simple_ident_nospvar_ident(const POS &pos, const LEX_STRING &ident_arg)
Definition: parse_tree_items.h:166
Parse tree Item wrapper for 3-dimentional simple_ident-s.
Definition: parse_tree_items.h:149
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:429
PTI_simple_ident_q_2d(const POS &pos, const char *table_arg, const char *field_arg)
Definition: parse_tree_items.h:153
PTI_simple_ident_q_3d super
Definition: parse_tree_items.h:150
Parse tree Item wrapper for 3-dimentional simple_ident-s.
Definition: parse_tree_items.h:130
const char * table
Definition: parse_tree_items.h:135
const char * db
Definition: parse_tree_items.h:134
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:408
PTI_simple_ident_q_3d(const POS &pos, const char *db_arg, const char *table_arg, const char *field_arg)
Definition: parse_tree_items.h:139
Parse_tree_item super
Definition: parse_tree_items.h:131
const char * field
Definition: parse_tree_items.h:136
Definition: parse_tree_items.h:458
PT_subquery * subselect
Definition: parse_tree_items.h:461
PTI_singlerow_subselect(const POS &pos, PT_subquery *subselect_arg)
Definition: parse_tree_items.h:464
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:327
Parse_tree_item super
Definition: parse_tree_items.h:459
Definition: parse_tree_items.h:332
LEX_STRING literal
Definition: parse_tree_items.h:335
const CHARSET_INFO * cs
Definition: parse_tree_items.h:337
Parse_tree_item super
Definition: parse_tree_items.h:333
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:572
PTI_temporal_literal(const POS &pos, const LEX_STRING &literal_arg, enum_field_types field_type_arg, const CHARSET_INFO *cs_arg)
Definition: parse_tree_items.h:340
enum_field_types field_type
Definition: parse_tree_items.h:336
Definition: parse_tree_items.h:319
PTI_text_literal super
Definition: parse_tree_items.h:320
PTI_text_literal * head
Definition: parse_tree_items.h:322
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:555
PTI_text_literal_concat(const POS &pos, bool is_7bit_arg, PTI_text_literal *head_arg, const LEX_STRING &tail)
Definition: parse_tree_items.h:325
Definition: parse_tree_items.h:286
PTI_text_literal_nchar_string(const POS &pos, bool is_7bit_arg, const LEX_STRING &literal_arg)
Definition: parse_tree_items.h:290
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:317
PTI_text_literal super
Definition: parse_tree_items.h:287
Definition: parse_tree_items.h:275
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:534
PTI_text_literal_text_string(const POS &pos, bool is_7bit_arg, const LEX_STRING &literal_arg)
Definition: parse_tree_items.h:279
PTI_text_literal super
Definition: parse_tree_items.h:276
Definition: parse_tree_items.h:297
PTI_text_literal super
Definition: parse_tree_items.h:298
const CHARSET_INFO * cs
Definition: parse_tree_items.h:300
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.h:308
PTI_text_literal_underscore_charset(const POS &pos, bool is_7bit_arg, const CHARSET_INFO *cs_arg, const LEX_STRING &literal_arg)
Definition: parse_tree_items.h:303
Definition: parse_tree_items.h:263
PTI_text_literal(const POS &pos, bool is_7bit_arg, const LEX_STRING &literal_arg)
Definition: parse_tree_items.h:270
bool is_7bit
Definition: parse_tree_items.h:267
Item_string super
Definition: parse_tree_items.h:264
LEX_STRING literal
Definition: parse_tree_items.h:268
Definition: parse_tree_items.h:194
Parse_tree_item super
Definition: parse_tree_items.h:195
Item * expr
Definition: parse_tree_items.h:197
LEX_STRING select_alias
Definition: parse_tree_items.h:198
PTI_udf_expr(const POS &pos, Item *expr_arg, const LEX_STRING &select_alias_arg, const Symbol_location &expr_loc_arg)
Definition: parse_tree_items.h:202
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:211
Symbol_location expr_loc
Definition: parse_tree_items.h:199
Definition: parse_tree_items.h:400
Item_func_get_user_var super
Definition: parse_tree_items.h:401
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:592
PTI_user_variable(const POS &pos, const LEX_STRING &var)
Definition: parse_tree_items.h:404
Definition: parse_tree_items.h:390
PTI_variable_aux_set_var(const POS &pos, const LEX_STRING &var, Item *expr)
Definition: parse_tree_items.h:394
Item_func_set_user_var super
Definition: parse_tree_items.h:391
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:580
Definition: parse_tree_items.h:594
PTI_where(const POS &pos, Item *expr_arg)
Definition: parse_tree_items.h:596
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independe...
Definition: parse_tree_helpers.h:104
Definition: parse_tree_nodes.h:1743
Parse tree node for a window; just a shallow wrapper for class Window, q.v.
Definition: parse_tree_window.h:38
Base class for parse-time Item objects.
Definition: parse_tree_helpers.h:69
Parse_tree_item(const POS &pos)
Definition: parse_tree_helpers.h:71
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:229
Comp_creator *(*)(bool invert) chooser_compare_func_creator
Convenience typedef for a function that returns factories for Item comparators (ie....
Definition: comp_creator.h:38
This file contains the field type.
enum_field_types
Column types for MySQL Note: Keep include/mysql/components/services/bits/stored_program_bits....
Definition: field_types.h:54
const Name_string null_name_string(nullptr, 0)
A better implementation of the UNIX ctype(3) library.
static constexpr uint32_t MY_REPERTOIRE_UNICODE30
Definition: m_ctype.h:155
Some integer typedefs for easier portability.
uint8_t uint8
Definition: my_inttypes.h:62
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1085
const std::string charset("charset")
Definition: commit_order_queue.h:33
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:75
enum_parsing_context
Names for different query parse tree parts.
Definition: parse_tree_node_base.h:60
@ CTX_HAVING
Subquery in HAVING clause item tree.
Definition: parse_tree_node_base.h:76
@ CTX_WHERE
Subquery in WHERE clause item tree.
Definition: parse_tree_node_base.h:73
"public" interface to sys_var - server configuration variables.
enum_var_type
Definition: set_var.h:90
@ DERIVATION_COERCIBLE
Definition: field.h:183
case opt name
Definition: sslopt-case.h:32
Definition: m_ctype.h:422
Definition: mysql_lex_string.h:39
Definition: mysql_lex_string.h:34
char * str
Definition: mysql_lex_string.h:35
size_t length
Definition: mysql_lex_string.h:36
Bison "location" class.
Definition: parse_location.h:42
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:418
Helper class for the MY_SQL_PARSER_LTYPE.
Definition: parse_location.h:31