MySQL 8.3.0
Source Code Documentation
parse_tree_items.h
Go to the documentation of this file.
1/* Copyright (c) 2013, 2023, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef PARSE_TREE_ITEMS_INCLUDED
24#define PARSE_TREE_ITEMS_INCLUDED
25
26#include "field_types.h" // enum_field_types
27#include "lex_string.h"
28#include "my_inttypes.h" // TODO: replace with cstdint
30#include "sql/comp_creator.h"
31#include "sql/field.h"
32#include "sql/item.h"
33#include "sql/item_func.h"
34#include "sql/item_sum.h" // Item_sum_count
35#include "sql/item_timefunc.h" // Item_func_now_local
36#include "sql/parse_location.h"
37#include "sql/parse_tree_helpers.h" // Parse_tree_item
39#include "sql/set_var.h"
40
41class PT_subquery;
42class PT_window;
43struct udf_func;
44
47
50
51 public:
53 : super(pos), expr(expr_arg), truth_test(truth_test) {}
54
55 bool do_itemize(Parse_context *pc, Item **res) override;
56
57 protected:
58 void add_json_info(Json_object *obj) override;
59};
60
63
67
68 public:
69 PTI_comp_op(const POS &pos, Item *left_arg,
70 chooser_compare_func_creator boolfunc2creator_arg,
71 Item *right_arg)
72 : super(pos),
73 left(left_arg),
74 boolfunc2creator(boolfunc2creator_arg),
75 right(right_arg) {}
76
77 bool do_itemize(Parse_context *pc, Item **res) override;
78
79 protected:
80 void add_json_info(Json_object *obj) override {
81 obj->add_alias("operator", create_dom_ptr<Json_string>(
82 (*boolfunc2creator)(false)->symbol(false)));
83 }
84};
85
88
91 bool is_all;
93
94 protected:
95 void add_json_info(Json_object *obj) override {
96 obj->add_alias("is_all", create_dom_ptr<Json_boolean>(is_all));
97 obj->add_alias("operator", create_dom_ptr<Json_string>(
98 (*comp_op)(false)->symbol(false)));
99 }
100
101 public:
102 PTI_comp_op_all(const POS &pos, Item *left_arg,
103 chooser_compare_func_creator comp_op_arg, bool is_all_arg,
104 PT_subquery *subselect_arg)
105 : super(pos),
106 left(left_arg),
107 comp_op(comp_op_arg),
108 is_all(is_all_arg),
109 subselect(subselect_arg) {}
110
111 bool do_itemize(Parse_context *pc, Item **res) override;
112};
113
116
119
120 public:
121 PTI_simple_ident_ident(const POS &pos, const LEX_CSTRING &ident_arg)
122 : super(pos), ident(ident_arg), raw(pos.raw) {}
123
124 bool do_itemize(Parse_context *pc, Item **res) override;
125};
126
127/**
128 Parse tree Item wrapper for 3-dimentional simple_ident-s
129*/
132
133 protected:
134 const char *db;
135 const char *table;
136 const char *field;
137
138 public:
139 PTI_simple_ident_q_3d(const POS &pos, const char *db_arg,
140 const char *table_arg, const char *field_arg)
141 : super(pos), db(db_arg), table(table_arg), field(field_arg) {}
142
143 bool do_itemize(Parse_context *pc, Item **res) override;
144};
145
146/**
147 Parse tree Item wrapper for 3-dimentional simple_ident-s
148*/
151
152 public:
153 PTI_simple_ident_q_2d(const POS &pos, const char *table_arg,
154 const char *field_arg)
155 : super(pos, nullptr, table_arg, field_arg) {}
156
157 bool do_itemize(Parse_context *pc, Item **res) override;
158};
159
162
164
165 public:
166 PTI_simple_ident_nospvar_ident(const POS &pos, const LEX_STRING &ident_arg)
167 : super(pos), ident(ident_arg) {}
168
169 bool do_itemize(Parse_context *pc, Item **res) override;
170};
171
174
175 public:
177 : super(pos, dec_arg) {}
178
179 bool do_itemize(Parse_context *pc, Item **res) override;
180};
181
184
186
187 public:
188 explicit PTI_function_call_nonkeyword_sysdate(const POS &pos, uint8 dec_arg)
189 : super(pos), dec(dec_arg) {}
190
191 bool do_itemize(Parse_context *pc, Item **res) override;
192};
193
196
200
201 public:
202 PTI_udf_expr(const POS &pos, Item *expr_arg,
203 const LEX_STRING &select_alias_arg,
204 const Symbol_location &expr_loc_arg)
205 : super(pos),
206 expr(expr_arg),
207 select_alias(select_alias_arg),
208 expr_loc(expr_loc_arg) {}
209
210 bool do_itemize(Parse_context *pc, Item **res) override;
211};
212
215
218
220
221 public:
223 const LEX_STRING &ident_arg,
224 PT_item_list *opt_udf_expr_list_arg)
225 : super(pos),
226 ident(ident_arg),
227 opt_udf_expr_list(opt_udf_expr_list_arg) {}
228
229 bool do_itemize(Parse_context *pc, Item **res) override;
230
231 protected:
232 void add_json_info(Json_object *obj) override {
233 obj->add_alias("func_name",
234 create_dom_ptr<Json_string>(ident.str, ident.length));
235 }
236};
237
238/**
239 Parse tree Item wrapper for 2-dimentional functional names (ex.: db.func_name)
240*/
243
247
248 public:
249 PTI_function_call_generic_2d(const POS &pos, const LEX_STRING &db_arg,
250 const LEX_STRING &func_arg,
251 PT_item_list *opt_expr_list_arg)
252 : super(pos),
253 db(db_arg),
254 func(func_arg),
255 opt_expr_list(opt_expr_list_arg) {}
256
257 bool do_itemize(Parse_context *pc, Item **res) override;
258
259 protected:
260 void add_json_info(Json_object *obj) override;
261};
262
265
266 protected:
269
270 PTI_text_literal(const POS &pos, bool is_7bit_arg,
271 const LEX_STRING &literal_arg)
272 : super(pos), is_7bit(is_7bit_arg), literal(literal_arg) {}
273};
274
277
278 public:
279 PTI_text_literal_text_string(const POS &pos, bool is_7bit_arg,
280 const LEX_STRING &literal_arg)
281 : super(pos, is_7bit_arg, literal_arg) {}
282
283 bool do_itemize(Parse_context *pc, Item **res) override;
284};
285
288
289 public:
290 PTI_text_literal_nchar_string(const POS &pos, bool is_7bit_arg,
291 const LEX_STRING &literal_arg)
292 : super(pos, is_7bit_arg, literal_arg) {}
293
294 bool do_itemize(Parse_context *pc, Item **res) override;
295};
296
299
301
302 public:
303 PTI_text_literal_underscore_charset(const POS &pos, bool is_7bit_arg,
304 const CHARSET_INFO *cs_arg,
305 const LEX_STRING &literal_arg)
306 : super(pos, is_7bit_arg, literal_arg), cs(cs_arg) {}
307
308 bool do_itemize(Parse_context *pc, Item **res) override {
309 if (super::do_itemize(pc, res)) return true;
310
314 set_cs_specified(true);
315 return false;
316 }
317};
318
321
323
324 public:
325 PTI_text_literal_concat(const POS &pos, bool is_7bit_arg,
326 PTI_text_literal *head_arg, const LEX_STRING &tail)
327 : super(pos, is_7bit_arg, tail), head(head_arg) {}
328
329 bool do_itemize(Parse_context *pc, Item **res) override;
330};
331
334
338
339 public:
340 PTI_temporal_literal(const POS &pos, const LEX_STRING &literal_arg,
341 enum_field_types field_type_arg,
342 const CHARSET_INFO *cs_arg)
343 : super(pos),
344 literal(literal_arg),
345 field_type(field_type_arg),
346 cs(cs_arg) {}
347
348 bool do_itemize(Parse_context *pc, Item **res) override;
349};
350
353
354 public:
356 const CHARSET_INFO *charset,
357 const LEX_STRING &literal)
358 : super(pos, null_name_string,
359 Item_hex_string::make_hex_str(literal.str, literal.length),
360 charset) {}
361
362 bool do_itemize(Parse_context *pc, Item **res) override {
363 if (super::do_itemize(pc, res)) return true;
364
366 set_cs_specified(true);
367 return check_well_formed_result(&str_value, true, true) == nullptr;
368 }
369};
370
373
374 public:
376 const CHARSET_INFO *charset,
377 const LEX_STRING &literal)
378 : super(pos, null_name_string,
379 Item_bin_string::make_bin_str(literal.str, literal.length),
380 charset) {}
381
382 bool do_itemize(Parse_context *pc, Item **res) override {
383 if (super::do_itemize(pc, res)) return true;
384
385 set_cs_specified(true);
386 return check_well_formed_result(&str_value, true, true) == nullptr;
387 }
388};
389
392
393 public:
394 PTI_variable_aux_set_var(const POS &pos, const LEX_STRING &var, Item *expr)
395 : super(pos, var, expr) {}
396
397 bool do_itemize(Parse_context *pc, Item **res) override;
398};
399
402
403 public:
404 PTI_user_variable(const POS &pos, const LEX_STRING &var) : super(pos, var) {}
405
406 bool do_itemize(Parse_context *pc, Item **res) override;
407};
408
409/**
410 Parse tree Item wrapper for 3-dimentional variable names
411
412 Example: \@global.default.x
413*/
416
417 public:
419 const POS &name_pos, const LEX_CSTRING &opt_prefix,
420 const LEX_CSTRING &name)
421 : super{pos},
422 m_scope{scope},
423 m_name_pos{name_pos},
424 m_opt_prefix{opt_prefix},
425 m_name{name} {}
426
427 bool do_itemize(Parse_context *pc, Item **res) override;
428
429 private:
434};
435
438
439 public:
441 : super(pos, (Item *)nullptr, w) {}
442
443 bool do_itemize(Parse_context *pc, Item **res) override;
444};
445
448
450
451 public:
452 PTI_in_sum_expr(const POS &pos, Item *expr_arg)
453 : super(pos), expr(expr_arg) {}
454
455 bool do_itemize(Parse_context *pc, Item **res) override;
456};
457
460
462
463 public:
464 PTI_singlerow_subselect(const POS &pos, PT_subquery *subselect_arg)
465 : super(pos), subselect(subselect_arg) {}
466
467 bool do_itemize(Parse_context *pc, Item **res) override;
468};
469
472
474
475 public:
476 PTI_exists_subselect(const POS &pos, PT_subquery *subselect_arg)
477 : super(pos), subselect(subselect_arg) {}
478
479 bool do_itemize(Parse_context *pc, Item **res) override;
480};
481
484
487
488 protected:
489 void add_json_info(Json_object *obj) override {
490 obj->add_alias("date_type",
491 create_dom_ptr<Json_string>(ident.str, ident.length));
492 }
493
494 public:
495 PTI_odbc_date(const POS &pos, const LEX_STRING &ident_arg, Item *expr_arg)
496 : super(pos), ident(ident_arg), expr(expr_arg) {}
497
498 bool do_itemize(Parse_context *pc, Item **res) override;
499};
500
503
507
508 public:
510 bool is_negation_arg, Item *right_arg)
511 : super(pos),
512 left(left_arg),
513 is_negation(is_negation_arg),
514 right(right_arg) {}
515
516 bool do_itemize(Parse_context *pc, Item **res) override;
517 void add_json_info(Json_object *obj) override {
518 obj->add_alias("negated", create_dom_ptr<Json_boolean>(is_negation));
519 }
520};
521
524
528
529 public:
530 PTI_expr_with_alias(const POS &pos, Item *expr_arg,
531 const Symbol_location &expr_loc_arg,
532 const LEX_CSTRING &alias_arg)
533 : super(pos), expr(expr_arg), expr_loc(expr_loc_arg), alias(alias_arg) {}
534
535 bool do_itemize(Parse_context *pc, Item **res) override;
536
537 protected:
538 void add_json_info(Json_object *obj) override;
539};
540
543
544 public:
546 : super(pos), m_location{pos}, m_name{name} {}
547
548 bool do_itemize(Parse_context *pc, Item **res) override;
549
550 private:
551 /// Location of the variable name.
553
554 /// Same data as in PTI_in_sum_expr#m_location but 0-terminated "for free".
556};
557
560
561 public:
563 : super{pos, name} {}
564
565 bool do_itemize(Parse_context *pc, Item **res) override;
566};
567
570
572
573 public:
575 Item_param *param_marker_arg)
576 : super(pos), param_marker(param_marker_arg) {}
577
578 bool do_itemize(Parse_context *pc, Item **res) override;
579};
580
585
586 protected:
587 PTI_context(const POS &pos, Item *expr_arg, enum_parsing_context place)
588 : super(pos), expr(expr_arg), m_parsing_place(place) {}
589
590 public:
591 bool do_itemize(Parse_context *pc, Item **res) override;
592};
593
594class PTI_where final : public PTI_context {
595 public:
596 PTI_where(const POS &pos, Item *expr_arg)
597 : PTI_context(pos, expr_arg, CTX_WHERE) {}
598};
599
600class PTI_having final : public PTI_context {
601 public:
602 PTI_having(const POS &pos, Item *expr_arg)
603 : PTI_context(pos, expr_arg, CTX_HAVING) {}
604};
605
606class PTI_qualify final : public PTI_context {
607 public:
608 PTI_qualify(const POS &pos, Item *expr_arg)
609 : PTI_context(pos, expr_arg, CTX_QUALIFY) {}
610};
611
612#endif /* PARSE_TREE_ITEMS_INCLUDED */
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
Definition: item.h:5775
Definition: item_func.h:3282
Definition: item_timefunc.h:1182
This class is used to implement operations like SET @variable or @variable:= expression.
Definition: item_func.h:3214
Definition: item.h:5724
Dynamic parameters used as placeholders ('?') inside prepared statements.
Definition: item.h:4757
Definition: item.h:5440
void set_cs_specified(bool cs_specified)
Set the value of m_cs_specified attribute.
Definition: item.h:5622
void init(const char *str, size_t length, const CHARSET_INFO *cs, Derivation dv, uint repertoire)
Definition: item.h:5448
void set_repertoire_from_value()
Definition: item.h:5556
Definition: item_sum.h:1065
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:933
String str_value
str_values's main purpose is to cache the value in save_in_field
Definition: item.h:3518
virtual bool do_itemize(Parse_context *pc, Item **res)
The core function that does the actual itemization.
Definition: item.cc:753
Bool_test
< Modifier for result transformation
Definition: item.h:1016
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:6479
Represents a JSON container value of type "object" (ECMA), type J_OBJECT here.
Definition: json_dom.h:367
bool add_alias(const std::string &key, Json_dom *value)
Insert the value into the object.
Definition: json_dom.h:409
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:732
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:630
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:528
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:606
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:636
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:682
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:706
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:713
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:644
Definition: parse_tree_items.h:606
PTI_qualify(const POS &pos, Item *expr_arg)
Definition: parse_tree_items.h:608
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:483
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:431
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:410
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:574
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:557
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:536
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:45
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_items.cc:503
Item * expr
Definition: parse_tree_items.h:48
PTI_truth_transform(const POS &pos, Item *expr_arg, Bool_test truth_test)
Definition: parse_tree_items.h:52
Parse_tree_item super
Definition: parse_tree_items.h:46
bool do_itemize(Parse_context *pc, Item **res) override
The core function that does the actual itemization.
Definition: parse_tree_items.cc:496
Bool_test truth_test
Definition: parse_tree_items.h:49
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:594
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:582
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:1749
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:230
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:1065
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
Inside HAVING condition.
Definition: parse_tree_node_base.h:76
@ CTX_QUALIFY
Inside QUALIFY condition.
Definition: parse_tree_node_base.h:77
@ CTX_WHERE
Inside WHERE condition.
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:181
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:419
Helper class for the MY_SQL_PARSER_LTYPE.
Definition: parse_location.h:31
Definition: sql_udf.h:43