MySQL 9.7.0
Source Code Documentation
parse_tree_nodes.h
Go to the documentation of this file.
1/* Copyright (c) 2013, 2026, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef PARSE_TREE_NODES_INCLUDED
25#define PARSE_TREE_NODES_INCLUDED
26
27#include <assert.h>
28#include <sys/types.h> // TODO: replace with cstdint
29
30#include <bit>
31#include <cctype> // std::isspace
32#include <cstddef>
33#include <memory>
34
35#include "lex_string.h"
36#include "my_alloc.h"
37#include "my_base.h"
38#include "my_inttypes.h" // TODO: replace with cstdint
39#include "my_list.h"
40#include "my_sqlcommand.h"
41#include "my_sys.h"
42#include "my_thread_local.h"
43#include "my_time.h"
44#include "mysqld_error.h"
45#include "sql/check_stack.h"
46#include "sql/enum_query_type.h"
47#include "sql/handler.h"
48#include "sql/key_spec.h"
49#include "sql/mem_root_array.h"
50#include "sql/opt_explain.h" // Sql_cmd_explain_other_thread
51#include "sql/parse_location.h"
52#include "sql/parse_tree_helpers.h" // PT_item_list
54#include "sql/parser_yystype.h"
55#include "sql/partition_info.h"
58#include "sql/set_var.h"
59#include "sql/sp_head.h"
60#include "sql/sql_admin.h" // Sql_cmd_shutdown etc.
61#include "sql/sql_alter.h"
62#include "sql/sql_check_constraint.h" // Sql_check_constraint_spec
63#include "sql/sql_cmd_srs.h"
64#include "sql/sql_exchange.h"
65#include "sql/sql_lex.h" // LEX
66#include "sql/sql_list.h"
67#include "sql/sql_load.h" // Sql_cmd_load_table
69#include "sql/sql_restart_server.h" // Sql_cmd_restart_server
70#include "sql/sql_tablespace.h" // Tablespace_options
71#include "sql/sql_truncate.h" // Sql_cmd_truncate_table
72#include "sql/table.h" // Common_table_expr
73#include "sql/tablesample.h"
74#include "sql/window_lex.h"
75#include "string_with_len.h"
76#include "thr_lock.h"
77
78class Item;
79class Item_cache;
83class PT_hint_list;
86class PT_partition;
87class PT_subquery;
88class PT_type;
89class PT_window_list;
90class Sql_cmd;
91class String;
92class THD;
93class Window;
94class sp_head;
95class sp_name;
96struct CHARSET_INFO;
97
98/**
99 @defgroup ptn Parse tree nodes
100 @ingroup Parser
101*/
102/**
103 @defgroup ptn_stmt Nodes representing SQL statements
104 @ingroup ptn
105*/
106/**
107 @defgroup ptn_create_table CREATE TABLE statement
108 @ingroup ptn_stmt
109*/
110/**
111 @defgroup ptn_alter_table ALTER TABLE statement
112 @ingroup ptn_stmt
113*/
114/**
115 @defgroup ptn_create_table_stuff Clauses of CREATE TABLE statement
116 @ingroup ptn_create_table
117*/
118/**
119 @defgroup ptn_partitioning CREATE/ALTER TABLE partitioning-related stuff
120 @ingroup ptn_create_table ptn_alter_table
121*/
122/**
123 @defgroup ptn_part_options Partition options in CREATE/ALTER TABLE
124 @ingroup ptn_partitioning
125*/
126/**
127 @defgroup ptn_create_or_alter_table_options Table options of CREATE/ALTER
128 TABLE
129 @anchor ptn_create_or_alter_table_options
130 @ingroup ptn_create_table ptn_alter_table
131*/
132/**
133 @defgroup ptn_col_types Column types in CREATE/ALTER TABLE
134 @ingroup ptn_create_table ptn_alter_table
135*/
136/**
137 @defgroup ptn_col_attrs Column attributes in CREATE/ALTER TABLE
138 @ingroup ptn_create_table ptn_alter_table
139*/
140/**
141 @defgroup ptn_not_gcol_attr Non-generated column attributes in CREATE/ALTER
142 TABLE
143 @ingroup ptn_col_attrs ptn_alter_table
144*/
145
146/**
147 Calls contextualize() on every node in the array.
148*/
149template <class Node_type, class Parse_context_type>
151 Parse_context_type *pc) {
152 for (Node_type *i : nodes)
153 if (i->contextualize(pc)) return true;
154 return false;
155}
156
157/**
158 Base class for all top-level nodes of SQL statements
159
160 @ingroup ptn_stmt
161*/
164 void operator=(const Parse_tree_root &) = delete;
165
166 protected:
167 Parse_tree_root() = default;
168 explicit Parse_tree_root(const POS &pos) : m_pos(pos) {}
169 virtual ~Parse_tree_root() = default;
170
171 public:
172 /// Textual location of a token just parsed.
174
175 virtual Sql_cmd *make_cmd(THD *thd) = 0;
176
177 // Return Json parse tree generated by SHOW PARSE_TREE.
178 virtual std::string get_printable_parse_tree(THD *thd [[maybe_unused]]) {
179 my_error(ER_NOT_SUPPORTED_YET, MYF(0),
180 "Parse tree display of this statement");
181 return "";
182 }
183};
184
186 public:
189
190 ~PT_table_ddl_stmt_base() override = 0; // force abstract class
191
192 protected:
194};
195
197
198/**
199 Parse context for the table DDL (ALTER TABLE and CREATE TABLE) nodes.
200
201 For internal use in the contextualization code.
202*/
204 Table_ddl_parse_context(THD *thd_arg, Query_block *select_arg,
209};
210
211/**
212 Base class for all table DDL (ALTER TABLE and CREATE TABLE) nodes.
213*/
215
216class PT_order_expr : public Parse_tree_node, public ORDER {
218
219 public:
220 PT_order_expr(const POS &pos, Item *item_arg, enum_order dir) : super(pos) {
221 item_initial = item_arg;
223 }
224
225 bool do_contextualize(Parse_context *pc) override;
226
227 protected:
228 void add_json_info(Json_object *obj) override {
229 obj->add_alias("desc",
230 create_dom_ptr<Json_boolean>(direction == ORDER_DESC));
231 }
232};
233
236
237 public:
239
240 public:
241 explicit PT_order_list(const POS &pos) : super(pos) {}
242
243 bool do_contextualize(Parse_context *pc) override {
244 if (super::do_contextualize(pc)) return true;
245 for (ORDER *o = value.first; o != nullptr; o = o->next) {
246 if (static_cast<PT_order_expr *>(o)->contextualize(pc)) return true;
247 }
248 return false;
249 }
250
252 order->used_alias = nullptr;
253 order->used = 0;
254 value.link_in_list(order, &order->next);
255 }
256};
257
260
261 public:
262 explicit PT_gorder_list(const POS &pos) : super(pos) {}
263
264 bool do_contextualize(Parse_context *pc) override {
265 return super::do_contextualize(pc);
266 }
267};
268
269/**
270 Represents an element of the WITH list:
271 WITH [...], [...] SELECT ...,
272 ^ or ^
273 i.e. a Common Table Expression (CTE, or Query Name in SQL99 terms).
274*/
277
278 public:
279 explicit PT_common_table_expr(const POS &pos, const LEX_STRING &name,
280 const LEX_STRING &subq_text,
281 uint subq_text_offset, PT_subquery *sn,
284
285 /// The name after AS
286 const LEX_STRING &name() const { return m_name; }
287 /**
288 @param thd Thread handler
289 @param[out] node PT_subquery
290 @returns a PT_subquery to attach to a table reference for this CTE
291 */
292 bool make_subquery_node(THD *thd, PT_subquery **node);
293 /**
294 @param tl Table reference to match
295 @param in_self If this is a recursive reference
296 @param[out] found Is set to true/false if matches or not
297 @returns true if error
298 */
299 bool match_table_ref(Table_ref *tl, bool in_self, bool *found);
300 /**
301 @returns true if 'other' is the same instance as 'this'
302 */
303 bool is(const Common_table_expr *other) const {
304 return other == &m_postparse;
305 }
306 void print(const THD *thd, String *str, enum_query_type query_type);
307 bool do_contextualize(Parse_context *pc) override;
308
309 protected:
310 void add_json_info(Json_object *obj) override;
311
312 private:
314 /// Raw text of query expression (including parentheses)
316 /**
317 Offset in bytes of m_subq_text in original statement which had the WITH
318 clause.
319 */
321 /// Parsed version of subq_text
323 /// List of explicitly specified column names; if empty, no list.
325 /**
326 A Table_ref representing a CTE needs access to the WITH list
327 element it derives from. However, in order to:
328 - limit the members which Table_ref can access
329 - avoid including this header file everywhere Table_ref needs to
330 access these members, these members are relocated into a separate inferior
331 object whose declaration is in table.h, like that of Table_ref. It's
332 the "postparse" part. Table_ref accesses this inferior object only.
333 */
335
337};
338
339/**
340 Represents the WITH list.
341 WITH [...], [...] SELECT ...,
342 ^^^^^^^^^^^^
343*/
346
347 public:
348 /// @param pos Position of this clause in the SQL statement.
349 /// @param mem_root where interior objects are allocated
350 explicit PT_with_list(const POS &pos, MEM_ROOT *mem_root)
351 : super(pos), m_elements(mem_root) {}
354 return m_elements;
355 }
356
357 private:
359};
360
361/**
362 Represents the WITH clause:
363 WITH [...], [...] SELECT ...,
364 ^^^^^^^^^^^^^^^^^
365*/
368
369 public:
370 PT_with_clause(const POS &pos, const PT_with_list *l, bool r)
371 : super(pos),
372 m_list(l),
373 m_recursive(r),
375
376 bool do_contextualize(Parse_context *pc) override;
377
378 /**
379 Looks up a table reference into the list of CTEs.
380 @param tl Table reference to look up
381 @param[out] found Is set to true/false if found or not
382 @returns true if error
383 */
384 bool lookup(Table_ref *tl, PT_common_table_expr **found);
385 /**
386 Call this to record in the WITH clause that we are contextualizing the
387 CTE definition inserted in table reference 'tl'.
388 @returns information which the caller must provide to
389 leave_parsing_definition().
390 */
392 auto old = m_most_inner_in_parsing;
394 return old;
395 }
398 }
399 void print(const THD *thd, String *str, enum_query_type query_type);
400
401 protected:
402 void add_json_info(Json_object *obj) override {
403 obj->add_alias("recursive", create_dom_ptr<Json_boolean>(m_recursive));
404 }
405
406 private:
407 /// All CTEs of this clause
408 const PT_with_list *const m_list;
409 /// True if the user has specified the RECURSIVE keyword.
410 const bool m_recursive;
411 /**
412 The innermost CTE reference which we're parsing at the
413 moment. Used to detect forward references, loops and recursiveness.
414 */
416
418};
419
422
423 public:
424 explicit PT_select_item_list(const POS &pos) : super(pos) {}
425
426 bool do_contextualize(Parse_context *pc) override;
427};
428
431
433
434 protected:
435 void add_json_info(Json_object *obj) override {
436 obj->add_alias("is_offset_first",
437 create_dom_ptr<Json_boolean>(limit_options.is_offset_first));
438 }
439
440 public:
441 PT_limit_clause(const POS &pos, const Limit_options &limit_options_arg)
442 : super(pos), limit_options(limit_options_arg) {}
443
444 bool do_contextualize(Parse_context *pc) override;
446};
447
448class PT_cross_join;
449class PT_joined_table;
450
452 public:
453 explicit PT_table_reference(const POS &pos) : Parse_tree_node(pos) {}
454
456
457 /**
458 Lets us build a parse tree top-down, which is necessary due to the
459 context-dependent nature of the join syntax. This function adds
460 the @<table_ref@> cross join as the left-most leaf in this join tree
461 rooted at this node.
462
463 @todo: comment on non-join PT_table_reference objects
464
465 @param cj This @<table ref@> will be added if it represents a cross join.
466
467 @return The new top-level join.
468 */
470};
471
474
477 const char *const opt_table_alias;
480
481 public:
482 PT_table_factor_table_ident(const POS &pos, Table_ident *table_ident_arg,
483 List<String> *opt_use_partition_arg,
484 const LEX_CSTRING &opt_table_alias_arg,
485 List<Index_hint> *opt_key_definition_arg,
486 PT_tablesample *opt_tablesample_arg)
487 : super(pos),
488 table_ident(table_ident_arg),
489 opt_use_partition(opt_use_partition_arg),
490 opt_table_alias(opt_table_alias_arg.str),
491 opt_key_definition(opt_key_definition_arg),
492 opt_tablesample(opt_tablesample_arg) {}
493
494 protected:
495 bool do_contextualize(Parse_context *pc) override;
496 void add_json_info(Json_object *obj) override;
497};
498
500 protected:
501 explicit PT_json_table_column(const POS &pos) : Parse_tree_node(pos) {}
502
503 public:
505};
506
509
510 public:
513 const LEX_STRING &table_alias)
514 : super(pos),
515 m_expr(expr),
516 m_path(path),
517 m_nested_columns(nested_cols),
518 m_table_alias(table_alias) {}
519
520 bool do_contextualize(Parse_context *pc) override;
521
522 private:
527};
528
531
533
534 public:
537 : super(pos), table_list(table_list) {}
538
539 bool do_contextualize(Parse_context *pc) override;
540};
541
544
545 public:
546 PT_derived_table(const POS &pos, bool lateral, PT_subquery *subquery,
547 const LEX_CSTRING &table_alias,
549
550 bool do_contextualize(Parse_context *pc) override;
551
552 protected:
553 void add_json_info(Json_object *obj) override;
554
555 private:
558 const char *const m_table_alias;
559 /// List of explicitly specified column names; if empty, no list.
561};
562
565
566 public:
568 : super(pos), m_joined_table(joined_table) {}
569
570 bool do_contextualize(Parse_context *pc) override;
571
572 private:
574};
575
578
579 protected:
584
587
588 public:
589 PT_joined_table(const POS &pos, PT_table_reference *tab1_node_arg,
590 const POS &join_pos_arg, PT_joined_table_type type,
591 PT_table_reference *tab2_node_arg)
592 : super(pos),
593 m_left_pt_table(tab1_node_arg),
594 m_join_pos(join_pos_arg),
595 m_type(type),
596 m_right_pt_table(tab2_node_arg) {
597 using std::has_single_bit;
598 static_assert(has_single_bit(unsigned{JTT_INNER}), "not a single bit");
599 static_assert(has_single_bit(unsigned{JTT_STRAIGHT}), "not a single bit");
600 static_assert(has_single_bit(unsigned{JTT_NATURAL}), "not a single bit");
601 static_assert(has_single_bit(unsigned{JTT_LEFT}), "not a single bit");
602 static_assert(has_single_bit(unsigned{JTT_RIGHT}), "not a single bit");
603
604 assert(type == JTT_INNER || type == JTT_STRAIGHT_INNER ||
607 }
608
609 /**
610 Adds the cross join to this join operation. The cross join is nested as
611 the table reference on the left-hand side.
612 */
615 return this;
616 }
617
618 /// Adds the table reference as the right-hand side of this join.
620 assert(m_right_pt_table == nullptr);
622 }
623
624 bool do_contextualize(Parse_context *pc) override;
625
626 /// This class is being inherited, it should thus be abstract.
627 ~PT_joined_table() override = 0;
628
629 protected:
631 void add_json_info(Json_object *obj) override;
632};
633
634inline PT_joined_table::~PT_joined_table() = default;
635
638
639 public:
640 PT_cross_join(const POS &pos, PT_table_reference *tab1_node_arg,
641 const POS &join_pos_arg, PT_joined_table_type Type_arg,
642 PT_table_reference *tab2_node_arg)
643 : PT_joined_table(pos, tab1_node_arg, join_pos_arg, Type_arg,
644 tab2_node_arg) {}
645
646 bool do_contextualize(Parse_context *pc) override;
647};
648
652
653 public:
654 PT_joined_table_on(const POS &pos, PT_table_reference *tab1_node_arg,
655 const POS &join_pos_arg, PT_joined_table_type type,
656 PT_table_reference *tab2_node_arg, Item *on_arg)
657 : super(pos, tab1_node_arg, join_pos_arg, type, tab2_node_arg),
658 on(on_arg) {}
659
660 bool do_contextualize(Parse_context *pc) override;
661};
662
666
667 public:
668 PT_joined_table_using(const POS &pos, PT_table_reference *tab1_node_arg,
669 const POS &join_pos_arg, PT_joined_table_type type,
670 PT_table_reference *tab2_node_arg,
671 List<String> *using_fields_arg)
672 : super(pos, tab1_node_arg, join_pos_arg, type, tab2_node_arg),
673 using_fields(using_fields_arg) {}
674
675 /// A PT_joined_table_using without a list of columns denotes a natural join.
676 PT_joined_table_using(const POS &pos, PT_table_reference *tab1_node_arg,
677 const POS &join_pos_arg, PT_joined_table_type type,
678 PT_table_reference *tab2_node_arg)
679 : PT_joined_table_using(pos, tab1_node_arg, join_pos_arg, type,
680 tab2_node_arg, nullptr) {}
681
682 bool do_contextualize(Parse_context *pc) override;
683
684 protected:
685 void add_json_info(Json_object *obj) override;
686};
687
688/*
689 PT_tablesample - parse tree node
690
691 Information contained in TABLESAMPLE clause is here.
692*/
695
696 public:
699
700 PT_tablesample(const POS &pos, tablesample_type tablesample_type_arg,
701 Item *sample_percentage)
702 : super(pos),
703 m_sampling_type(tablesample_type_arg),
704 m_sample_percentage(sample_percentage) {}
705};
706
707class PT_group : public Parse_tree_node {
709
712
713 protected:
714 void add_json_info(Json_object *obj) override {
715 if (olap == ROLLUP_TYPE)
716 obj->add_alias("olap_options", create_dom_ptr<Json_string>("ROLLUP"));
717 // Only rollup type supported.
718 }
719
720 public:
722 olap_type olap_arg)
723 : super(pos), group_list(group_list_arg), olap(olap_arg) {}
724
725 bool do_contextualize(Parse_context *pc) override;
726
728
729 bool set_num_grouping_sets(Parse_context *pc, int &num_grouping_sets);
730
732 int num_grouping_sets);
733
734 /**
735 Initializes the grouping set if the query block includes GROUP BY
736 modifiers.
737 */
738 bool allocate_grouping_sets(Parse_context *pc, int &num_grouping_sets);
739
740 /**
741 Populates the grouping sets if the query block includes non-primitive
742 grouping.
743 */
745
746 /**
747 Populate the grouping set bitvector if the query block has non-primitive
748 ROLLUP and CUBE grouping.
749 */
751
752 /**
753 Populate the grouping set bitvector if the query block has GROUPING SETS
754 group by modifier.
755 */
757};
758
759class PT_order : public Parse_tree_node {
761
762 public:
764 explicit PT_order(const POS &pos, PT_order_list *order_list_arg)
765 : super(pos), order_list(order_list_arg) {}
766
767 bool do_contextualize(Parse_context *pc) override;
768};
769
771 public:
772 PT_locking_clause(const POS &pos, Lock_strength strength,
774 : Parse_tree_node(pos),
775 m_lock_strength(strength),
777
778 bool do_contextualize(Parse_context *pc) final;
779
780 virtual bool set_lock_for_tables(Parse_context *pc) = 0;
781
783
784 protected:
786 thr_lock_type lock_type = TL_IGNORE;
787 switch (m_lock_strength) {
789 lock_type = TL_WRITE;
790 break;
792 lock_type = TL_READ_WITH_SHARED_LOCKS;
793 break;
794 }
795
796 return {lock_type, static_cast<thr_locked_row_action>(action())};
797 }
798
799 private:
802};
803
805 public:
807 const POS &pos, Lock_strength strength,
809 : PT_locking_clause(pos, strength, action) {}
810
811 bool set_lock_for_tables(Parse_context *pc) override;
812};
813
815 public:
817
821 : PT_locking_clause(pos, strength, action), m_tables(tables) {}
822
823 bool set_lock_for_tables(Parse_context *pc) override;
824
825 private:
826 bool raise_error(THD *thd, const Table_ident *name, int error);
827
828 bool raise_error(int error);
829
831};
832
834 public:
836 : Parse_tree_node(pos) {
838 }
839
840 bool push_back(PT_locking_clause *locking_clause) {
841 return m_locking_clauses.push_back(locking_clause);
842 }
843
844 bool do_contextualize(Parse_context *pc) override {
845 for (auto locking_clause : m_locking_clauses)
846 if (locking_clause->contextualize(pc)) return true;
847 return false;
848 }
849
850 private:
852};
853
855 public:
856 explicit PT_query_expression_body(const POS &pos) : Parse_tree_node(pos) {}
858 virtual Setop_type type() const { return NONE; }
859 virtual bool is_set_operation() const = 0;
860 /**
861 True if this query expression can absorb an extraneous order by/limit
862 clause. The `ORDER BY`/`LIMIT` syntax is mostly consistestent, i.e. a
863 trailing clause may not refer to the tables in the `<query primary>`, with
864 one glaring exception:
865
866 (...( SELECT ... )...) ORDER BY ...
867
868 If the nested query expression doesn't contain `ORDER BY`, the statement
869 is interpreted as if the `ORDER BY` was absorbed by the innermost query
870 expression, i.e.:
871
872 (...( SELECT ... ORDER BY ... )...)
873
874 There is no rewriting of the parse tree nor AST happening here, the
875 transformation is done by the contextualizer (see
876 PT_query_expression::contextualize_order_and_limit), which interprets the
877 parse tree, and builds the AST according to this interpretation. This
878 interpretation is governed by the following rule: An `ORDER BY` can be
879 absorbed if none the nested query expressions contains an `ORDER BY` *or*
880 `LIMIT`. The rule is complex, so here are some examples for illustration:
881
882 In these cases the `ORDER BY` *is* absorbed:
883
884 ( SELECT * FROM t1 ) ORDER BY t1.a;
885 (( SELECT * FROM t1 )) ORDER BY t1.a;
886
887 In these cases the ORDER BY is *not* absorbed:
888
889 ( SELECT * FROM t1 ORDER BY 1 ) ORDER BY t1.a;
890 (( SELECT * FROM t1 ) ORDER BY 1 ) ORDER BY t1.a;
891 ( SELECT * FROM t1 LIMIT 1 ) ORDER BY t1.a;
892 (( SELECT * FROM t1 ) LIMIT 1 ) ORDER BY t1.a;
893
894 The same happens with `LIMIT`, obviously, but the optimizer is freeer to
895 choose when to apply the limit, and there are name no resolution issues
896 involved.
897
898 @param order True if the outer query block has the ORDER BY clause.
899 @param limit True if the outer query block has the LIMIT clause.
900 */
901 virtual bool can_absorb_order_and_limit(bool order, bool limit) const = 0;
902 virtual bool has_into_clause() const = 0;
903 virtual bool has_trailing_into_clause() const = 0;
904
905 virtual bool is_table_value_constructor() const = 0;
907};
908
911
912 public:
913 PT_set_scoped_system_variable(const POS &pos, const POS &var_pos,
914 const LEX_CSTRING &opt_prefix,
915 const LEX_CSTRING &name, Item *opt_expr)
916 : super(pos),
917 m_varpos(var_pos),
918 m_opt_prefix{opt_prefix},
919 m_name{name},
920 m_opt_expr{opt_expr} {}
921
922 bool do_contextualize(Parse_context *pc) override;
923
924 private:
929};
930
932 protected:
934 : Parse_tree_node(pos) {}
935};
936
939
940 public:
941 PT_set_variable(const POS &pos, const POS &varpos,
942 const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name,
943 const POS &expr_pos, Item *opt_expr)
944 : super{pos},
945 m_varpos{varpos},
946 m_opt_prefix{opt_prefix},
947 m_name{name},
948 m_expr_pos{expr_pos},
949 m_opt_expr{opt_expr} {}
950
951 bool do_contextualize(Parse_context *pc) override;
952
953 private:
959};
960
964
967
968 public:
970 const LEX_STRING &name_arg,
971 Item *expr_arg)
972 : super(pos), name(name_arg), expr(expr_arg) {}
973
974 bool do_contextualize(Parse_context *pc) override;
975};
976
979
980 public:
982 const POS &name_pos, const LEX_CSTRING &opt_prefix,
983 const LEX_CSTRING &name, Item *opt_expr)
984 : super(pos),
985 m_scope{scope},
986 m_name_pos{name_pos},
987 m_opt_prefix{opt_prefix},
988 m_name{name},
989 m_opt_expr{opt_expr} {}
990
991 bool do_contextualize(Parse_context *pc) override;
992
993 private:
999};
1000
1004
1006
1007 public:
1009 const CHARSET_INFO *opt_charset_arg)
1010 : super(pos), opt_charset(opt_charset_arg) {}
1011
1012 bool do_contextualize(Parse_context *pc) override;
1013};
1014
1018
1020
1021 public:
1023 const POS &error_pos)
1024 : super(pos), m_error_pos(error_pos) {}
1025
1026 bool do_contextualize(Parse_context *pc) override;
1027};
1028
1031
1034
1035 public:
1036 PT_set_names(const POS &pos, const CHARSET_INFO *opt_charset_arg,
1037 const CHARSET_INFO *opt_collation_arg)
1038 : super(pos),
1039 opt_charset(opt_charset_arg),
1040 opt_collation(opt_collation_arg) {}
1041
1042 bool do_contextualize(Parse_context *pc) override;
1043};
1044
1046 protected:
1047 explicit PT_start_option_value_list(const POS &pos) : Parse_tree_node(pos) {}
1048};
1049
1053
1054 const char *password;
1055 const char *current_password;
1059
1060 public:
1062 const char *password_arg,
1063 const char *current_password_arg,
1064 bool retain_current,
1065 bool random_password,
1066 const POS &expr_pos_arg)
1067 : super(pos),
1068 password(password_arg),
1069 current_password(current_password_arg),
1070 retain_current_password(retain_current),
1071 random_password_generator(random_password),
1072 expr_pos(expr_pos_arg) {}
1073
1074 bool do_contextualize(Parse_context *pc) override;
1075};
1076
1080
1082 const char *password;
1083 const char *current_password;
1087
1088 public:
1090 const POS &pos, LEX_USER *user_arg, const char *password_arg,
1091 const char *current_password_arg, bool retain_current, bool random_pass,
1092 const POS &expr_pos_arg)
1093 : super(pos),
1094 user(user_arg),
1095 password(password_arg),
1096 current_password(current_password_arg),
1097 retain_current_password(retain_current),
1098 random_password_generator(random_pass),
1099 expr_pos(expr_pos_arg) {}
1100
1101 bool do_contextualize(Parse_context *pc) override;
1102};
1103
1106
1109
1110 public:
1113 : super(pos), type(type_arg), value(value_arg) {}
1114
1115 bool do_contextualize(Parse_context *pc) override;
1116};
1117
1120
1124
1125 public:
1126 PT_option_value_list_head(const POS &pos, const POS &delimiter_pos_arg,
1127 Parse_tree_node *value_arg,
1128 const POS &value_pos_arg)
1129 : super(pos),
1130 delimiter_pos(delimiter_pos_arg),
1131 value(value_arg),
1132 value_pos(value_pos_arg) {}
1133
1134 bool do_contextualize(Parse_context *pc) override;
1135};
1136
1139
1141
1142 public:
1144 const POS &delimiter_pos_arg, Parse_tree_node *tail,
1145 const POS &tail_pos)
1146 : super(pos, delimiter_pos_arg, tail, tail_pos), head(head_arg) {}
1147
1148 bool do_contextualize(Parse_context *pc) override {
1149 uchar dummy;
1150 if (check_stack_overrun(pc->thd, STACK_MIN_SIZE, &dummy)) return true;
1151 return head->contextualize(pc) || super::do_contextualize(pc);
1152 }
1153};
1154
1157
1161
1162 public:
1165 const POS &head_pos_arg,
1166 PT_option_value_list_head *tail_arg)
1167 : super(pos), head(head_arg), head_pos(head_pos_arg), tail(tail_arg) {}
1168
1169 bool do_contextualize(Parse_context *pc) override;
1170};
1171
1174
1175 const char *name;
1177
1178 public:
1179 PT_transaction_characteristic(const POS &pos, const char *name_arg,
1180 int32 value_arg)
1181 : super(pos), name(name_arg), value(value_arg) {}
1182
1183 bool do_contextualize(Parse_context *pc) override;
1184};
1185
1188
1189 public:
1190 explicit PT_transaction_access_mode(const POS &pos, bool is_read_only)
1191 : super(pos, "transaction_read_only", (int32)is_read_only) {}
1192};
1193
1196
1197 public:
1198 explicit PT_isolation_level(const POS &pos, enum_tx_isolation level)
1199 : super(pos, "transaction_isolation", (int32)level) {}
1200};
1201
1204
1207
1208 public:
1211 PT_transaction_characteristic *opt_tail_arg)
1212 : super(pos), head(head_arg), opt_tail(opt_tail_arg) {}
1213
1214 bool do_contextualize(Parse_context *pc) override {
1215 return (super::do_contextualize(pc) || head->contextualize(pc) ||
1216 (opt_tail != nullptr && opt_tail->contextualize(pc)));
1217 }
1218};
1219
1223
1226
1227 public:
1229 const POS &pos, PT_transaction_characteristics *characteristics_arg,
1230 const POS &end_pos_arg)
1231 : super(pos),
1232 characteristics(characteristics_arg),
1233 end_pos(end_pos_arg) {}
1234
1235 bool do_contextualize(Parse_context *pc) override;
1236};
1237
1239 : public Parse_tree_node {
1240 protected:
1242 : Parse_tree_node(pos) {}
1243};
1244
1248
1252
1253 public:
1255 const POS &pos, PT_set_scoped_system_variable *head_arg,
1256 const POS &head_pos_arg, PT_option_value_list_head *opt_tail_arg)
1257 : super(pos),
1258 head(head_arg),
1259 head_pos(head_pos_arg),
1260 opt_tail(opt_tail_arg) {}
1261
1262 bool do_contextualize(Parse_context *pc) override;
1263};
1264
1268
1271
1272 public:
1274 const POS &pos, PT_transaction_characteristics *characteristics_arg,
1275 const POS &characteristics_pos_arg)
1276 : super(pos),
1277 characteristics(characteristics_arg),
1278 characteristics_pos(characteristics_pos_arg) {}
1279
1280 bool do_contextualize(Parse_context *pc) override;
1281};
1282
1285
1288
1289 public:
1291 const POS &pos, enum_var_type type_arg,
1293 : super(pos), type(type_arg), list(list_arg) {}
1294
1295 bool do_contextualize(Parse_context *pc) override;
1296};
1297
1298class PT_set : public Parse_tree_node {
1300
1303
1304 public:
1305 PT_set(const POS &pos, const POS &set_pos_arg,
1307 : super(pos), set_pos(set_pos_arg), list(list_arg) {}
1308
1309 bool do_contextualize(Parse_context *pc) override;
1310};
1311
1314
1315 protected:
1316 explicit PT_into_destination(const POS &pos) : super(pos) {}
1317
1318 public:
1319 bool do_contextualize(Parse_context *pc) override;
1320};
1321
1324
1325 public:
1326 PT_into_destination_outfile(const POS &pos, const LEX_STRING &file_name_arg,
1328 const Field_separators *field_term_arg,
1329 const Line_separators *line_term_arg,
1330 enum_destination dumpfile_flag)
1331 : PT_into_destination(pos),
1332 m_exchange(file_name_arg.str, dumpfile_flag),
1333 dumpfile_dest(dumpfile_flag) {
1335 m_exchange.field.merge_field_separators(field_term_arg);
1336 m_exchange.line.merge_line_separators(line_term_arg);
1337 }
1338
1340 enum_destination dumpfile_flag)
1341 : PT_into_destination(pos),
1342 m_exchange(dumpfile_flag),
1343 dumpfile_dest(dumpfile_flag) {
1344 m_exchange.outfile_json = attr;
1345 }
1346
1349 const Field_separators *field_term_arg,
1350 const Line_separators *line_term_arg,
1351 enum_destination dumpfile_flag)
1352 : PT_into_destination(pos),
1353 m_exchange(dumpfile_flag),
1354 dumpfile_dest(dumpfile_flag) {
1356 m_exchange.field.merge_field_separators(field_term_arg);
1357 m_exchange.line.merge_line_separators(line_term_arg);
1359 }
1360
1361 bool do_contextualize(Parse_context *pc) override;
1362
1363 private:
1366};
1367
1370
1371 public:
1372 PT_into_destination_dumpfile(const POS &pos, const LEX_STRING &file_name_arg)
1373 : PT_into_destination(pos),
1374 m_exchange(file_name_arg.str, DUMPFILE_DEST) {}
1375
1376 bool do_contextualize(Parse_context *pc) override;
1377
1378 private:
1380};
1381
1383 public:
1385
1386 explicit PT_select_var(const POS &pos, const LEX_STRING &name_arg)
1387 : Parse_tree_node(pos), name(name_arg) {}
1388
1389 virtual bool is_local() const { return false; }
1390 virtual uint get_offset() const {
1391 assert(0);
1392 return 0;
1393 }
1394};
1395
1398
1399 uint offset = 0;
1400
1401#ifndef NDEBUG
1402 /*
1403 Routine to which this Item_splocal belongs. Used for checking if correct
1404 runtime context is used for variable handling.
1405 */
1406 sp_head *sp = nullptr;
1407#endif
1408
1409 public:
1410 PT_select_sp_var(const POS &pos, const LEX_STRING &name_arg)
1411 : super(pos, name_arg) {}
1412
1413 bool is_local() const override { return true; }
1414 uint get_offset() const override { return offset; }
1415
1416 bool do_contextualize(Parse_context *pc) override;
1417};
1418
1421
1422 public:
1423 explicit PT_select_var_list(const POS &pos) : PT_into_destination(pos) {}
1424
1426
1427 bool do_contextualize(Parse_context *pc) override;
1428
1429 bool push_back(PT_select_var *var) { return value.push_back(var); }
1430};
1431
1432/**
1433 Parse tree node for a single of a window extent's borders,
1434 cf. <window frame extent> in SQL 2003.
1435*/
1437 friend class Window;
1438 Item *m_value{nullptr}; ///< only relevant iff m_border_type == WBT_VALUE_*
1439 public:
1441 const bool m_date_time;
1442 interval_type m_int_type = INTERVAL_LAST; // clang-tidy needs initialization.
1443
1444 ///< For unbounded border
1448 }
1449
1450 ///< For bounded non-temporal border, e.g. 2 PRECEDING: 'value' is 2.
1452 : Parse_tree_node(pos),
1453 m_value(value),
1455 m_date_time(false) {}
1456
1457 ///< For bounded INTERVAL 2 DAYS, 'value' is 2, int_type is DAYS.
1459 interval_type int_type)
1460 : Parse_tree_node(pos),
1461 m_value(value),
1463 m_date_time(true),
1464 m_int_type(int_type) {}
1465
1466 ///< @returns the '2' in '2 PRECEDING' or 'INTERVAL 2 DAYS PRECEDING'
1467 Item *border() const { return m_value; }
1468 /// Need such low-level access so that fix_fields updates the right pointer
1469 Item **border_ptr() { return &m_value; }
1470
1471 /**
1472 @returns Addition operator for computation of frames, nullptr if error.
1473 @param order_expr Expression to add to/subtract from
1474 @param prec true if PRECEDING
1475 @param asc true if ASC
1476 @param window only used for error generation
1477 */
1478 Item *build_addop(Item_cache *order_expr, bool prec, bool asc,
1479 const Window *window);
1480
1481 bool do_contextualize(Parse_context *pc) override;
1482};
1483
1484/**
1485 Parse tree node for one or both of a window extent's borders, cf.
1486 <window frame extent> in SQL 2003.
1487*/
1490 friend class PT_frame;
1491
1492 public:
1493 /**
1494 Constructor.
1495
1496 Frames of the form "frame_start no_frame_end" are translated during
1497 parsing to "BETWEEN frame_start AND CURRENT ROW". So both 'start' and
1498 'end' are non-nullptr.
1499 */
1501 : Parse_tree_node(pos) {
1502 m_borders[0] = start;
1503 m_borders[1] = end;
1504 }
1505};
1506
1507/**
1508 Parse tree node for a window frame's exclusions, cf. the
1509 <window frame exclusion> clause in SQL 2003.
1510*/
1513
1514 public:
1516 : Parse_tree_node(pos), m_exclusion(e) {}
1517 // enum_window_frame_exclusion exclusion() { return m_exclusion; }
1518};
1519
1520/**
1521 Parse tree node for a window's frame, cf. the <window frame clause>
1522 in SQL 2003.
1523*/
1525 public:
1527
1530
1532
1533 /// If true, this is an artificial frame, not specified by the user
1535
1536 PT_frame(const POS &pos, enum_window_frame_unit unit, PT_borders *from_to,
1537 PT_exclusion *exclusion)
1538 : Parse_tree_node(pos),
1539 m_query_expression(unit),
1540 m_from(from_to->m_borders[0]),
1541 m_to(from_to->m_borders[1]),
1542 m_exclusion(exclusion) {}
1543
1544 bool do_contextualize(Parse_context *pc) override;
1545};
1546
1548 protected:
1549 explicit PT_query_primary(const POS &pos) : PT_query_expression_body(pos) {}
1550};
1551
1554
1566
1567 public:
1569 const POS &pos, PT_hint_list *opt_hints_arg,
1570 const Query_options &options_arg, PT_item_list *item_list_arg,
1571 PT_into_destination *opt_into1_arg,
1572 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg,
1573 Item *opt_where_clause_arg, PT_group *opt_group_clause_arg,
1574 Item *opt_having_clause_arg, PT_window_list *opt_window_clause_arg,
1575 Item *opt_qualify_clause_arg, bool implicit_from_clause)
1576 : super(pos),
1577 opt_hints(opt_hints_arg),
1578 options(options_arg),
1579 item_list(item_list_arg),
1580 opt_into1(opt_into1_arg),
1581 m_is_from_clause_implicit{implicit_from_clause},
1582 from_clause(from_clause_arg),
1583 opt_where_clause(opt_where_clause_arg),
1584 opt_group_clause(opt_group_clause_arg),
1585 opt_having_clause(opt_having_clause_arg),
1586 opt_window_clause(opt_window_clause_arg),
1587 opt_qualify_clause(opt_qualify_clause_arg) {
1588 assert(implicit_from_clause ? from_clause.empty() : true);
1589 }
1590
1592 const POS &pos, const Query_options &options_arg,
1593 PT_item_list *item_list_arg,
1594 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg,
1595 Item *opt_where_clause_arg)
1596 : super(pos),
1598 options(options_arg),
1599 item_list(item_list_arg),
1602 from_clause(from_clause_arg),
1603 opt_where_clause(opt_where_clause_arg),
1608
1609 PT_query_specification(const POS &pos, const Query_options &options_arg,
1610 PT_item_list *item_list_arg)
1611 : super(pos),
1613 options(options_arg),
1614 item_list(item_list_arg),
1617 from_clause{},
1623
1624 bool do_contextualize(Parse_context *pc) override;
1625
1626 bool has_into_clause() const override { return opt_into1 != nullptr; }
1627 bool has_trailing_into_clause() const override {
1629 opt_where_clause == nullptr && opt_group_clause == nullptr &&
1630 opt_having_clause == nullptr && opt_window_clause == nullptr &&
1631 opt_qualify_clause == nullptr);
1632 }
1633
1634 bool is_set_operation() const override { return false; }
1635
1636 bool can_absorb_order_and_limit(bool, bool) const override { return true; }
1637
1638 bool is_table_value_constructor() const override { return false; }
1639 PT_insert_values_list *get_row_value_list() const override { return nullptr; }
1640
1641 protected:
1642 void add_json_info(Json_object *obj) override;
1643
1644 private:
1646};
1647
1650
1652
1653 public:
1654 explicit PT_table_value_constructor(const POS &pos,
1655 PT_insert_values_list *row_value_list_arg)
1656 : super(pos), row_value_list(row_value_list_arg) {}
1657
1658 bool do_contextualize(Parse_context *pc) override;
1659
1660 bool has_into_clause() const override { return false; }
1661 bool has_trailing_into_clause() const override { return false; }
1662
1663 bool is_set_operation() const override { return false; }
1664
1665 bool can_absorb_order_and_limit(bool, bool) const override { return true; }
1666
1667 bool is_table_value_constructor() const override { return true; }
1668
1670 return row_value_list;
1671 }
1672};
1673
1676
1677 public:
1679 const POS &pos, const Query_options &options_arg,
1680 PT_item_list *item_list_arg,
1681 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg)
1682 : super(pos, options_arg, item_list_arg, from_clause_arg, nullptr) {}
1683};
1684
1686 public:
1687 PT_query_expression(const POS &pos, PT_with_clause *with_clause,
1688 PT_query_expression_body *body, PT_order *order,
1689 PT_limit_clause *limit)
1691 m_body(body),
1692 m_order(order),
1693 m_limit(limit),
1694 m_with_clause(with_clause) {}
1695
1697 PT_order *order, PT_limit_clause *limit)
1698 : PT_query_expression(pos, nullptr, body, order, limit) {}
1699
1701 : PT_query_expression(pos, body, nullptr, nullptr) {}
1702
1703 bool do_contextualize(Parse_context *pc) override;
1704
1705 bool is_set_operation() const override { return m_body->is_set_operation(); }
1706
1707 bool has_into_clause() const override { return m_body->has_into_clause(); }
1708 bool has_trailing_into_clause() const override {
1709 return (m_body->has_trailing_into_clause() && m_order == nullptr &&
1710 m_limit == nullptr);
1711 }
1712
1717 return false;
1718 }
1719
1720 bool can_absorb_order_and_limit(bool order, bool limit) const override {
1721 if (m_body->is_set_operation()) {
1722 return false;
1723 }
1724 if (m_order == nullptr && m_limit == nullptr) {
1725 /*
1726 It is safe to push ORDER and/or LIMIT down in:
1727
1728 (SELECT ...<no order or limit clauses>) ORDER BY ... LIMIT ...;
1729 (SELECT ...<no order or limit clauses>) ORDER BY ...;
1730 (SELECT ...<no order or limit clauses>) LIMIT ...;
1731 */
1732 return true;
1733 }
1734 if (m_limit != nullptr && !order && limit) {
1735 /*
1736 In MySQL, it is ok(*) to push LIMIT down in:
1737
1738 (SELECT ... [ORDER BY ...] LIMIT a) LIMIT b;
1739
1740 *) MySQL doesn't follow the standard when overwriting `LIMIT a` with
1741 `LIMIT b` if a < b. Moreover, the result of:
1742
1743 (SELECT ... ORDER BY order1 LIMIT a) ORDER BY order1 LIMIT b; (1)
1744
1745 can diverge from:
1746
1747 (SELECT ... ORDER BY order1 LIMIT a) LIMIT b; (2)
1748
1749 since the example (1) never overwrites `LIMIT a` with `LIMIT b`,
1750 while the example (2) does overwrite.
1751
1752 TODO: add a warning, deprecate and replace this behavior with the
1753 standard one.
1754 */
1755 return true;
1756 }
1757 if (m_order != nullptr && m_limit == nullptr && !order && limit) {
1758 /*
1759 Allow pushdown of LIMIT into body with ORDER BY, e.g
1760
1761 (SELECT ... ORDER BY order1) LIMIT a;
1762 */
1763 return true;
1764 }
1765 return false;
1766 }
1767
1768 bool is_table_value_constructor() const override {
1770 }
1771
1773 return m_body->get_row_value_list();
1774 }
1775
1776 private:
1777 /**
1778 Contextualizes the order and limit clauses, re-interpreting them according
1779 to the rules. If the `<query expression body>` can absorb the clauses,
1780 they are simply contextualized into the current Query_block. If not, we
1781 have to create the "fake" Query_block unless there is one already
1782 (Query_expression::new_set_operation_query() is known to do this.)
1783
1784 @see PT_query_expression::can_absorb_order_and_limit()
1785 */
1787
1792};
1793
1794/*
1795 After the removal of the `... <locking_clause> <into_clause>` syntax
1796 PT_locking will disappear.
1797*/
1800
1801 public:
1803 PT_locking_clause_list *locking_clauses)
1804 : super(pos),
1806 m_locking_clauses{locking_clauses} {}
1807
1808 bool do_contextualize(Parse_context *pc) override {
1809 return (super::do_contextualize(pc) ||
1812 }
1813
1814 bool is_set_operation() const override {
1816 }
1817
1818 bool has_into_clause() const override {
1820 }
1821 bool has_trailing_into_clause() const override { return false; }
1822
1823 bool can_absorb_order_and_limit(bool order, bool limit) const override {
1824 return m_query_expression->can_absorb_order_and_limit(order, limit);
1825 }
1826
1827 bool is_table_value_constructor() const override {
1829 }
1830
1833 }
1834
1835 private:
1838};
1839
1842
1845
1846 public:
1848
1849 PT_subquery(const POS &pos, PT_query_expression_body *query_expression)
1850 : super(pos),
1851 qe(query_expression),
1853 m_is_derived_table(false) {}
1854
1855 bool do_contextualize(Parse_context *pc) override;
1856
1858};
1859
1862
1863 public:
1866 bool is_rhs_in_parentheses = false)
1867 : super(pos),
1869 m_is_rhs_in_parentheses{is_rhs_in_parentheses} {
1870 m_list.push_back(lhs);
1871 m_list.push_back(rhs);
1872 }
1873
1875 QueryLevel &ql);
1876 bool is_set_operation() const override { return true; }
1877
1878 bool has_into_clause() const override {
1879 return std::any_of(m_list.cbegin(), m_list.cend(),
1880 [](const PT_query_expression_body &body) {
1881 return body.has_into_clause();
1882 });
1883 }
1884 bool has_trailing_into_clause() const override {
1885 return !m_is_rhs_in_parentheses &&
1886 m_list[m_list.elements - 1]->has_trailing_into_clause();
1887 }
1888
1889 bool can_absorb_order_and_limit(bool, bool) const override { return false; }
1890
1891 bool is_table_value_constructor() const override { return false; }
1892 PT_insert_values_list *get_row_value_list() const override { return nullptr; }
1893 bool is_distinct() const { return m_is_distinct; }
1894
1897
1898 protected:
1900 Surrounding_context context);
1905 void add_json_info(Json_object *obj) override {
1906 obj->add_alias("distinct", create_dom_ptr<Json_boolean>(m_is_distinct));
1907 obj->add_alias("rhs_in_parentheses",
1908 create_dom_ptr<Json_boolean>(m_is_rhs_in_parentheses));
1909 }
1910};
1911
1914
1915 public:
1917 bool do_contextualize(Parse_context *pc) override;
1918 enum Setop_type type() const override { return UNION; }
1919};
1920
1923
1924 public:
1926 bool do_contextualize(Parse_context *pc) override;
1927 enum Setop_type type() const override { return EXCEPT; }
1928};
1929
1932
1933 public:
1935 bool do_contextualize(Parse_context *pc) override;
1936 enum Setop_type type() const override { return INTERSECT; }
1937};
1938
1941
1942 public:
1943 /**
1944 @param pos Position of this clause in the SQL statement.
1945 @param qe The query expression.
1946 @param sql_command The type of SQL command.
1947 */
1948 PT_select_stmt(const POS &pos, enum_sql_command sql_command,
1950 : super(pos),
1951 m_sql_command(sql_command),
1952 m_qe(qe),
1953 m_into(nullptr),
1955
1956 /**
1957 Creates a SELECT command. Only SELECT commands can have into.
1958
1959 @param pos Position of this clause in the SQL
1960 statement.
1961 @param qe The query expression.
1962 @param into The own INTO destination.
1963 @param has_trailing_locking_clauses True if there are locking clauses (like
1964 `FOR UPDATE`) at the end of the
1965 statement.
1966 */
1968 PT_into_destination *into = nullptr,
1969 bool has_trailing_locking_clauses = false)
1970 : super(pos),
1972 m_qe{qe},
1973 m_into{into},
1974 m_has_trailing_locking_clauses{has_trailing_locking_clauses} {}
1975
1976 Sql_cmd *make_cmd(THD *thd) override;
1977 std::string get_printable_parse_tree(THD *thd) override;
1978
1979 private:
1984};
1985
1986/**
1987 Top-level node for the DELETE statement
1988
1989 @ingroup ptn_stmt
1990*/
1991class PT_delete final : public Parse_tree_root {
1993
1994 private:
1999 const char *const opt_table_alias;
2007
2008 public:
2009 // single-table DELETE node constructor:
2010 PT_delete(const POS &pos, PT_with_clause *with_clause_arg,
2011 PT_hint_list *opt_hints_arg, int opt_delete_options_arg,
2012 Table_ident *table_ident_arg,
2013 const LEX_CSTRING &opt_table_alias_arg,
2014 List<String> *opt_use_partition_arg, Item *opt_where_clause_arg,
2015 PT_order *opt_order_clause_arg, Item *opt_delete_limit_clause_arg)
2016 : super(pos),
2017 m_with_clause(with_clause_arg),
2018 opt_hints(opt_hints_arg),
2019 opt_delete_options(opt_delete_options_arg),
2020 table_ident(table_ident_arg),
2021 opt_table_alias(opt_table_alias_arg.str),
2022 opt_use_partition(opt_use_partition_arg),
2023 opt_where_clause(opt_where_clause_arg),
2024 opt_order_clause(opt_order_clause_arg),
2025 opt_delete_limit_clause(opt_delete_limit_clause_arg) {
2027 join_table_list.init_empty_const();
2028 }
2029
2030 // multi-table DELETE node constructor:
2031 PT_delete(const POS &pos, PT_with_clause *with_clause_arg,
2032 PT_hint_list *opt_hints_arg, int opt_delete_options_arg,
2033 const Mem_root_array_YY<Table_ident *> &table_list_arg,
2034 const Mem_root_array_YY<PT_table_reference *> &join_table_list_arg,
2035 Item *opt_where_clause_arg)
2036 : super(pos),
2037 m_with_clause(with_clause_arg),
2038 opt_hints(opt_hints_arg),
2039 opt_delete_options(opt_delete_options_arg),
2042 table_list(table_list_arg),
2044 join_table_list(join_table_list_arg),
2045 opt_where_clause(opt_where_clause_arg),
2048
2049 Sql_cmd *make_cmd(THD *thd) override;
2050
2051 private:
2052 bool is_multitable() const {
2053 assert((table_ident != nullptr) ^ (table_list.size() > 0));
2054 return table_ident == nullptr;
2055 }
2056
2058};
2059
2060/**
2061 Top-level node for the UPDATE statement
2062
2063 @ingroup ptn_stmt
2064*/
2067
2078
2079 public:
2080 PT_update(const POS &pos, PT_with_clause *with_clause_arg,
2081 PT_hint_list *opt_hints_arg, thr_lock_type opt_low_priority_arg,
2082 bool opt_ignore_arg,
2083 const Mem_root_array_YY<PT_table_reference *> &join_table_list_arg,
2084 PT_item_list *column_list_arg, PT_item_list *value_list_arg,
2085 Item *opt_where_clause_arg, PT_order *opt_order_clause_arg,
2086 Item *opt_limit_clause_arg)
2087 : super(pos),
2088 m_with_clause(with_clause_arg),
2089 opt_hints(opt_hints_arg),
2090 opt_low_priority(opt_low_priority_arg),
2091 opt_ignore(opt_ignore_arg),
2092 join_table_list(join_table_list_arg),
2093 column_list(column_list_arg),
2094 value_list(value_list_arg),
2095 opt_where_clause(opt_where_clause_arg),
2096 opt_order_clause(opt_order_clause_arg),
2097 opt_limit_clause(opt_limit_clause_arg) {}
2098
2099 Sql_cmd *make_cmd(THD *thd) override;
2100};
2101
2104
2106
2107 public:
2109 : super(pos), many_values(mem_root) {}
2110
2111 bool do_contextualize(Parse_context *pc) override;
2112
2114 many_values.push_back(x);
2115 return false;
2116 }
2117
2119 assert(is_contextualized());
2120 return many_values;
2121 }
2122};
2123
2124/**
2125 Top-level node for the INSERT statement
2126
2127 @ingroup ptn_stmt
2128*/
2129class PT_insert final : public Parse_tree_root {
2131
2132 const bool is_replace;
2135 const bool ignore;
2141 const char *const opt_values_table_alias;
2145
2146 public:
2147 PT_insert(const POS &pos, bool is_replace_arg, PT_hint_list *opt_hints_arg,
2148 thr_lock_type lock_option_arg, bool ignore_arg,
2149 Table_ident *table_ident_arg, List<String> *opt_use_partition_arg,
2150 PT_item_list *column_list_arg,
2151 PT_insert_values_list *row_value_list_arg,
2152 PT_query_expression_body *insert_query_expression_arg,
2153 const LEX_CSTRING &opt_values_table_alias_arg,
2154 Create_col_name_list *opt_values_column_list_arg,
2155 PT_item_list *opt_on_duplicate_column_list_arg,
2156 PT_item_list *opt_on_duplicate_value_list_arg)
2157 : super(pos),
2158 is_replace(is_replace_arg),
2159 opt_hints(opt_hints_arg),
2160 lock_option(lock_option_arg),
2161 ignore(ignore_arg),
2162 table_ident(table_ident_arg),
2163 opt_use_partition(opt_use_partition_arg),
2164 column_list(column_list_arg),
2165 row_value_list(row_value_list_arg),
2166 insert_query_expression(insert_query_expression_arg),
2167 opt_values_table_alias(opt_values_table_alias_arg.str),
2168 opt_values_column_list(opt_values_column_list_arg),
2169 opt_on_duplicate_column_list(opt_on_duplicate_column_list_arg),
2170 opt_on_duplicate_value_list(opt_on_duplicate_value_list_arg) {
2171 // REPLACE statement can't have IGNORE flag:
2172 assert(!is_replace || !ignore);
2173 // REPLACE statement can't have ON DUPLICATE KEY UPDATE clause:
2174 assert(!is_replace || opt_on_duplicate_column_list == nullptr);
2175 // INSERT/REPLACE ... SELECT can't have VALUES clause:
2176 assert((row_value_list != nullptr) ^ (insert_query_expression != nullptr));
2177 // ON DUPLICATE KEY UPDATE: column and value arrays must have same sizes:
2178 assert((opt_on_duplicate_column_list == nullptr &&
2179 opt_on_duplicate_value_list == nullptr) ||
2182 }
2183
2184 Sql_cmd *make_cmd(THD *thd) override;
2185
2186 private:
2187 bool has_query_block() const { return insert_query_expression != nullptr; }
2188};
2189
2190class PT_call final : public Parse_tree_root {
2193
2194 public:
2195 PT_call(const POS &pos, sp_name *proc_name_arg,
2196 PT_item_list *opt_expr_list_arg)
2197 : Parse_tree_root(pos),
2198 proc_name(proc_name_arg),
2199 opt_expr_list(opt_expr_list_arg) {}
2200
2201 Sql_cmd *make_cmd(THD *thd) override;
2202};
2203
2204/**
2205 Top-level node for the SHUTDOWN statement
2206
2207 @ingroup ptn_stmt
2208*/
2209class PT_shutdown final : public Parse_tree_root {
2211
2212 public:
2213 Sql_cmd *make_cmd(THD *) override { return &sql_cmd; }
2214};
2215
2216/**
2217 Top-level node for the CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM statement.
2218
2219 @ingroup ptn_stmt
2220*/
2221class PT_create_srs final : public Parse_tree_root {
2222 /// The SQL command object.
2224 /// Whether OR REPLACE is specified.
2226 /// Whether IF NOT EXISTS is specified.
2228 /// SRID of the SRS to create.
2229 ///
2230 /// The range is larger than that of gis::srid_t, so it must be
2231 /// verified to be less than the uint32 maximum value.
2232 unsigned long long m_srid;
2233 /// All attributes except SRID.
2235
2236 /// Check if a UTF-8 string contains control characters.
2237 ///
2238 /// @note This function only checks single byte control characters (U+0000 to
2239 /// U+001F, and U+007F). There are some control characters at U+0080 to U+00A0
2240 /// that are not detected by this function.
2241 ///
2242 /// @param str The string.
2243 /// @param length Length of the string.
2244 ///
2245 /// @retval false The string contains no control characters.
2246 /// @retval true The string contains at least one control character.
2247 bool contains_control_char(char *str, size_t length) {
2248 for (size_t pos = 0; pos < length; pos++) {
2249 if (std::iscntrl(str[pos])) return true;
2250 }
2251 return false;
2252 }
2253
2254 public:
2255 PT_create_srs(const POS &pos, unsigned long long srid,
2256 const Sql_cmd_srs_attributes &attributes, bool or_replace,
2257 bool if_not_exists)
2258 : Parse_tree_root(pos),
2259 m_or_replace(or_replace),
2260 m_if_not_exists(if_not_exists),
2261 m_srid(srid),
2262 m_attributes(attributes) {}
2263
2264 Sql_cmd *make_cmd(THD *thd) override;
2265};
2266
2267/**
2268 Top-level node for the DROP SPATIAL REFERENCE SYSTEM statement.
2269
2270 @ingroup ptn_stmt
2271*/
2272class PT_drop_srs final : public Parse_tree_root {
2273 /// The SQL command object.
2275 /// SRID of the SRS to drop.
2276 ///
2277 /// The range is larger than that of gis::srid_t, so it must be
2278 /// verified to be less than the uint32 maximum value.
2279 unsigned long long m_srid;
2280
2281 public:
2282 PT_drop_srs(const POS &pos, unsigned long long srid, bool if_exists)
2283 : Parse_tree_root(pos), sql_cmd(srid, if_exists), m_srid(srid) {}
2284
2285 Sql_cmd *make_cmd(THD *thd) override;
2286};
2287
2288/**
2289 Top-level node for the ALTER INSTANCE statement
2290
2291 @ingroup ptn_stmt
2292*/
2295
2296 public:
2298 const POS &pos, enum alter_instance_action_enum alter_instance_action,
2299 const LEX_CSTRING &channel)
2300 : Parse_tree_root(pos), sql_cmd(alter_instance_action, channel) {}
2301
2302 Sql_cmd *make_cmd(THD *thd) override;
2303};
2304
2305/**
2306 A template-free base class for index options that we can predeclare in
2307 sql_lex.h
2308*/
2310 protected:
2311 explicit PT_base_index_option(const POS &pos) : Table_ddl_node(pos) {}
2312};
2313
2314/**
2315 A key part specification.
2316
2317 This can either be a "normal" key part (a key part that points to a column),
2318 or this can be a functional key part (a key part that points to an
2319 expression).
2320*/
2323
2324 public:
2325 /**
2326 Constructor for a functional key part.
2327
2328 @param pos Position of this clause in the SQL statement.
2329 @param expression The expression to index.
2330 @param order The direction of the index.
2331 */
2332 PT_key_part_specification(const POS &pos, Item *expression, enum_order order);
2333
2334 /**
2335 Constructor for a "normal" key part. That is a key part that points to a
2336 column and not an expression.
2337
2338 @param pos Position of this clause in the SQL statement.
2339 @param column_name The column name that this key part points to.
2340 @param order The direction of the index.
2341 @param prefix_length How many bytes or characters this key part should
2342 index, or zero if it should index the entire column.
2343 */
2344 PT_key_part_specification(const POS &pos, const LEX_CSTRING &column_name,
2345 enum_order order, int prefix_length);
2346
2347 /**
2348 Contextualize this key part specification. This will also call itemize on
2349 the indexed expression if this is a functional key part.
2350
2351 @param pc The parse context
2352
2353 @retval true on error
2354 @retval false on success
2355 */
2356 bool do_contextualize(Parse_context *pc) override;
2357
2358 /**
2359 Get the indexed expression. The caller must ensure that has_expression()
2360 returns true before calling this.
2361
2362 @returns The indexed expression
2363 */
2365 assert(has_expression());
2366 return m_expression;
2367 }
2368
2369 /**
2370 @returns The direction of the index: ORDER_ASC, ORDER_DESC or
2371 ORDER_NOT_RELEVANT in case the user didn't explicitly specify a
2372 direction.
2373 */
2374 enum_order get_order() const { return m_order; }
2375
2376 /**
2377 @retval true if the user explicitly specified a direction (asc/desc).
2378 @retval false if the user didn't explicitly specify a direction.
2379 */
2380 bool is_explicit() const { return get_order() != ORDER_NOT_RELEVANT; }
2381
2382 /**
2383 @retval true if the key part contains an expression (and thus is a
2384 functional key part).
2385 @retval false if the key part doesn't contain an expression.
2386 */
2387 bool has_expression() const { return m_expression != nullptr; }
2388
2389 /**
2390 Get the column that this key part points to. This is only valid if this
2391 key part isn't a functional index. The caller must thus check the return
2392 value of has_expression() before calling this function.
2393
2394 @returns The column that this key part points to.
2395 */
2397 assert(!has_expression());
2398 return m_column_name;
2399 }
2400
2401 /**
2402 @returns The number of bytes that this key part should index. If the column
2403 this key part points to is a non-binary column, this is the number
2404 of characters. Returns zero if the entire column should be indexed.
2405 */
2406 int get_prefix_length() const { return m_prefix_length; }
2407
2408 private:
2409 /**
2410 The indexed expression in case this is a functional key part. Only valid if
2411 has_expression() returns true.
2412 */
2414
2415 /// The direction of the index.
2417
2418 /// The name of the column that this key part indexes.
2420
2421 /**
2422 If this is greater than zero, it represents how many bytes of the column
2423 that is indexed. Note that for non-binary columns (VARCHAR, TEXT etc), this
2424 is the number of characters.
2425 */
2427};
2428
2429/**
2430 A template for options that set a single `<alter option>` value in
2431 thd->lex->key_create_info.
2432
2433 @tparam Option_type The data type of the option.
2434 @tparam Property Pointer-to-member for the option of KEY_CREATE_INFO.
2435*/
2436template <typename Option_type, Option_type KEY_CREATE_INFO::*Property>
2438 public:
2439 /// @param pos Position of this clause in the SQL statement.
2440 /// @param option_value The value of the option.
2441 PT_index_option(const POS &pos, Option_type option_value)
2442 : PT_base_index_option(pos), m_option_value(option_value) {}
2443
2446 return false;
2447 }
2448
2449 private:
2450 Option_type m_option_value;
2451};
2452
2453/**
2454 A template for options that set a single property in a KEY_CREATE_INFO, and
2455 also records if the option was explicitly set.
2456*/
2457template <typename Option_type, Option_type KEY_CREATE_INFO::*Property,
2458 bool KEY_CREATE_INFO::*Property_is_explicit>
2460 public:
2461 PT_traceable_index_option(const POS &pos, Option_type option_value)
2462 : PT_base_index_option(pos), m_option_value(option_value) {}
2463
2466 pc->key_create_info->*Property_is_explicit = true;
2467 return false;
2468 }
2469
2470 private:
2471 Option_type m_option_value;
2472};
2473
2481
2482/**
2483 The data structure (B-tree, Hash, etc) used for an index is called
2484 'index_type' in the manual. Internally, this is stored in
2485 KEY_CREATE_INFO::algorithm, while what the manual calls 'algorithm' is
2486 stored in partition_info::key_algorithm. In an `<create_index_stmt>`
2487 it's ignored. The terminology is somewhat confusing, but we stick to the
2488 manual in the parser.
2489*/
2493
2495 public:
2497 const LEX_STRING &name_arg, PT_base_index_option *type,
2498 Table_ident *table_ident,
2504 m_keytype(type_par),
2505 m_name(name_arg),
2506 m_type(type),
2507 m_table_ident(table_ident),
2508 m_columns(cols),
2510 m_algo(algo),
2511 m_lock(lock) {}
2512
2513 Sql_cmd *make_cmd(THD *thd) override;
2514
2515 private:
2524};
2525
2526/**
2527 Base class for column/constraint definitions in CREATE %TABLE
2528
2529 @ingroup ptn_create_table_stuff
2530*/
2532 protected:
2533 explicit PT_table_element(const POS &pos) : Table_ddl_node(pos) {}
2534};
2535
2537 protected:
2538 explicit PT_table_constraint_def(const POS &pos) : PT_table_element(pos) {}
2539};
2540
2543
2544 public:
2546 const LEX_STRING &name_arg,
2550 : super(pos),
2551 m_keytype(type_par),
2552 m_name(name_arg),
2553 m_type(type),
2554 m_columns(cols),
2555 m_options(options) {}
2556
2557 bool do_contextualize(Table_ddl_parse_context *pc) override;
2558
2559 private:
2565};
2566
2569
2570 public:
2571 PT_foreign_key_definition(const POS &pos, const LEX_STRING &constraint_name,
2572 const LEX_STRING &key_name,
2574 Table_ident *referenced_table,
2575 List<Key_part_spec> *ref_list,
2576 fk_match_opt fk_match_option,
2577 fk_option fk_update_opt, fk_option fk_delete_opt)
2578 : super(pos),
2579 m_constraint_name(constraint_name),
2580 m_key_name(key_name),
2581 m_columns(columns),
2582 m_referenced_table(referenced_table),
2583 m_ref_list(ref_list),
2584 m_fk_match_option(fk_match_option),
2585 m_fk_update_opt(fk_update_opt),
2586 m_fk_delete_opt(fk_delete_opt) {}
2587
2588 bool do_contextualize(Table_ddl_parse_context *pc) override;
2589
2590 void set_column_name(const LEX_STRING &column_name) {
2591 m_column_name = column_name;
2592 }
2593
2594 private:
2603
2604 // Column name. Set when FK is specified at the column level.
2606};
2607
2608/**
2609 Common base class for CREATE TABLE and ALTER TABLE option nodes
2610
2611 @ingroup ptn_create_or_alter_table_options
2612*/
2614 protected:
2615 explicit PT_ddl_table_option(const POS &pos) : Table_ddl_node(pos) {}
2616
2617 public:
2618 ~PT_ddl_table_option() override = 0; // Force abstract class declaration
2619
2620 virtual bool is_rename_table() const { return false; }
2621};
2622
2624
2625/**
2626 Base class for CREATE TABLE option nodes
2627
2628 @ingroup ptn_create_or_alter_table_options
2629*/
2632
2633 protected:
2634 explicit PT_create_table_option(const POS &pos) : super(pos) {}
2635
2636 public:
2637 ~PT_create_table_option() override = 0; // Force abstract class declaration
2638
2640 if (super::do_contextualize(pc)) return true;
2642 return false;
2643 }
2644};
2645
2647
2648/**
2649 A template for options that set a single property in HA_CREATE_INFO, and
2650 also records if the option was explicitly set.
2651*/
2652template <typename Option_type, Option_type HA_CREATE_INFO::*Property,
2653 uint64_t Property_flag>
2656
2657 const Option_type value;
2658
2659 public:
2660 explicit PT_traceable_create_table_option(const POS &pos, Option_type value)
2661 : super(pos), value(value) {}
2662
2664 if (super::do_contextualize(pc)) return true;
2665 pc->create_info->*Property = value;
2666 pc->create_info->used_fields |= Property_flag;
2667 return false;
2668 }
2669};
2670
2671#define TYPE_AND_REF(x) decltype(x), &x
2672
2673/**
2674 Node for the @SQL{MAX_ROWS [=] @B{@<integer@>}} table option
2675
2676 @ingroup ptn_create_or_alter_table_options
2677*/
2681
2682/**
2683 Node for the @SQL{MIN_ROWS [=] @B{@<integer@>}} table option
2684
2685 @ingroup ptn_create_or_alter_table_options
2686*/
2690
2691/**
2692 Node for the @SQL{AVG_ROW_LENGTH_ROWS [=] @B{@<integer@>}} table option
2693
2694 @ingroup ptn_create_or_alter_table_options
2695*/
2699
2700/**
2701 Node for the @SQL{PASSWORD [=] @B{@<string@>}} table option
2702
2703 @ingroup ptn_create_or_alter_table_options
2704*/
2708
2709/**
2710 Node for the @SQL{COMMENT [=] @B{@<string@>}} table option
2711
2712 @ingroup ptn_create_or_alter_table_options
2713*/
2717
2718/**
2719 Node for the @SQL{COMPRESSION [=] @B{@<string@>}} table option
2720
2721 @ingroup ptn_create_or_alter_table_options
2722*/
2726
2727/**
2728 Node for the @SQL{ENGRYPTION [=] @B{@<string@>}} table option
2729
2730 @ingroup ptn_create_or_alter_table_options
2731*/
2735
2736/**
2737 Node for the @SQL{AUTO_INCREMENT [=] @B{@<integer@>}} table option
2738
2739 @ingroup ptn_create_or_alter_table_options
2740*/
2744
2748
2753
2757
2761
2765
2769
2773
2778
2783
2785
2786/**
2787 A template for options that set HA_CREATE_INFO::table_options and
2788 also records if the option was explicitly set.
2789*/
2790template <uint64_t Property_flag, table_options_t Default, table_options_t Yes,
2791 table_options_t No>
2794
2796
2797 public:
2799 : super(pos), value(value) {}
2800
2802 if (super::do_contextualize(pc)) return true;
2803 pc->create_info->table_options &= ~(Yes | No);
2804 switch (value) {
2805 case Ternary_option::ON:
2806 pc->create_info->table_options |= Yes;
2807 break;
2809 pc->create_info->table_options |= No;
2810 break;
2812 break;
2813 default:
2814 assert(false);
2815 }
2816 pc->create_info->used_fields |= Property_flag;
2817 return false;
2818 }
2819};
2820
2821/**
2822 Node for the @SQL{PACK_KEYS [=] @B{1|0|DEFAULT}} table option
2823
2824 @ingroup ptn_create_or_alter_table_options
2825
2826 PACK_KEYS | Constructor parameter
2827 ----------|----------------------
2828 1 | Ternary_option::ON
2829 0 | Ternary_option::OFF
2830 DEFAULT | Ternary_option::DEFAULT
2831*/
2833 0, // DEFAULT
2834 HA_OPTION_PACK_KEYS, // ON
2837
2838/**
2839 Node for the @SQL{STATS_PERSISTENT [=] @B{1|0|DEFAULT}} table option
2840
2841 @ingroup ptn_create_or_alter_table_options
2842
2843 STATS_PERSISTENT | Constructor parameter
2844 -----------------|----------------------
2845 1 | Ternary_option::ON
2846 0 | Ternary_option::OFF
2847 DEFAULT | Ternary_option::DEFAULT
2848*/
2850 0, // DEFAULT
2854
2855/**
2856 A template for options that set HA_CREATE_INFO::table_options and
2857 also records if the option was explicitly set.
2858*/
2859template <ulong Property_flag, table_options_t Yes, table_options_t No>
2862
2863 const bool value;
2864
2865 public:
2866 explicit PT_bool_create_table_option(const POS &pos, bool value)
2867 : super(pos), value(value) {}
2868
2870 if (super::do_contextualize(pc)) return true;
2871 pc->create_info->table_options &= ~(Yes | No);
2872 pc->create_info->table_options |= value ? Yes : No;
2873 pc->create_info->used_fields |= Property_flag;
2874 return false;
2875 }
2876};
2877
2878/**
2879 Node for the @SQL{CHECKSUM|TABLE_CHECKSUM [=] @B{0|@<not 0@>}} table option
2880
2881 @ingroup ptn_create_or_alter_table_options
2882
2883 TABLE_CHECKSUM | Constructor parameter
2884 ---------------|----------------------
2885 0 | false
2886 not 0 | true
2887*/
2889 HA_OPTION_CHECKSUM, // ON
2891 >
2893
2894/**
2895 Node for the @SQL{DELAY_KEY_WRITE [=] @B{0|@<not 0@>}} table option
2896
2897 @ingroup ptn_create_or_alter_table_options
2898
2899 TABLE_CHECKSUM | Constructor parameter
2900 ---------------|----------------------
2901 0 | false
2902 not 0 | true
2903*/
2908
2909/**
2910 Node for the @SQL{ENGINE [=] @B{@<identifier@>|@<string@>}} table option
2911
2912 @ingroup ptn_create_or_alter_table_options
2913*/
2916
2918
2919 public:
2920 /**
2921 @param pos Position of this clause in the SQL statement.
2922 @param engine Storage engine name.
2923 */
2925 const LEX_CSTRING &engine)
2926 : super(pos), engine(engine) {}
2927
2928 bool do_contextualize(Table_ddl_parse_context *pc) override;
2929};
2930
2931/**
2932 Node for the @SQL{SECONDARY_ENGINE [=] @B{@<identifier@>|@<string@>|NULL}}
2933 table option.
2934
2935 @ingroup ptn_create_or_alter_table_options
2936*/
2939
2940 public:
2942 : super(pos) {}
2944 const POS &pos, const LEX_CSTRING &secondary_engine)
2946
2947 bool do_contextualize(Table_ddl_parse_context *pc) override;
2948
2949 private:
2951};
2952
2953/**
2954 Node for the @SQL{STATS_AUTO_RECALC [=] @B{@<0|1|DEFAULT@>})} table option
2955
2956 @ingroup ptn_create_or_alter_table_options
2957*/
2960
2962
2963 public:
2964 /**
2965 @param pos Position of this clause in the SQL statement.
2966 @param value
2967 STATS_AUTO_RECALC | value
2968 ------------------|----------------------
2969 1 | Ternary_option::ON
2970 0 | Ternary_option::OFF
2971 DEFAULT | Ternary_option::DEFAULT
2972 */
2974 : super(pos), value(value) {}
2975
2976 bool do_contextualize(Table_ddl_parse_context *pc) override;
2977};
2978
2979/**
2980 Node for the @SQL{STATS_SAMPLE_PAGES [=] @B{@<integer@>|DEFAULT}} table option
2981
2982 @ingroup ptn_create_or_alter_table_options
2983*/
2987
2989
2990 public:
2991 /**
2992 Constructor for implicit number of pages
2993
2994 @param pos Position of this clause in the SQL statement.
2995 @param value Number of pages, 1@<=N@<=65535.
2996 */
2998 : super(pos), value(value) {
2999 assert(value != 0 && value <= 0xFFFF);
3000 }
3001 /**
3002 Constructor for the DEFAULT number of pages
3003 */
3005 : super(pos), value(0) {} // DEFAULT
3006
3007 bool do_contextualize(Table_ddl_parse_context *pc) override;
3008};
3009
3012
3014
3015 public:
3016 explicit PT_create_union_option(const POS &pos,
3018 : super(pos), tables(tables) {}
3019
3020 bool do_contextualize(Table_ddl_parse_context *pc) override;
3021};
3022
3025
3027
3028 public:
3030 : super(pos), value(value) {}
3031
3033 if (super::do_contextualize(pc)) return true;
3035 return false;
3036 }
3037};
3038
3041
3043
3044 public:
3046 const CHARSET_INFO *value)
3047 : super(pos), value(value) {
3048 assert(value != nullptr);
3049 }
3050
3051 bool do_contextualize(Table_ddl_parse_context *pc) override;
3052};
3053
3056
3058
3059 public:
3061 const CHARSET_INFO *value)
3062 : super(pos), value(value) {
3063 assert(value != nullptr);
3064 }
3065
3066 bool do_contextualize(Table_ddl_parse_context *pc) override;
3067};
3068
3071
3072 public:
3074 File_information *file_info_arg,
3075 const Field_separators *field_term_arg,
3076 const Line_separators *line_term_arg,
3077 ulong ignore_lines_arg)
3078 : super(pos),
3079 file_info(file_info_arg),
3080 field_term(field_term_arg),
3081 line_term(line_term_arg),
3082 ignore_lines(ignore_lines_arg) {}
3083
3084 bool do_contextualize(Table_ddl_parse_context *pc) override;
3085
3090};
3091
3094
3095 public:
3097 PT_external_file_list *external_files_arg)
3098 : super(pos), external_files(external_files_arg) {}
3099
3100 bool do_contextualize(Table_ddl_parse_context *pc) override;
3101
3103};
3104
3106 public:
3108
3109 const String *uri{nullptr};
3110 const String *name{nullptr};
3111 const String *pattern{nullptr};
3112 const String *prefix{nullptr};
3115};
3116
3118 public:
3120
3121 bool push_back(PT_file_attributes *file_attributes) {
3122 return files.push_back(file_attributes);
3123 }
3124
3126};
3127
3128/**
3129 Node for the @SQL{ALLOW_MISSING_FILES [=] @B{1|0|DEFAULT}} table option
3130
3131 @ingroup ptn_create_or_alter_table_options
3132
3133 ALLOW_MISSING_FILES | Constructor parameter
3134 --------------------|------------------------
3135 1 | Ternary_option::ON
3136 0 | Ternary_option::OFF
3137 DEFAULT | Ternary_option::DEFAULT
3138*/
3141 0, // DEFAULT
3145
3146/**
3147 Node for the @SQL{VERIFY_KEY_CONSTRAINTS [=] @B{1|0|DEFAULT}} table option
3148
3149 @ingroup ptn_create_or_alter_table_options
3150
3151 VERIFY_KEY_CONSTRAINTS | Constructor parameter
3152 -----------------------|------------------------
3153 1 | Ternary_option::ON
3154 0 | Ternary_option::OFF
3155 DEFAULT | Ternary_option::DEFAULT
3156*/
3159 0, // DEFAULT
3163
3164/**
3165 Node for the @SQL{STRICT_LOAD [=] @B{1|0|DEFAULT}} table option
3166
3167 @ingroup ptn_create_or_alter_table_options
3168
3169 STRICT_LOAD | Constructor parameter
3170 -----------------|------------------------
3171 1 | Ternary_option::ON
3172 0 | Ternary_option::OFF
3173 DEFAULT | Ternary_option::DEFAULT
3174*/
3176 0, // DEFAULT
3180
3181/**
3182 Node for the @SQL{AUTO_REFRESH_MODE [=] @B{1|0|DEFAULT}} table option
3183
3184 @ingroup ptn_create_or_alter_table_options
3185
3186 AUTO_REFRESH | Constructor parameter
3187 -----------------|------------------------
3188 1 | Ternary_option::ON
3189 0 | Ternary_option::OFF
3190 DEFAULT | Ternary_option::DEFAULT
3191*/
3193 0, // DEFAULT
3197
3198/**
3199 Node for the @SQL{AUTO_REFRESH_SOURCE [=] @B{@<string@>|NULL}}
3200 table option.
3201
3202 @ingroup ptn_create_or_alter_table_options
3203*/
3206
3207 public:
3208 explicit PT_create_auto_refresh_event_source(const POS &pos) : super(pos) {}
3210 const POS &pos, const LEX_CSTRING &auto_refresh_source)
3211 : super(pos), m_auto_refresh_source(auto_refresh_source) {}
3212
3213 bool do_contextualize(Table_ddl_parse_context *pc) override;
3214
3215 private:
3217};
3218
3222
3223 public:
3224 explicit PT_check_constraint(const POS &pos, LEX_STRING &name, Item *expr,
3225 bool is_enforced)
3226 : super(pos) {
3227 cc_spec.name = name;
3228 cc_spec.check_expr = expr;
3229 cc_spec.is_enforced = is_enforced;
3230 }
3231
3232 bool do_contextualize(Table_ddl_parse_context *pc) override;
3233};
3234
3237
3241
3242 const char *opt_place;
3243
3244 public:
3248 const char *opt_place = nullptr)
3249 : super(pos),
3254
3255 bool do_contextualize(Table_ddl_parse_context *pc) override;
3256};
3257
3258/**
3259 Top-level node for the CREATE %TABLE statement
3260
3261 @ingroup ptn_create_table
3262*/
3264 unsigned int table_type;
3274
3276
3277 public:
3278 /**
3279 @param pos Position of this clause in the SQL
3280 statement.
3281 @param mem_root MEM_ROOT to use for allocation
3282 @param table_type TABLE_TYPE_NORMAL, TABLE_TYPE_TEMPORARY or
3283 TABLE_TYPE_EXTERNAL
3284 @param only_if_not_exists True if @SQL{CREATE %TABLE ... @B{IF NOT EXISTS}}
3285 @param table_name @SQL{CREATE %TABLE ... @B{@<table name@>}}
3286 @param opt_table_element_list NULL or a list of table column and
3287 constraint definitions.
3288 @param opt_create_table_options NULL or a list of
3289 @ref ptn_create_or_alter_table_options
3290 "table options".
3291 @param opt_partitioning NULL or the @SQL{PARTITION BY} clause.
3292 @param on_duplicate DUPLICATE, IGNORE or fail with an error
3293 on data duplication errors (relevant
3294 for @SQL{CREATE TABLE ... SELECT}
3295 statements).
3296 @param opt_query_expression NULL or the @SQL{@B{SELECT}} clause.
3297 @param columns_end_pos Position after column definitions end.
3298 Used for CREATE EXTERNAL TABLE rewriting.
3299 */
3301 const POS &pos, MEM_ROOT *mem_root, uint table_type,
3307 const POS &columns_end_pos = POS())
3318 m_columns_end_pos(columns_end_pos) {}
3319 /**
3320 @param pos Position of this clause in the SQL statement.
3321 @param mem_root MEM_ROOT to use for allocation
3322 @param table_type TABLE_TYPE_NORMAL, TABLE_TYPE_TEMPORARY or
3323 TABLE_TYPE_EXTERNAL.
3324 @param only_if_not_exists True if @SQL{CREATE %TABLE ... @B{IF NOT EXISTS}}.
3325 @param table_name @SQL{CREATE %TABLE ... @B{@<table name@>}}.
3326 @param opt_like_clause NULL or the @SQL{@B{LIKE @<table name@>}} clause.
3327 */
3342
3343 Sql_cmd *make_cmd(THD *thd) override;
3344};
3345
3346class PT_create_role final : public Parse_tree_root {
3348
3349 public:
3350 PT_create_role(const POS &pos, bool if_not_exists,
3351 const List<LEX_USER> *roles)
3352 : Parse_tree_root(pos), sql_cmd(if_not_exists, roles) {}
3353
3354 Sql_cmd *make_cmd(THD *thd) override;
3355};
3356
3357class PT_drop_role final : public Parse_tree_root {
3359
3360 public:
3361 explicit PT_drop_role(const POS &pos, bool ignore_errors,
3362 const List<LEX_USER> *roles)
3363 : Parse_tree_root(pos), sql_cmd(ignore_errors, roles) {}
3364
3365 Sql_cmd *make_cmd(THD *thd) override;
3366};
3367
3370
3371 public:
3372 explicit PT_set_role(const POS &pos, role_enum role_type,
3373 const List<LEX_USER> *opt_except_roles = nullptr)
3374 : Parse_tree_root(pos), sql_cmd(role_type, opt_except_roles) {
3375 assert(role_type == role_enum::ROLE_ALL || opt_except_roles == nullptr);
3376 }
3377 explicit PT_set_role(const POS &pos, const List<LEX_USER> *roles)
3378 : Parse_tree_root(pos), sql_cmd(roles) {}
3379
3380 Sql_cmd *make_cmd(THD *thd) override;
3381};
3382
3383/**
3384 This class is used for representing both static and dynamic privileges on
3385 global as well as table and column level.
3386*/
3389
3392
3395 : type(type), columns(columns) {}
3396};
3397
3399 const uint grant;
3400
3402 : Privilege(STATIC, columns_arg), grant(grant) {}
3403};
3404
3407
3409 const Mem_root_array<LEX_CSTRING> *columns_arg)
3410 : Privilege(DYNAMIC, columns_arg), ident(ident) {}
3411};
3412
3414 private:
3416
3417 public:
3418 explicit PT_role_or_privilege(const POS &pos, const POS &errpos)
3419 : Parse_tree_node(pos), m_errpos(errpos) {}
3420 virtual LEX_USER *get_user(THD *thd);
3421 virtual Privilege *get_privilege(THD *thd);
3422};
3423
3427
3428 public:
3429 PT_role_at_host(const POS &pos, const POS &errpos, const LEX_STRING &role,
3430 const LEX_STRING &host)
3431 : PT_role_or_privilege(pos, errpos), role(role), host(host) {}
3432
3433 LEX_USER *get_user(THD *thd) override;
3434};
3435
3438
3439 public:
3440 PT_role_or_dynamic_privilege(const POS &pos, const POS &errpos,
3441 const LEX_STRING &ident)
3442 : PT_role_or_privilege(pos, errpos), ident(ident) {}
3443
3444 LEX_USER *get_user(THD *thd) override;
3445 Privilege *get_privilege(THD *thd) override;
3446};
3447
3449 const uint grant;
3451
3452 public:
3453 PT_static_privilege(const POS &pos, const POS &errpos, uint grant,
3454 const Mem_root_array<LEX_CSTRING> *columns = nullptr)
3455 : PT_role_or_privilege(pos, errpos), grant(grant), columns(columns) {}
3456
3457 Privilege *get_privilege(THD *thd) override;
3458};
3459
3462
3463 public:
3464 PT_dynamic_privilege(const POS &pos, const POS &errpos,
3465 const LEX_STRING &ident)
3466 : PT_role_or_privilege(pos, errpos), ident(ident) {}
3467
3468 Privilege *get_privilege(THD *thd) override;
3469};
3470
3471class PT_grant_roles final : public Parse_tree_root {
3475
3476 public:
3480 : Parse_tree_root(pos),
3481 roles(roles),
3482 users(users),
3484
3485 Sql_cmd *make_cmd(THD *thd) override;
3486};
3487
3488class PT_revoke_roles final : public Parse_tree_root {
3491
3492 public:
3494 const List<LEX_USER> *users)
3495 : Parse_tree_root(pos), roles(roles), users(users) {}
3496
3497 Sql_cmd *make_cmd(THD *thd) override;
3498};
3499
3502
3503 public:
3504 PT_alter_user_default_role(const POS &pos, bool if_exists,
3505 const List<LEX_USER> *users,
3506 const List<LEX_USER> *roles,
3507 const role_enum role_type)
3508 : Parse_tree_root(pos), sql_cmd(if_exists, users, roles, role_type) {}
3509
3510 Sql_cmd *make_cmd(THD *thd) override;
3511};
3512
3513/// Base class for Parse tree nodes of SHOW statements
3514
3516 protected:
3517 PT_show_base(const POS &pos, enum_sql_command sql_command)
3518 : Parse_tree_root(pos), m_sql_command(sql_command) {}
3519
3520 /// SQL command
3522};
3523
3524/// Base class for Parse tree nodes of SHOW statements with LIKE/WHERE parameter
3525
3527 protected:
3529 const LEX_STRING &wild, Item *where)
3530 : PT_show_base(pos, sql_command), m_wild(wild), m_where(where) {
3531 assert(m_wild.str == nullptr || m_where == nullptr);
3532 }
3533 /// Wild or where clause used in the statement.
3536};
3537
3538/// Base class for Parse tree nodes of SHOW statements with schema parameter.
3539
3541 protected:
3543 char *opt_db, const LEX_STRING &wild, Item *where)
3544 : PT_show_base(pos, sql_command),
3546 m_wild(wild),
3547 m_where(where) {
3548 assert(m_wild.str == nullptr || m_where == nullptr);
3549 }
3550 /// Optional schema name in FROM/IN clause.
3552 /// Wild or where clause used in the statement.
3555};
3556
3557/// Base class for Parse tree nodes of SHOW COLUMNS/SHOW INDEX statements.
3558
3560 protected:
3561 PT_show_table_base(const POS &pos, enum_sql_command sql_command,
3562 Table_ident *table_ident, const LEX_STRING &wild,
3563 Item *where)
3564 : PT_show_filter_base(pos, sql_command, wild, where),
3565 m_table_ident(table_ident) {}
3566
3567 bool make_table_base_cmd(THD *thd, bool *temporary);
3568
3569 /// Table used in the statement.
3571};
3572
3573/// Parse tree node for SHOW FUNCTION/PROCEDURE CODE statements.
3574
3576 protected:
3578 const sp_name *routine_name)
3579 : PT_show_base(pos, sql_command), m_sql_cmd(sql_command, routine_name) {}
3580
3581 Sql_cmd *make_cmd(THD *thd) override;
3582
3583 private:
3585};
3586
3587/// Parse tree node for SHOW BINLOG EVENTS statement
3588
3590 public:
3591 PT_show_binlog_events(const POS &pos, const LEX_STRING opt_log_file_name = {},
3592 PT_limit_clause *opt_limit_clause = nullptr)
3594 m_opt_log_file_name(opt_log_file_name),
3595 m_opt_limit_clause(opt_limit_clause) {}
3596
3597 Sql_cmd *make_cmd(THD *thd) override;
3598
3599 private:
3602
3604};
3605
3606/// Parse tree node for SHOW BINLOGS statement
3607
3608class PT_show_binlogs final : public PT_show_base {
3609 public:
3611
3612 Sql_cmd *make_cmd(THD *thd) override;
3613
3614 private:
3616};
3617
3618/// Parse tree node for SHOW CHARACTER SET statement
3619
3621 public:
3622 PT_show_charsets(const POS &pos, const LEX_STRING &wild, Item *where)
3624
3625 Sql_cmd *make_cmd(THD *thd) override;
3626
3627 private:
3629};
3630
3631/// Parse tree node for SHOW COLLATIONS statement
3632
3634 public:
3635 PT_show_collations(const POS &pos, const LEX_STRING &wild, Item *where)
3637
3638 Sql_cmd *make_cmd(THD *thd) override;
3639
3640 private:
3642};
3643
3644/// Base class for Parse tree nodes of SHOW COUNT(*) { WARNINGS | ERRORS }
3645/// statements.
3646
3648 public:
3649 explicit PT_show_count_base(const POS &pos)
3650 : PT_show_base{pos, SQLCOM_SELECT} {}
3651
3652 protected:
3653 Sql_cmd *make_cmd_generic(THD *thd, LEX_CSTRING diagnostic_variable_name);
3654};
3655
3656/// Parse tree node for SHOW COUNT(*) ERRORS
3657
3659 public:
3660 explicit PT_show_count_errors(const POS &pos) : PT_show_count_base(pos) {}
3661
3662 Sql_cmd *make_cmd(THD *thd) override {
3663 return make_cmd_generic(thd, LEX_CSTRING{STRING_WITH_LEN("error_count")});
3664 }
3665};
3666
3667/// Parse tree node for SHOW COUNT(*) WARNINGS
3668
3670 public:
3671 explicit PT_show_count_warnings(const POS &pos) : PT_show_count_base(pos) {}
3672
3673 Sql_cmd *make_cmd(THD *thd) override {
3674 return make_cmd_generic(thd, LEX_CSTRING{STRING_WITH_LEN("warning_count")});
3675 }
3676};
3677
3678/// Parse tree node for SHOW CREATE DATABASE statement
3679
3681 public:
3682 PT_show_create_database(const POS &pos, bool if_not_exists,
3683 const LEX_STRING &name)
3685 m_if_not_exists(if_not_exists),
3686 m_name(name) {}
3687
3688 Sql_cmd *make_cmd(THD *thd) override;
3689
3690 private:
3693
3695};
3696
3697/// Parse tree node for SHOW CREATE EVENT statement
3698
3700 public:
3701 PT_show_create_event(const POS &pos, sp_name *event_name)
3702 : PT_show_base(pos, SQLCOM_SHOW_CREATE_EVENT), m_spname(event_name) {}
3703
3704 Sql_cmd *make_cmd(THD *thd) override;
3705
3706 private:
3708
3710};
3711
3712/// Parse tree node for SHOW CREATE FUNCTION statement
3713
3715 public:
3716 PT_show_create_function(const POS &pos, sp_name *function_name)
3717 : PT_show_base(pos, SQLCOM_SHOW_CREATE_FUNC), m_spname(function_name) {}
3718
3719 Sql_cmd *make_cmd(THD *thd) override;
3720
3721 private:
3723
3725};
3726
3727/// Parse tree node for SHOW CREATE LIBRARY statement
3728
3730 public:
3731 PT_show_create_library(const POS &pos, sp_name *library_name)
3732 : PT_show_base(pos, SQLCOM_SHOW_CREATE_LIBRARY), m_spname(library_name) {}
3733
3734 Sql_cmd *make_cmd(THD *thd) override;
3735
3736 private:
3738
3740};
3741
3742/// Parse tree node for SHOW CREATE PROCEDURE statement
3743
3745 public:
3746 PT_show_create_procedure(const POS &pos, sp_name *procedure_name)
3747 : PT_show_base(pos, SQLCOM_SHOW_CREATE_PROC), m_spname(procedure_name) {}
3748
3749 Sql_cmd *make_cmd(THD *thd) override;
3750
3751 private:
3753
3755};
3756
3757/// Parse tree node for SHOW CREATE TABLE and VIEW statements
3758
3760 public:
3761 PT_show_create_table(const POS &pos, Table_ident *table_ident)
3762 : PT_show_base(pos, SQLCOM_SHOW_CREATE), m_sql_cmd(false, table_ident) {}
3763
3764 Sql_cmd *make_cmd(THD *thd) override;
3765
3766 private:
3768};
3769
3770/// Parse tree node for SHOW CREATE TRIGGER statement
3771
3773 public:
3774 PT_show_create_trigger(const POS &pos, sp_name *trigger_name)
3775 : PT_show_base(pos, SQLCOM_SHOW_CREATE_TRIGGER), m_spname(trigger_name) {}
3776
3777 Sql_cmd *make_cmd(THD *thd) override;
3778
3779 private:
3781
3783};
3784
3785/// Parse tree node for SHOW CREATE USER statement
3786
3787class PT_show_create_user final : public PT_show_base {
3788 public:
3791
3792 Sql_cmd *make_cmd(THD *thd) override;
3793
3794 private:
3796
3798};
3799
3800/// Parse tree node for SHOW CREATE VIEW statement
3801
3802class PT_show_create_view final : public PT_show_base {
3803 public:
3804 PT_show_create_view(const POS &pos, Table_ident *table_ident)
3805 : PT_show_base(pos, SQLCOM_SHOW_CREATE), m_sql_cmd(true, table_ident) {}
3806
3807 Sql_cmd *make_cmd(THD *thd) override;
3808
3809 private:
3811};
3812
3813/// Parse tree node for SHOW DATABASES statement
3814
3816 public:
3817 PT_show_databases(const POS &pos, const LEX_STRING &wild, Item *where)
3819
3820 Sql_cmd *make_cmd(THD *thd) override;
3821
3822 private:
3824};
3825
3826/// Parse tree node for SHOW ENGINE statements
3827
3829 protected:
3830 PT_show_engine_base(const POS &pos, enum enum_sql_command sql_command,
3831 const LEX_STRING opt_engine = {})
3832 : PT_show_base(pos, sql_command),
3833 m_engine(opt_engine),
3834 m_all(opt_engine.str == nullptr) {}
3835
3837 bool m_all;
3838};
3839
3840/// Parse tree node for SHOW ENGINE LOGS statement
3841
3843 public:
3844 PT_show_engine_logs(const POS &pos, LEX_STRING opt_engine = {})
3845 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_LOGS, opt_engine) {}
3846
3847 Sql_cmd *make_cmd(THD *thd) override;
3848
3849 private:
3851};
3852
3853/// Parse tree node for SHOW ENGINE MUTEX statement
3854
3856 public:
3857 PT_show_engine_mutex(const POS &pos, LEX_STRING opt_engine = {})
3858 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_MUTEX, opt_engine) {}
3859
3860 Sql_cmd *make_cmd(THD *thd) override;
3861
3862 private:
3864};
3865
3866/// Parse tree node for SHOW ENGINE STATUS statement
3867
3869 public:
3870 PT_show_engine_status(const POS &pos, LEX_STRING opt_engine = {})
3871 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_STATUS, opt_engine) {}
3872
3873 Sql_cmd *make_cmd(THD *thd) override;
3874
3875 private:
3877};
3878
3879/// Parse tree node for SHOW ENGINES statement
3880
3881class PT_show_engines final : public PT_show_base {
3882 public:
3885
3886 Sql_cmd *make_cmd(THD *thd) override;
3887
3888 private:
3890};
3891
3892/// Parse tree node for SHOW ERRORS statement
3893
3894class PT_show_errors final : public PT_show_base {
3895 public:
3896 PT_show_errors(const POS &pos, PT_limit_clause *opt_limit_clause = nullptr)
3898 m_opt_limit_clause(opt_limit_clause) {}
3899
3900 Sql_cmd *make_cmd(THD *thd) override;
3901
3902 private:
3904
3906};
3907
3908/// Parse tree node for SHOW EVENTS statement
3909
3911 public:
3912 PT_show_events(const POS &pos, char *opt_db, const LEX_STRING &wild,
3913 Item *where)
3915
3916 Sql_cmd *make_cmd(THD *thd) override;
3917
3918 private:
3920};
3921
3922/// Parse tree node for SHOW COLUMNS statement.
3923
3926
3927 public:
3928 PT_show_fields(const POS &pos, Show_cmd_type show_cmd_type,
3929 Table_ident *table, LEX_STRING opt_wild = {},
3930 Item *opt_where = nullptr)
3931 : PT_show_table_base(pos, SQLCOM_SHOW_FIELDS, table, opt_wild, opt_where),
3932 m_show_cmd_type(show_cmd_type) {}
3933
3934 Sql_cmd *make_cmd(THD *thd) override;
3935
3936 private:
3939};
3940
3941/// Parse tree node for SHOW FUNCTION CODE statement.
3942
3944 public:
3945 PT_show_function_code(const POS &pos, const sp_name *function_name)
3946 : PT_show_routine_code(pos, SQLCOM_SHOW_FUNC_CODE, function_name) {}
3947};
3948
3949/// Parse tree node for SHOW GRANTS statement.
3950
3951class PT_show_grants final : public PT_show_base {
3952 public:
3953 PT_show_grants(const POS &pos, const LEX_USER *opt_for_user,
3954 const List<LEX_USER> *opt_using_users)
3956 sql_cmd(opt_for_user, opt_using_users) {
3957 assert(opt_using_users == nullptr || opt_for_user != nullptr);
3958 }
3959
3960 Sql_cmd *make_cmd(THD *thd) override;
3961
3962 private:
3964};
3965
3966/// Parse tree node for SHOW INDEX statement.
3967
3968class PT_show_keys final : public PT_show_table_base {
3969 public:
3970 PT_show_keys(const POS &pos, bool extended_show, Table_ident *table,
3971 Item *where)
3973 m_extended_show(extended_show) {}
3974
3975 Sql_cmd *make_cmd(THD *thd) override;
3976
3977 private:
3979
3980 // Flag to indicate EXTENDED keyword usage in the statement.
3983};
3984
3985/// Parse tree node for SHOW BINARY LOG STATUS statement
3986
3988 public:
3991
3992 Sql_cmd *make_cmd(THD *thd) override;
3993
3994 private:
3996};
3997
3998/// Parse tree node for SHOW OPEN TABLES statement
3999
4001 public:
4002 PT_show_open_tables(const POS &pos, char *opt_db, const LEX_STRING &wild,
4003 Item *where)
4005 }
4006
4007 Sql_cmd *make_cmd(THD *thd) override;
4008
4009 private:
4011};
4012
4013/// Parse tree node for SHOW PLUGINS statement
4014
4015class PT_show_plugins final : public PT_show_base {
4016 public:
4018
4019 Sql_cmd *make_cmd(THD *thd) override;
4020
4021 private:
4023};
4024
4025/// Parse tree node for SHOW PRIVILEGES statement
4026
4027class PT_show_privileges final : public PT_show_base {
4028 public:
4031
4032 Sql_cmd *make_cmd(THD *thd) override;
4033
4034 private:
4036};
4037
4038/// Parse tree node for SHOW PARSE_TREE statement
4039
4040class PT_show_parse_tree final : public PT_show_base {
4041 public:
4042 PT_show_parse_tree(const POS &pos, Parse_tree_root *parse_tree_stmt)
4044 m_parse_tree_stmt(parse_tree_stmt) {}
4045
4046 Sql_cmd *make_cmd(THD *thd) override;
4047
4048 private:
4051};
4052
4053/// Parse tree node for SHOW FUNCTION CODE statement.
4054
4056 public:
4057 PT_show_procedure_code(const POS &pos, const sp_name *procedure_name)
4058 : PT_show_routine_code(pos, SQLCOM_SHOW_PROC_CODE, procedure_name) {}
4059};
4060
4061/// Parse tree node for SHOW PROCESSLIST statement
4062
4063class PT_show_processlist final : public PT_show_base {
4064 public:
4067
4068 Sql_cmd *make_cmd(THD *thd) override;
4069
4070 private:
4072};
4073
4074/// Parse tree node for SHOW PROFILE statement
4075
4076class PT_show_profile final : public PT_show_base {
4077 public:
4078 PT_show_profile(const POS &pos, uint opt_profile_options = 0,
4079 my_thread_id opt_query_id = 0,
4080 PT_limit_clause *opt_limit_clause = nullptr)
4082 m_opt_profile_options(opt_profile_options),
4083 m_opt_query_id(opt_query_id),
4084 m_opt_limit_clause(opt_limit_clause) {}
4085
4086 Sql_cmd *make_cmd(THD *thd) override;
4087
4088 private:
4092
4094};
4095
4096/// Parse tree node for SHOW PROFILES statement
4097
4098class PT_show_profiles final : public PT_show_base {
4099 public:
4101
4102 Sql_cmd *make_cmd(THD *thd) override;
4103
4104 private:
4106};
4107
4108/// Parse tree node for SHOW RELAYLOG EVENTS statement
4109
4111 public:
4113 const LEX_STRING opt_log_file_name = {},
4114 PT_limit_clause *opt_limit_clause = nullptr,
4115 LEX_CSTRING opt_channel_name = {})
4117 m_opt_log_file_name(opt_log_file_name),
4118 m_opt_limit_clause(opt_limit_clause),
4119 m_opt_channel_name(opt_channel_name) {}
4120
4121 Sql_cmd *make_cmd(THD *thd) override;
4122
4123 private:
4127
4129};
4130
4131/// Parse tree node for SHOW REPLICAS statement
4132
4133class PT_show_replicas final : public PT_show_base {
4134 public:
4136
4137 Sql_cmd *make_cmd(THD *thd) override;
4138
4139 private:
4141};
4142
4143/// Parse tree node for SHOW REPLICA STATUS statement
4144
4146 public:
4147 PT_show_replica_status(const POS &pos, LEX_CSTRING opt_channel_name = {})
4149 m_opt_channel_name(opt_channel_name) {}
4150
4151 Sql_cmd *make_cmd(THD *thd) override;
4152
4153 private:
4155
4157};
4158
4159/// Parse tree node for SHOW STATUS statement
4160
4162 public:
4163 PT_show_status(const POS &pos, enum_var_type var_type, const LEX_STRING &wild,
4164 Item *where)
4166 m_var_type(var_type) {
4168 }
4169
4170 Sql_cmd *make_cmd(THD *thd) override;
4171
4172 private:
4174
4176};
4177
4178/// Parse tree node for SHOW STATUS LIBRARY statement
4179
4181 public:
4184
4185 Sql_cmd *make_cmd(THD *thd) override;
4186
4187 private:
4189};
4190
4191/// Parse tree node for SHOW STATUS FUNCTION statement
4192
4194 public:
4195 PT_show_status_func(const POS &pos, const LEX_STRING &wild, Item *where)
4197
4198 Sql_cmd *make_cmd(THD *thd) override;
4199
4200 private:
4202};
4203
4204/// Parse tree node for SHOW STATUS PROCEDURE statement
4205
4207 public:
4208 PT_show_status_proc(const POS &pos, const LEX_STRING &wild, Item *where)
4210
4211 Sql_cmd *make_cmd(THD *thd) override;
4212
4213 private:
4215};
4216
4217/// Parse tree node for SHOW TABLE STATUS statement
4218
4220 public:
4221 PT_show_table_status(const POS &pos, char *opt_db, const LEX_STRING &wild,
4222 Item *where)
4224 where) {}
4225
4226 Sql_cmd *make_cmd(THD *thd) override;
4227
4228 private:
4230};
4231
4232/// Parse tree node for SHOW TABLES statement
4233
4235 public:
4236 PT_show_tables(const POS &pos, Show_cmd_type show_cmd_type, char *opt_db,
4237 const LEX_STRING &wild, Item *where)
4239 m_show_cmd_type(show_cmd_type) {}
4240
4241 Sql_cmd *make_cmd(THD *thd) override;
4242
4243 private:
4245
4247};
4248
4249/// Parse tree node for SHOW TRIGGERS statement
4250
4252 public:
4253 PT_show_triggers(const POS &pos, bool full, char *opt_db,
4254 const LEX_STRING &wild, Item *where)
4256 m_full(full) {}
4257
4258 Sql_cmd *make_cmd(THD *thd) override;
4259
4260 private:
4262
4264};
4265
4266/// Parse tree node for SHOW VARIABLES statement
4267
4269 public:
4271 const LEX_STRING &wild, Item *where)
4273 m_var_type(var_type) {
4275 }
4276
4277 Sql_cmd *make_cmd(THD *thd) override;
4278
4279 private:
4281
4283};
4284
4285/// Parse tree node for SHOW WARNINGS statement
4286
4287class PT_show_warnings final : public PT_show_base {
4288 public:
4289 PT_show_warnings(const POS &pos, PT_limit_clause *opt_limit_clause = nullptr)
4291 m_opt_limit_clause(opt_limit_clause) {}
4292
4293 Sql_cmd *make_cmd(THD *thd) override;
4294
4295 private:
4297
4299};
4300
4303
4304 protected:
4305 explicit PT_alter_table_action(const POS &pos,
4307 : super(pos), flag(flag) {}
4308
4309 public:
4310 bool do_contextualize(Table_ddl_parse_context *pc) override;
4311
4312 protected:
4313 /**
4314 A routine used by the parser to decide whether we are specifying a full
4315 partitioning or if only partitions to add or to reorganize.
4316
4317 @retval true ALTER TABLE ADD/REORGANIZE PARTITION.
4318 @retval false Something else.
4319 */
4323 }
4324
4325 public:
4327};
4328
4331
4332 public:
4333 PT_alter_table_add_column(const POS &pos, const LEX_STRING &field_ident,
4334 PT_field_def_base *field_def,
4335 PT_table_constraint_def *opt_column_constraint,
4336 const char *opt_place)
4337 : super(pos, Alter_info::ALTER_ADD_COLUMN),
4338 m_column_def(POS(), field_ident, field_def, opt_column_constraint,
4339 opt_place) {}
4340
4343 }
4344
4345 private:
4346 PT_column_def m_column_def; // TODO: Position is not set.
4347};
4348
4351
4352 public:
4354 const POS &pos, const Mem_root_array<PT_table_element *> *columns)
4355 : super(pos, Alter_info::ALTER_ADD_COLUMN), m_columns(columns) {}
4356
4358 if (super::do_contextualize(pc)) return true;
4359
4360 for (auto *column : *m_columns)
4361 if (column->contextualize(pc)) return true;
4362
4363 return false;
4364 }
4365
4366 private:
4368};
4369
4372
4373 public:
4375 PT_table_constraint_def *constraint)
4376 : super(pos, Alter_info::ALTER_ADD_INDEX), m_constraint(constraint) {}
4377
4380 }
4381
4382 private:
4384};
4385
4388
4389 public:
4390 PT_alter_table_change_column(const POS &pos, const LEX_STRING &old_name,
4391 const LEX_STRING &new_name,
4392 PT_field_def_base *field_def,
4393 const char *opt_place)
4394 : super(pos, Alter_info::ALTER_CHANGE_COLUMN),
4395 m_old_name(old_name),
4396 m_new_name(new_name),
4397 m_field_def(field_def),
4398 m_opt_place(opt_place) {}
4399
4401 PT_field_def_base *field_def,
4402 const char *opt_place)
4403 : PT_alter_table_change_column(pos, name, name, field_def, opt_place) {}
4404
4405 bool do_contextualize(Table_ddl_parse_context *pc) override;
4406
4407 private:
4411 const char *m_opt_place;
4412};
4413
4416
4417 protected:
4419 Alter_info::Alter_info_flag alter_info_flag,
4420 const char *name)
4421 : super(pos, alter_info_flag), m_alter_drop(drop_type, name) {}
4422
4423 public:
4425 return (super::do_contextualize(pc) ||
4426 pc->alter_info->drop_list.push_back(&m_alter_drop));
4427 }
4428
4429 private:
4431};
4432
4434 public:
4435 explicit PT_alter_table_drop_column(const POS &pos, const char *name)
4436 : PT_alter_table_drop(pos, Alter_drop::COLUMN,
4437 Alter_info::ALTER_DROP_COLUMN, name) {}
4438};
4439
4441 public:
4442 explicit PT_alter_table_drop_foreign_key(const POS &pos, const char *name)
4444 Alter_info::DROP_FOREIGN_KEY, name) {}
4445};
4446
4448 public:
4449 explicit PT_alter_table_drop_key(const POS &pos, const char *name)
4450 : PT_alter_table_drop(pos, Alter_drop::KEY, Alter_info::ALTER_DROP_INDEX,
4451 name) {}
4452};
4453
4455 public:
4457 const char *name)
4458 : PT_alter_table_drop(pos, Alter_drop::CHECK_CONSTRAINT,
4459 Alter_info::DROP_CHECK_CONSTRAINT, name) {}
4460};
4461
4463 public:
4464 explicit PT_alter_table_drop_constraint(const POS &pos, const char *name)
4465 : PT_alter_table_drop(pos, Alter_drop::ANY_CONSTRAINT,
4466 Alter_info::DROP_ANY_CONSTRAINT, name) {}
4467};
4468
4471
4472 protected:
4474 const POS &pos, Alter_constraint_enforcement::Type alter_type,
4475 Alter_info::Alter_info_flag alter_info_flag, const char *name,
4476 bool is_enforced)
4477 : super(pos, alter_info_flag),
4478 m_constraint_enforcement(alter_type, name, is_enforced) {}
4479
4480 public:
4481 explicit PT_alter_table_enforce_constraint(const POS &pos, const char *name,
4482 bool is_enforced)
4483 : super(pos, is_enforced ? Alter_info::ENFORCE_ANY_CONSTRAINT
4484 : Alter_info::SUSPEND_ANY_CONSTRAINT),
4486 Alter_constraint_enforcement::Type::ANY_CONSTRAINT, name,
4487 is_enforced) {}
4488
4490 return (super::do_contextualize(pc) ||
4493 }
4494
4495 private:
4497};
4498
4501 public:
4503 const char *name,
4504 bool is_enforced)
4506 pos, Alter_constraint_enforcement::Type::CHECK_CONSTRAINT,
4507 is_enforced ? Alter_info::ENFORCE_CHECK_CONSTRAINT
4508 : Alter_info::SUSPEND_CHECK_CONSTRAINT,
4509 name, is_enforced) {}
4510};
4511
4514
4515 public:
4516 explicit PT_alter_table_enable_keys(const POS &pos, bool enable)
4517 : super(pos, Alter_info::ALTER_KEYS_ONOFF), m_enable(enable) {}
4518
4520 pc->alter_info->keys_onoff =
4522 return super::do_contextualize(pc);
4523 }
4524
4525 private:
4527};
4528
4531
4532 public:
4533 PT_alter_table_set_default(const POS &pos, const char *col_name,
4534 Item *opt_default_expr)
4535 : super(pos, Alter_info::ALTER_CHANGE_COLUMN_DEFAULT),
4536 m_name(col_name),
4537 m_expr(opt_default_expr) {}
4538
4539 bool do_contextualize(Table_ddl_parse_context *pc) override;
4540
4541 private:
4542 const char *m_name;
4544};
4545
4547 : public PT_alter_table_action {
4549
4550 private:
4551 const char *m_name;
4553
4554 public:
4555 PT_alter_table_set_masking_policy_name(const POS &pos, const char *col_name,
4556 LEX_CSTRING policy_name)
4557 : super{pos, Alter_info::ALTER_COLUMN_MASKING},
4558 m_name{col_name},
4559 m_policy_name{policy_name} {}
4560
4561 bool do_contextualize(Table_ddl_parse_context *pc) override;
4562};
4563
4566
4567 public:
4568 PT_alter_table_column_visibility(const POS &pos, const char *col_name,
4569 bool is_visible)
4570 : super(pos, Alter_info::ALTER_COLUMN_VISIBILITY),
4571 m_alter_column(col_name, is_visible) {}
4572
4574 return (super::do_contextualize(pc) ||
4575 pc->alter_info->alter_list.push_back(&m_alter_column));
4576 }
4577
4578 private:
4580};
4581
4584
4585 public:
4586 PT_alter_table_index_visible(const POS &pos, const char *name, bool visible)
4587 : super(pos, Alter_info::ALTER_INDEX_VISIBILITY),
4588 m_alter_index_visibility(name, visible) {}
4589
4591 return (super::do_contextualize(pc) ||
4594 }
4595
4596 private:
4598};
4599
4602
4603 public:
4604 explicit PT_alter_table_rename(const POS &pos, const Table_ident *ident)
4605 : super(pos, Alter_info::ALTER_RENAME), m_ident(ident) {}
4606
4607 bool do_contextualize(Table_ddl_parse_context *pc) override;
4608
4609 bool is_rename_table() const override { return true; }
4610
4611 private:
4612 const Table_ident *const m_ident;
4613};
4614
4617
4618 public:
4619 PT_alter_table_rename_key(const POS &pos, const char *from, const char *to)
4620 : super(pos, Alter_info::ALTER_RENAME_INDEX), m_rename_key(from, to) {}
4621
4623 return super::do_contextualize(pc) ||
4625 }
4626
4627 private:
4629};
4630
4633
4634 public:
4635 PT_alter_table_rename_column(const POS &pos, const char *from, const char *to)
4636 : super(pos, Alter_info::ALTER_CHANGE_COLUMN),
4637 m_rename_column(from, to) {}
4638
4640 return super::do_contextualize(pc) ||
4641 pc->alter_info->alter_list.push_back(&m_rename_column);
4642 }
4643
4644 private:
4646};
4647
4650
4651 public:
4653 const CHARSET_INFO *opt_collation)
4654 : super(pos, Alter_info::ALTER_OPTIONS),
4656 m_collation(opt_collation) {}
4657
4658 bool do_contextualize(Table_ddl_parse_context *pc) override;
4659
4660 private:
4663};
4664
4667
4668 public:
4669 explicit PT_alter_table_force(const POS &pos)
4670 : super(pos, Alter_info::ALTER_RECREATE) {}
4671};
4672
4675
4676 public:
4677 explicit PT_alter_table_order(const POS &pos, PT_order_list *order)
4678 : super(pos, Alter_info::ALTER_ORDER), m_order(order) {}
4679
4680 bool do_contextualize(Table_ddl_parse_context *pc) override;
4681
4682 private:
4684};
4685
4688
4689 public:
4690 explicit PT_alter_table_partition_by(const POS &pos, PT_partition *partition)
4691 : super(pos, Alter_info::ALTER_PARTITION), m_partition(partition) {}
4692
4693 bool do_contextualize(Table_ddl_parse_context *pc) override;
4694
4695 private:
4697};
4698
4701
4702 public:
4704 : super(pos, Alter_info::ALTER_REMOVE_PARTITIONING) {}
4705};
4706
4709
4710 friend class PT_alter_table_standalone_stmt; // to access make_cmd()
4711
4712 protected:
4714 Alter_info::Alter_info_flag alter_info_flag)
4715 : super(pos, alter_info_flag) {}
4716
4717 private:
4719};
4720
4721/**
4722 Node for the @SQL{ALTER TABLE ADD PARTITION} statement
4723
4724 @ingroup ptn_alter_table
4725*/
4728
4729 public:
4730 explicit PT_alter_table_add_partition(const POS &pos, bool no_write_to_binlog)
4731 : super(pos, Alter_info::ALTER_ADD_PARTITION),
4732 m_no_write_to_binlog(no_write_to_binlog) {}
4733
4734 bool do_contextualize(Table_ddl_parse_context *pc) override;
4735
4737 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4738 }
4739
4740 protected:
4742
4743 private:
4745};
4746
4747/**
4748 Node for the @SQL{ALTER TABLE ADD PARTITION (@<partition list@>)} statement
4749
4750 @ingroup ptn_alter_table
4751*/
4755
4756 public:
4758 const POS &pos, bool no_write_to_binlog,
4760 : super(pos, no_write_to_binlog), m_def_list(def_list) {}
4761
4762 bool do_contextualize(Table_ddl_parse_context *pc) override;
4763
4764 private:
4766};
4767
4768/**
4769 Node for the @SQL{ALTER TABLE ADD PARTITION PARTITIONS (@<n>@)} statement
4770
4771 @ingroup ptn_alter_table
4772*/
4776
4777 public:
4778 PT_alter_table_add_partition_num(const POS &pos, bool no_write_to_binlog,
4779 uint num_parts)
4780 : super(pos, no_write_to_binlog) {
4781 m_part_info.num_parts = num_parts;
4782 }
4783};
4784
4788
4789 public:
4791 const List<String> &partitions)
4792 : super(pos, Alter_info::ALTER_DROP_PARTITION),
4793 m_partitions(partitions) {}
4794
4795 bool do_contextualize(Table_ddl_parse_context *pc) override;
4796
4798 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4799 }
4800
4801 private:
4803};
4804
4808
4809 public:
4811 const POS &pos, Alter_info::Alter_info_flag alter_info_flag,
4812 const List<String> *opt_partition_list)
4813 : super(pos, alter_info_flag), m_opt_partition_list(opt_partition_list) {}
4814
4816 assert(pc->alter_info->partition_names.is_empty());
4817 if (m_opt_partition_list == nullptr)
4819 else
4821 return super::do_contextualize(pc);
4822 }
4823
4824 private:
4826};
4827
4831
4832 public:
4833 PT_alter_table_rebuild_partition(const POS &pos, bool no_write_to_binlog,
4834 const List<String> *opt_partition_list)
4835 : super(pos, Alter_info::ALTER_REBUILD_PARTITION, opt_partition_list),
4836 m_no_write_to_binlog(no_write_to_binlog) {}
4837
4838 bool do_contextualize(Table_ddl_parse_context *pc) override;
4839
4841 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4842 }
4843
4844 private:
4846};
4847
4851
4852 public:
4853 PT_alter_table_optimize_partition(const POS &pos, bool no_write_to_binlog,
4854 const List<String> *opt_partition_list)
4855 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4856 m_no_write_to_binlog(no_write_to_binlog) {}
4857
4858 bool do_contextualize(Table_ddl_parse_context *pc) override;
4859
4861 return new (pc->mem_root)
4863 }
4864
4865 private:
4867};
4868
4872
4873 public:
4874 PT_alter_table_analyze_partition(const POS &pos, bool no_write_to_binlog,
4875 const List<String> *opt_partition_list)
4876 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4877 m_no_write_to_binlog(no_write_to_binlog) {}
4878
4879 bool do_contextualize(Table_ddl_parse_context *pc) override;
4881 return new (pc->mem_root)
4883 }
4884
4885 private:
4887};
4888
4892
4893 public:
4895 const List<String> *opt_partition_list,
4896 uint flags, uint sql_flags)
4897 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4898 m_flags(flags),
4899 m_sql_flags(sql_flags) {}
4900
4901 bool do_contextualize(Table_ddl_parse_context *pc) override;
4902
4904 return new (pc->mem_root)
4906 }
4907
4908 private:
4911};
4912
4916
4917 public:
4918 PT_alter_table_repair_partition(const POS &pos, bool no_write_to_binlog,
4919 const List<String> *opt_partition_list,
4920 uint flags, uint sql_flags)
4921 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4922 m_no_write_to_binlog(no_write_to_binlog),
4923 m_flags(flags),
4924 m_sql_flags(sql_flags) {}
4925
4926 bool do_contextualize(Table_ddl_parse_context *pc) override;
4927
4929 return new (pc->mem_root)
4931 }
4932
4933 private:
4937};
4938
4942
4943 public:
4944 PT_alter_table_coalesce_partition(const POS &pos, bool no_write_to_binlog,
4945 uint num_parts)
4946 : super(pos, Alter_info::ALTER_COALESCE_PARTITION),
4947 m_no_write_to_binlog(no_write_to_binlog),
4948 m_num_parts(num_parts) {}
4949
4950 bool do_contextualize(Table_ddl_parse_context *pc) override;
4951
4953 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4954 }
4955
4956 private:
4958 const uint m_num_parts;
4959};
4960
4964
4965 public:
4967 const POS &pos, const List<String> *opt_partition_list)
4968 : super(pos,
4969 static_cast<Alter_info::Alter_info_flag>(
4970 Alter_info::ALTER_ADMIN_PARTITION |
4971 Alter_info::ALTER_TRUNCATE_PARTITION),
4972 opt_partition_list) {}
4973
4974 bool do_contextualize(Table_ddl_parse_context *pc) override;
4975
4977 return new (pc->mem_root)
4979 }
4980};
4981
4985
4986 public:
4988 bool no_write_to_binlog)
4989 : super(pos, Alter_info::ALTER_TABLE_REORG),
4990 m_no_write_to_binlog(no_write_to_binlog) {}
4991
4992 bool do_contextualize(Table_ddl_parse_context *pc) override;
4993
4995 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4996 }
4997
4998 private:
5001};
5002
5006
5007 public:
5009 const POS &pos, bool no_write_to_binlog,
5010 const List<String> &partition_names,
5012 : super(pos, Alter_info::ALTER_REORGANIZE_PARTITION),
5013 m_no_write_to_binlog(no_write_to_binlog),
5014 m_partition_names(partition_names),
5015 m_into(into) {}
5016
5017 bool do_contextualize(Table_ddl_parse_context *pc) override;
5018
5020 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
5021 }
5022
5023 private:
5028};
5029
5033
5034 public:
5036 const LEX_STRING &partition_name,
5039 : super(pos, Alter_info::ALTER_EXCHANGE_PARTITION),
5040 m_partition_name(partition_name),
5042 m_validation(validation) {}
5043
5044 bool do_contextualize(Table_ddl_parse_context *pc) override;
5045
5047 return new (pc->mem_root)
5049 }
5050
5051 private:
5055};
5056
5060
5064
5065 public:
5067 const POS &pos, Item_num *validation_only_rows,
5069 const List<String> *opt_use_partition = nullptr)
5070 : super(pos, Alter_info::ALTER_SECONDARY_LOAD),
5072 m_validation_rows(validation_only_rows),
5073 m_guided(guided) {}
5074
5076 if (opt_use_partition != nullptr)
5078
5080 if (m_validation_rows != nullptr) {
5081 pc->alter_info->validation_only = true;
5083 } else {
5084 pc->alter_info->validation_only = false;
5086 }
5087
5089 }
5090};
5091
5095
5097
5098 public:
5100 const POS &pos, const List<String> *opt_use_partition = nullptr)
5101 : super(pos, Alter_info::ALTER_SECONDARY_UNLOAD),
5103
5105 if (opt_use_partition != nullptr)
5107
5109 }
5110};
5111
5115
5116 public:
5118 const POS &pos, const List<String> *opt_partition_list)
5119 : super(pos, Alter_info::ALTER_DISCARD_TABLESPACE, opt_partition_list) {}
5120
5123 }
5124};
5125
5129
5130 public:
5132 const POS &pos, const List<String> *opt_partition_list)
5133 : super(pos, Alter_info::ALTER_IMPORT_TABLESPACE, opt_partition_list) {}
5134
5137 }
5138};
5139
5143
5144 public:
5146 : super(pos, Alter_info::ALTER_DISCARD_TABLESPACE) {}
5147
5150 }
5151};
5152
5156
5157 public:
5159 : super(pos, Alter_info::ALTER_IMPORT_TABLESPACE) {}
5160
5163 }
5164};
5165
5167 public:
5176 m_opt_actions(opt_actions),
5177 m_algo(algo),
5178 m_lock(lock),
5179 m_validation(validation) {}
5180
5181 Sql_cmd *make_cmd(THD *thd) override;
5182
5183 private:
5189
5191};
5192
5194 public:
5204 m_algo(algo),
5205 m_lock(lock),
5206 m_validation(validation) {}
5207
5208 Sql_cmd *make_cmd(THD *thd) override;
5209
5210 private:
5216
5218};
5219
5221 public:
5223 bool no_write_to_binlog,
5225 decltype(HA_CHECK_OPT::flags) flags,
5226 decltype(HA_CHECK_OPT::sql_flags) sql_flags)
5228 m_no_write_to_binlog(no_write_to_binlog),
5229 m_table_list(table_list),
5230 m_flags(flags),
5231 m_sql_flags(sql_flags) {}
5232
5233 Sql_cmd *make_cmd(THD *thd) override;
5234
5235 private:
5240};
5241
5243 public:
5245 bool no_write_to_binlog,
5248 int num_buckets, List<String> *columns, LEX_STRING data,
5249 bool auto_update)
5251 m_no_write_to_binlog(no_write_to_binlog),
5252 m_table_list(table_list),
5253 m_command(command),
5254 m_num_buckets(num_buckets),
5255 m_columns(columns),
5256 m_data{data},
5257 m_auto_update(auto_update) {}
5258
5259 Sql_cmd *make_cmd(THD *thd) override;
5260
5261 private:
5265 const int m_num_buckets;
5268 const bool m_auto_update;
5269};
5270
5272 public:
5275 decltype(HA_CHECK_OPT::flags) flags,
5276 decltype(HA_CHECK_OPT::sql_flags) sql_flags)
5278 m_table_list(table_list),
5279 m_flags(flags),
5280 m_sql_flags(sql_flags) {}
5281
5282 Sql_cmd *make_cmd(THD *thd) override;
5283
5284 private:
5288};
5289
5291 public:
5293 bool no_write_to_binlog,
5296 m_no_write_to_binlog(no_write_to_binlog),
5297 m_table_list(table_list) {}
5298
5299 Sql_cmd *make_cmd(THD *thd) override;
5300
5303};
5304
5306 public:
5307 PT_drop_index_stmt(const POS &pos, MEM_ROOT *mem_root, const char *index_name,
5312 m_index_name(index_name),
5313 m_table(table),
5314 m_algo(algo),
5315 m_lock(lock),
5317
5318 Sql_cmd *make_cmd(THD *thd) override;
5319
5320 private:
5321 const char *m_index_name;
5325
5327};
5328
5330 public:
5332 : Parse_tree_root(pos), m_table(table) {}
5333
5334 Sql_cmd *make_cmd(THD *thd) override;
5335
5336 private:
5338
5340};
5341
5344
5345 public:
5347 List<Index_hint> *index_hints)
5348 : super(pos), m_table(table), m_index_hints(index_hints) {}
5349
5350 bool do_contextualize(Table_ddl_parse_context *pc) override;
5351
5352 private:
5355};
5356
5357class PT_adm_partition final : public Table_ddl_node {
5359
5360 public:
5361 explicit PT_adm_partition(const POS &pos, List<String> *opt_partitions)
5362 : super(pos), m_opt_partitions(opt_partitions) {}
5363
5364 bool do_contextualize(Table_ddl_parse_context *pc) override;
5365
5366 private:
5368};
5369
5371 public:
5374 LEX_CSTRING key_cache_name)
5376 m_tbl_index_lists(tbl_index_lists),
5377 m_key_cache_name(key_cache_name) {}
5378
5379 Sql_cmd *make_cmd(THD *thd) override;
5380
5381 private:
5384};
5385
5387 public:
5390 PT_adm_partition *partitions,
5391 List<Index_hint> *opt_key_usage_list,
5392 LEX_CSTRING key_cache_name)
5394 m_table(table),
5395 m_partitions(partitions),
5396 m_opt_key_usage_list(opt_key_usage_list),
5397 m_key_cache_name(key_cache_name) {}
5398
5399 Sql_cmd *make_cmd(THD *thd) override;
5400
5401 private:
5406};
5407
5408class PT_preload_keys final : public Table_ddl_node {
5410
5411 public:
5413 List<Index_hint> *opt_cache_key_list, bool ignore_leaves)
5414 : super(pos),
5415 m_table(table),
5416 m_opt_cache_key_list(opt_cache_key_list),
5417 m_ignore_leaves(ignore_leaves) {}
5418
5419 bool do_contextualize(Table_ddl_parse_context *pc) override;
5420
5421 private:
5425};
5426
5428 public:
5431 PT_adm_partition *partitions,
5432 List<Index_hint> *opt_cache_key_list,
5433 bool ignore_leaves)
5435 m_table(table),
5436 m_partitions(partitions),
5437 m_opt_cache_key_list(opt_cache_key_list),
5438 m_ignore_leaves(ignore_leaves) {}
5439
5440 Sql_cmd *make_cmd(THD *thd) override;
5441
5442 private:
5447};
5448
5450 public:
5453 : PT_table_ddl_stmt_base(pos, mem_root), m_preload_list(preload_list) {}
5454
5455 Sql_cmd *make_cmd(THD *thd) override;
5456
5457 private:
5459};
5460
5463
5464 public:
5467 bool do_contextualize(Parse_context *pc) override;
5468 Json_table_column *get_column() override { return m_column.get(); }
5469
5470 private:
5472 const char *m_name;
5473};
5474
5477
5478 public:
5483
5484 bool do_contextualize(Parse_context *pc) override;
5485
5486 Json_table_column *get_column() override { return m_column.get(); }
5487
5488 private:
5490 const char *m_name;
5493};
5494
5496 : public PT_json_table_column {
5498
5499 public:
5501 const POS &pos, Item *path,
5503 : super(pos), m_path(path), m_nested_columns(nested_cols) {}
5504
5505 bool do_contextualize(Parse_context *pc) override;
5506
5507 Json_table_column *get_column() override { return m_column; }
5508
5509 private:
5513};
5514
5516 public Tablespace_options {
5517 THD *const thd;
5519
5521 bool show_parse_tree = false);
5522};
5523
5526
5527template <typename Option_type, Option_type Tablespace_options::*Option>
5529 : public PT_alter_tablespace_option_base /* purecov: inspected */
5530{
5532
5533 public:
5534 explicit PT_alter_tablespace_option(const POS &pos, Option_type value)
5535 : super(pos), m_value(value) {}
5536
5538 pc->*Option = m_value;
5539 return super::do_contextualize(pc);
5540 }
5541
5542 private:
5543 const Option_type m_value;
5544};
5545
5550
5554
5558
5562
5567
5572
5577
5581
5583 : public PT_alter_tablespace_option_base /* purecov: inspected */
5584{
5587
5588 public:
5590 option_type nodegroup_id)
5591 : super(pos), m_nodegroup_id(nodegroup_id) {}
5592
5594
5595 private:
5597};
5598
5600 : public PT_alter_tablespace_option_base /* purecov: inspected */
5601{
5604
5605 public:
5608 : super(pos), m_comment(comment) {}
5609
5612 return true; /* purecov: inspected */ // OOM
5613
5614 if (pc->ts_comment.str) {
5615 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "COMMENT");
5616 return true;
5617 }
5618 pc->ts_comment = m_comment;
5619 return false;
5620 }
5621
5622 private:
5624};
5625
5627 : public PT_alter_tablespace_option_base /* purecov: inspected */
5628{
5631
5632 public:
5634 option_type engine_name)
5635 : super(pos), m_engine_name(engine_name) {}
5636
5639 return true; /* purecov: inspected */ // OOM
5640
5641 if (pc->engine_name.str) {
5642 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "STORAGE ENGINE");
5643 return true;
5644 }
5646 return false;
5647 }
5648
5649 private:
5651};
5652
5654 : public PT_alter_tablespace_option_base /* purecov: inspected */
5655{
5658
5659 public:
5661 const POS &pos, option_type file_block_size)
5662 : super(pos), m_file_block_size(file_block_size) {}
5663
5666 return true; /* purecov: inspected */ // OOM
5667
5668 if (pc->file_block_size != 0) {
5669 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "FILE_BLOCK_SIZE");
5670 return true;
5671 }
5673 return false;
5674 }
5675
5676 private:
5678};
5679
5680/**
5681 Parse tree node for CREATE RESOURCE GROUP statement.
5682*/
5683
5686 const bool has_priority;
5687
5688 public:
5690 const POS &pos, const LEX_CSTRING &name, const resourcegroups::Type type,
5692 const Value_or_default<int> &opt_priority, bool enabled)
5693 : Parse_tree_root(pos),
5694 sql_cmd(name, type, cpu_list,
5695 opt_priority.is_default ? 0 : opt_priority.value, enabled),
5696 has_priority(!opt_priority.is_default) {}
5697
5698 Sql_cmd *make_cmd(THD *thd) override;
5699};
5700
5701/**
5702 Parse tree node for ALTER RESOURCE GROUP statement.
5703*/
5704
5707
5708 public:
5711 const Value_or_default<int> &opt_priority,
5712 const Value_or_default<bool> &enable, bool force)
5713 : Parse_tree_root(pos),
5714 sql_cmd(name, cpu_list,
5715 opt_priority.is_default ? 0 : opt_priority.value,
5716 enable.is_default ? false : enable.value, force,
5717 !enable.is_default) {}
5718
5719 Sql_cmd *make_cmd(THD *thd) override;
5720};
5721
5722/**
5723 Parse tree node for DROP RESOURCE GROUP statement.
5724*/
5725
5728
5729 public:
5730 PT_drop_resource_group(const POS &pos, const LEX_CSTRING &resource_group_name,
5731 bool force)
5732 : Parse_tree_root(pos), sql_cmd(resource_group_name, force) {}
5733
5734 Sql_cmd *make_cmd(THD *thd) override;
5735};
5736
5737/**
5738 Parse tree node for SET RESOURCE GROUP statement.
5739*/
5740
5743
5744 public:
5746 Mem_root_array<ulonglong> *thread_id_list)
5747 : Parse_tree_root(pos), sql_cmd(name, thread_id_list) {}
5748
5749 Sql_cmd *make_cmd(THD *thd) override;
5750};
5751
5753 public:
5755 : Parse_tree_root(pos), m_cmd(thread_id) {}
5756
5757 Sql_cmd *make_cmd(THD *thd) override;
5758
5759 private:
5761};
5762
5764 public:
5765 PT_explain(const POS &pos, Explain_format_type format, bool is_analyze,
5766 bool is_explicit_format, Parse_tree_root *explainable_stmt,
5767 std::optional<std::string_view> explain_into_variable_name,
5768 LEX_CSTRING schema_name_for_explain)
5769 : Parse_tree_root(pos),
5771 m_analyze(is_analyze),
5772 m_explicit_format(is_explicit_format),
5773 m_explainable_stmt(explainable_stmt),
5774 m_explain_into_variable_name(explain_into_variable_name),
5775 m_schema_name_for_explain(schema_name_for_explain) {}
5776
5777 Sql_cmd *make_cmd(THD *thd) override;
5778
5779 private:
5781 const bool m_analyze;
5784 std::optional<std::string_view> m_explain_into_variable_name;
5786};
5787
5788class PT_load_table final : public Parse_tree_root {
5789 public:
5790 PT_load_table(const POS &pos, enum_filetype filetype, thr_lock_type lock_type,
5791 bool is_local_file, enum_source_type source_type,
5792 const LEX_STRING filename, ulong file_count, bool in_key_order,
5793 On_duplicate on_duplicate, Table_ident *table,
5794 List<String> *opt_partitions, const CHARSET_INFO *opt_charset,
5795 LEX_CSTRING compression_algorithm,
5796 String *opt_xml_rows_identified_by,
5797 const Field_separators *opt_field_separators,
5798 const Line_separators *opt_line_separators,
5799 ulong opt_ignore_lines, PT_item_list *opt_fields_or_vars,
5800 PT_item_list *opt_set_fields, PT_item_list *opt_set_exprs,
5801 List<String> *opt_set_expr_strings, ulong parallel,
5802 ulonglong memory_size, bool is_bulk_operation)
5803 : Parse_tree_root(pos),
5804 m_cmd(filetype, is_local_file, source_type, filename, file_count,
5805 in_key_order, on_duplicate, table, opt_partitions, opt_charset,
5806 compression_algorithm, opt_xml_rows_identified_by,
5807 opt_field_separators, opt_line_separators, opt_ignore_lines,
5808 opt_fields_or_vars ? &opt_fields_or_vars->value : nullptr,
5809 opt_set_fields ? &opt_set_fields->value : nullptr,
5810 opt_set_exprs ? &opt_set_exprs->value : nullptr,
5811 opt_set_expr_strings, parallel, memory_size, is_bulk_operation),
5812 m_lock_type(lock_type) {
5813 assert((opt_set_fields == nullptr) ^ (opt_set_exprs != nullptr));
5814 assert(opt_set_fields == nullptr ||
5815 opt_set_fields->value.size() == opt_set_exprs->value.size());
5816 }
5817
5818 Sql_cmd *make_cmd(THD *thd) override;
5819
5820 private:
5822
5824};
5825
5827 public:
5828 PT_create_library_stmt(const POS &pos, THD *thd, bool if_not_exists,
5829 sp_name *lib_name, LEX_CSTRING comment,
5830 LEX_CSTRING language, LEX_STRING lib_source,
5831 bool is_binary)
5832 : Parse_tree_root(pos),
5833 m_cmd(thd, if_not_exists, lib_name, comment, language, lib_source,
5834 is_binary) {}
5835
5836 Sql_cmd *make_cmd(THD *) override { return &m_cmd; }
5837
5838 private:
5840};
5841
5843 public:
5846 : Parse_tree_root(pos), m_cmd(thd, name, comment) {}
5847
5848 Sql_cmd *make_cmd(THD *) override { return &m_cmd; }
5849
5850 private:
5852};
5853
5855 public:
5856 PT_drop_library_stmt(const POS &pos, bool if_exists, sp_name *lib_name)
5857 : Parse_tree_root(pos), m_cmd(if_exists, lib_name) {}
5858
5859 Sql_cmd *make_cmd(THD *) override { return &m_cmd; }
5860
5861 private:
5863};
5864
5867
5869
5870 public:
5871 explicit PT_library_with_alias(const POS &pos, sp_name *lib_name,
5872 const LEX_CSTRING &alias)
5873 : super(pos), m_library(lib_name->m_db, lib_name->m_name, alias) {}
5874
5876};
5877
5878class PT_library_list final : public Parse_tree_node {
5880
5882
5883 public:
5884 explicit PT_library_list(const POS &pos)
5885 : super(pos), m_libraries(*THR_MALLOC) {}
5886
5888 if (lib == nullptr) return true; // OOM
5889 m_libraries.push_back(lib->library());
5890 return false;
5891 }
5892
5894};
5895
5898
5899 LEX_STRING m_name{nullptr, 0};
5900 Item *m_value{nullptr};
5901 uint m_col_tags{0};
5902
5903 public:
5905 int col_tags)
5907
5908 LEX_STRING name() { return m_name; }
5909 Item *value() { return m_value; }
5910 uint col_tags() { return m_col_tags; }
5911};
5912
5915
5916 THD *m_thd{nullptr};
5920
5921 public:
5922 explicit PT_jdv_name_value_list(const POS &pos, THD *thd)
5923 : super(pos),
5924 m_thd(thd),
5925 m_name_list(thd->mem_root),
5927
5928 bool push_back(PT_jdv_name_value *jdv_name_value) {
5929 if (m_name_value_list == nullptr) {
5931 if (m_name_value_list == nullptr) return true;
5932 }
5933
5934 Item_string *name = new (m_thd->mem_root)
5935 Item_string(jdv_name_value->name().str, jdv_name_value->name().length,
5936 m_thd->charset());
5937 if (name == nullptr) return true;
5938
5939 return (m_name_value_list->push_back(name) ||
5940 m_name_value_list->push_back(jdv_name_value->value()) ||
5941 m_name_list.push_back(jdv_name_value->name()) ||
5942 m_jdv_col_tags_list.push_back(jdv_name_value->col_tags()));
5943 }
5944
5948};
5949
5951 public:
5952 PT_create_masking_policy_stmt(const POS &pos, bool if_not_exists,
5953 LEX_CSTRING policy_name, LEX_CSTRING arg_name,
5954 Item *expr)
5955 : Parse_tree_root{pos},
5956 m_if_not_exists{if_not_exists},
5957 m_policy_name{policy_name},
5958 m_argument_name{arg_name},
5959 m_expr{expr} {}
5960
5961 Sql_cmd *make_cmd(THD *) override;
5962
5963 private:
5968};
5969
5971 public:
5972 PT_drop_masking_policy_stmt(const POS &pos, bool if_exists,
5973 LEX_CSTRING policy_name)
5974 : Parse_tree_root{pos}, m_cmd{if_exists, policy_name} {}
5975
5976 Sql_cmd *make_cmd(THD *) override { return &m_cmd; }
5977
5978 private:
5980};
5981
5983 public:
5986 m_policy_name{policy_name} {}
5987
5988 Sql_cmd *make_cmd(THD *) override;
5989
5990 private:
5992};
5993
5994/**
5995 Top-level node for the SHUTDOWN statement
5996
5997 @ingroup ptn_stmt
5998*/
5999
6001 public:
6002 Sql_cmd *make_cmd(THD *thd) override;
6003
6004 private:
6006};
6007
6009 private:
6012
6013 public:
6014 PT_install_component(const POS &pos, THD *thd,
6017 Sql_cmd *make_cmd(THD *thd) override;
6018};
6019
6021 LEX_CSTRING);
6022
6025 LEX_CSTRING);
6026
6029 LEX_CSTRING);
6031
6034 LEX_CSTRING);
6035
6036/**
6037 Helper function to imitate \c dynamic_cast for \c PT_set_operation hierarchy.
6038
6039 Template parameter @p To is the destination type (@c PT_union, \c PT_except or
6040 \c PT_intersect). For \c PT_intersect we return nullptr if ALL due to impl.
6041 restriction: we cannot merge INTERSECT ALL.
6042
6043 @param from source item
6044 @param is_distinct true if distinct
6045 @return typecast item to the type To or NULL
6046*/
6047template <class To, PT_set_operation::Setop_type Tag>
6048To *setop_cast(PT_query_expression_body *from, bool is_distinct) {
6049 return (from->type() == Tag &&
6050 down_cast<PT_set_operation *>(from)->is_distinct() == is_distinct &&
6051 (Tag != PT_query_expression_body::INTERSECT || is_distinct))
6052 ? static_cast<To *>(from)
6053 : nullptr;
6054}
6055
6056/**
6057 Flatten set operators at parse time
6058
6059 This function flattens UNION ALL/DISTINCT, EXCEPT All/DISTINCT
6060 and INTERSECT DISTINCT (not ALL due to implementation restrictions) operators
6061 at parse time if applicable, otherwise it creates
6062 new \c PT_<setop> nodes respectively of the two input operands.
6063
6064 Template parameter @p Class is @c PT_union or @c PT_intersect
6065 Template parameter @p Tag is @c PT_query_specification::UNION or
6066 @c ::INTERSECT
6067
6068 @param mem_root MEM_ROOT
6069 @param pos parse location
6070 @param left left argument of the operator
6071 @param is_distinct true if DISTINCT
6072 @param right right argument of the operator
6073 @param is_right_in_parentheses
6074 true if right hand size is parenthesized
6075 @return resulting parse tree Item
6076*/
6077template <class Class, PT_set_operation::Setop_type Tag>
6080 bool is_distinct,
6082 bool is_right_in_parentheses) {
6083 if (left == nullptr || right == nullptr) return nullptr;
6084 Class *left_setop = setop_cast<Class, Tag>(left, is_distinct);
6085 Class *right_setop [[maybe_unused]] =
6086 setop_cast<Class, Tag>(right, is_distinct);
6087 assert(right_setop == nullptr); // doesn't happen
6088 if (left_setop != nullptr) {
6089 // X1 op X2 op Y ==> op (X1, X2, Y)
6090 left_setop->m_list.push_back(right);
6091 left_setop->set_is_rhs_in_parentheses(is_right_in_parentheses);
6092 return left_setop;
6093 } else {
6094 /* X op Y */
6095 return new (mem_root)
6096 Class(pos, left, is_distinct, right, is_right_in_parentheses);
6097 }
6098}
6099
6100#endif /* PARSE_TREE_NODES_INCLUDED */
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:247
bool check_stack_overrun(const THD *thd, long margin, unsigned char *buf)
Check stack for a overrun.
Definition: check_stack.cc:110
Class representing SET DEFAULT, DROP DEFAULT, RENAME COLUMN, SET VISIBLE and SET INVISIBLE clause in ...
Definition: sql_alter.h:82
Class representing ALTER CHECK and ALTER CONSTRAINT clauses in ALTER TABLE statement.
Definition: sql_alter.h:189
Type
Definition: sql_alter.h:191
Class representing DROP COLUMN, DROP KEY, DROP FOREIGN KEY, DROP CHECK CONSTRAINT and DROP CONSTRAINT...
Definition: sql_alter.h:65
drop_type
Definition: sql_alter.h:67
An ALTER INDEX operation that changes the visibility of an index.
Definition: sql_alter.h:153
Data describing the table being created by CREATE TABLE or altered by ALTER TABLE.
Definition: sql_alter.h:210
enum_alter_table_algorithm
The different values of the ALGORITHM clause.
Definition: sql_alter.h:366
enum_alter_table_lock
The different values of the LOCK clause.
Definition: sql_alter.h:384
Mem_root_array< const Alter_drop * > drop_list
Columns, keys and constraints to be dropped.
Definition: sql_alter.h:416
Mem_root_array< const Alter_constraint_enforcement * > alter_constraint_enforcement_list
List of check constraints whose enforcement state is changed.
Definition: sql_alter.h:430
List< String > partition_names
Definition: sql_alter.h:444
enum_with_validation
Status of validation clause in ALTER TABLE statement.
Definition: sql_alter.h:402
enum_with_validation guided_load
Whether SECONDARY_LOAD should do guided load.
Definition: sql_alter.h:458
@ ENABLE
Definition: sql_alter.h:360
@ DISABLE
Definition: sql_alter.h:360
Mem_root_array< const Alter_column * > alter_list
Definition: sql_alter.h:418
enum_enable_or_disable keys_onoff
Definition: sql_alter.h:442
ulonglong flags
Definition: sql_alter.h:440
Mem_root_array< const Alter_rename_key * > alter_rename_key_list
Definition: sql_alter.h:423
bool validation_only
SECONDARY_LOAD should only validate not load table.
Definition: sql_alter.h:461
Alter_info_flag
Definition: sql_alter.h:221
@ ALTER_ADD_PARTITION
Set for ADD PARTITION.
Definition: sql_alter.h:260
@ ALTER_REORGANIZE_PARTITION
Set for REORGANIZE PARTITION ... INTO.
Definition: sql_alter.h:269
@ ALTER_ALL_PARTITION
Set for partitioning operations specifying ALL keyword.
Definition: sql_alter.h:285
@ ALTER_OPTIONS
Set for table_options.
Definition: sql_alter.h:246
Mem_root_array< const Alter_index_visibility * > alter_index_visibility_list
Indexes whose visibilities are to be changed.
Definition: sql_alter.h:426
uint64_t validate_num_rows
Number of rows to be validated by SECONDARY_LOAD.
Definition: sql_alter.h:463
Class which instances represent RENAME INDEX clauses in ALTER TABLE statement.
Definition: sql_alter.h:175
After parsing, a Common Table Expression is accessed through a Table_ref.
Definition: table.h:4611
Definition: key.h:43
Helper for the sql_exchange class.
Definition: sql_exchange.h:84
void merge_field_separators(const Field_separators *field_sep)
Definition: sql_exchange.h:98
Used to hold information about file and file structure in exchange via non-DB file (....
Definition: sql_exchange.h:151
void merge_file_information(const File_information *file_info)
Definition: sql_exchange.h:174
Definition: item.h:6985
Definition: item.h:4245
Definition: item.h:5646
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:929
virtual longlong val_int()=0
Represents a JSON container value of type "object" (ECMA), type J_OBJECT here.
Definition: json_dom.h:374
bool add_alias(std::string_view key, Json_dom *value)
Insert the value into the object.
Definition: json_dom.h:416
Column description for JSON_TABLE function.
Definition: table_function.h:249
Definition: key_spec.h:67
bool is_algorithm_explicit
A flag which indicates that index algorithm was explicitly specified by user.
Definition: key_spec.h:74
enum ha_key_alg algorithm
Definition: key_spec.h:69
Definition: key.h:113
Helper for the sql_exchange class.
Definition: sql_exchange.h:65
void merge_line_separators(const Line_separators *line_sep)
Definition: sql_exchange.h:70
Definition: sql_list.h:494
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:62
size_t size() const
Definition: mem_root_array.h:413
void init_empty_const()
Initialize empty array that we aren't going to grow.
Definition: mem_root_array.h:85
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:432
bool deferred_hints_flag
Definition: opt_hints.h:357
PT_hint_list * deferred_hints
Definition: opt_hints.h:356
Definition: parse_tree_nodes.h:5357
List< String > * m_opt_partitions
Definition: parse_tree_nodes.h:5367
Table_ddl_node super
Definition: parse_tree_nodes.h:5358
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3908
PT_adm_partition(const POS &pos, List< String > *opt_partitions)
Definition: parse_tree_nodes.h:5361
Top-level node for the ALTER INSTANCE statement.
Definition: parse_tree_nodes.h:2293
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5148
PT_alter_instance(const POS &pos, enum alter_instance_action_enum alter_instance_action, const LEX_CSTRING &channel)
Definition: parse_tree_nodes.h:2297
Sql_cmd_alter_instance sql_cmd
Definition: parse_tree_nodes.h:2294
Definition: parse_tree_nodes.h:5842
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.h:5848
Sql_cmd_alter_library m_cmd
Definition: parse_tree_nodes.h:5851
PT_alter_library_stmt(const POS &pos, THD *thd, sp_name *name, LEX_STRING comment)
Definition: parse_tree_nodes.h:5844
Parse tree node for ALTER RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5705
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5475
PT_alter_resource_group(const POS &pos, const LEX_CSTRING &name, const Mem_root_array< resourcegroups::Range > *cpu_list, const Value_or_default< int > &opt_priority, const Value_or_default< bool > &enable, bool force)
Definition: parse_tree_nodes.h:5709
resourcegroups::Sql_cmd_alter_resource_group sql_cmd
Definition: parse_tree_nodes.h:5706
Definition: parse_tree_nodes.h:4301
PT_ddl_table_option super
Definition: parse_tree_nodes.h:4302
bool is_add_or_reorganize_partition() const
A routine used by the parser to decide whether we are specifying a full partitioning or if only parti...
Definition: parse_tree_nodes.h:4320
const Alter_info::Alter_info_flag flag
Definition: parse_tree_nodes.h:4326
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5275
PT_alter_table_action(const POS &pos, Alter_info::Alter_info_flag flag)
Definition: parse_tree_nodes.h:4305
Definition: parse_tree_nodes.h:4329
PT_alter_table_action super
Definition: parse_tree_nodes.h:4330
PT_column_def m_column_def
Definition: parse_tree_nodes.h:4346
PT_alter_table_add_column(const POS &pos, const LEX_STRING &field_ident, PT_field_def_base *field_def, PT_table_constraint_def *opt_column_constraint, const char *opt_place)
Definition: parse_tree_nodes.h:4333
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4341
Definition: parse_tree_nodes.h:4349
const Mem_root_array< PT_table_element * > * m_columns
Definition: parse_tree_nodes.h:4367
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4357
PT_alter_table_action super
Definition: parse_tree_nodes.h:4350
PT_alter_table_add_columns(const POS &pos, const Mem_root_array< PT_table_element * > *columns)
Definition: parse_tree_nodes.h:4353
Definition: parse_tree_nodes.h:4370
PT_alter_table_action super
Definition: parse_tree_nodes.h:4371
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4378
PT_table_constraint_def * m_constraint
Definition: parse_tree_nodes.h:4383
PT_alter_table_add_constraint(const POS &pos, PT_table_constraint_def *constraint)
Definition: parse_tree_nodes.h:4374
Node for the ALTER TABLE ADD PARTITION (<partition list>) statement.
Definition: parse_tree_nodes.h:4753
PT_alter_table_add_partition super
Definition: parse_tree_nodes.h:4754
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3647
const Mem_root_array< PT_part_definition * > * m_def_list
Definition: parse_tree_nodes.h:4765
PT_alter_table_add_partition_def_list(const POS &pos, bool no_write_to_binlog, const Mem_root_array< PT_part_definition * > *def_list)
Definition: parse_tree_nodes.h:4757
Node for the ALTER TABLE ADD PARTITION PARTITIONS (<n>@) statement.
Definition: parse_tree_nodes.h:4774
PT_alter_table_add_partition_num(const POS &pos, bool no_write_to_binlog, uint num_parts)
Definition: parse_tree_nodes.h:4778
PT_alter_table_add_partition super
Definition: parse_tree_nodes.h:4775
Node for the ALTER TABLE ADD PARTITION statement.
Definition: parse_tree_nodes.h:4726
PT_alter_table_add_partition(const POS &pos, bool no_write_to_binlog)
Definition: parse_tree_nodes.h:4730
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4744
partition_info m_part_info
Definition: parse_tree_nodes.h:4741
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) final
Definition: parse_tree_nodes.h:4736
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5343
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4727
Definition: parse_tree_nodes.h:4870
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4871
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4880
PT_alter_table_analyze_partition(const POS &pos, bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4874
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5377
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4886
Definition: parse_tree_nodes.h:4386
const LEX_STRING m_old_name
Definition: parse_tree_nodes.h:4408
PT_alter_table_change_column(const POS &pos, const LEX_STRING &old_name, const LEX_STRING &new_name, PT_field_def_base *field_def, const char *opt_place)
Definition: parse_tree_nodes.h:4390
const LEX_STRING m_new_name
Definition: parse_tree_nodes.h:4409
const char * m_opt_place
Definition: parse_tree_nodes.h:4411
PT_field_def_base * m_field_def
Definition: parse_tree_nodes.h:4410
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3559
PT_alter_table_change_column(const POS &pos, const LEX_STRING &name, PT_field_def_base *field_def, const char *opt_place)
Definition: parse_tree_nodes.h:4400
PT_alter_table_action super
Definition: parse_tree_nodes.h:4387
Definition: parse_tree_nodes.h:4890
PT_alter_table_check_partition(const POS &pos, const List< String > *opt_partition_list, uint flags, uint sql_flags)
Definition: parse_tree_nodes.h:4894
uint m_sql_flags
Definition: parse_tree_nodes.h:4910
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5384
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4903
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4891
uint m_flags
Definition: parse_tree_nodes.h:4909
Definition: parse_tree_nodes.h:4940
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4957
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4941
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4952
PT_alter_table_coalesce_partition(const POS &pos, bool no_write_to_binlog, uint num_parts)
Definition: parse_tree_nodes.h:4944
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5407
const uint m_num_parts
Definition: parse_tree_nodes.h:4958
Definition: parse_tree_nodes.h:4564
Alter_column m_alter_column
Definition: parse_tree_nodes.h:4579
PT_alter_table_action super
Definition: parse_tree_nodes.h:4565
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4573
PT_alter_table_column_visibility(const POS &pos, const char *col_name, bool is_visible)
Definition: parse_tree_nodes.h:4568
Definition: parse_tree_nodes.h:4648
PT_alter_table_action super
Definition: parse_tree_nodes.h:4649
const CHARSET_INFO *const m_charset
Definition: parse_tree_nodes.h:4661
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3615
const CHARSET_INFO *const m_collation
Definition: parse_tree_nodes.h:4662
PT_alter_table_convert_to_charset(const POS &pos, const CHARSET_INFO *charset, const CHARSET_INFO *opt_collation)
Definition: parse_tree_nodes.h:4652
Definition: parse_tree_nodes.h:5113
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5121
PT_alter_table_discard_partition_tablespace(const POS &pos, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:5117
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:5114
Definition: parse_tree_nodes.h:5141
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5148
PT_alter_table_discard_tablespace(const POS &pos)
Definition: parse_tree_nodes.h:5145
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:5142
Definition: parse_tree_nodes.h:4454
PT_alter_table_drop_check_constraint(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4456
Definition: parse_tree_nodes.h:4433
PT_alter_table_drop_column(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4435
Definition: parse_tree_nodes.h:4462
PT_alter_table_drop_constraint(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4464
Definition: parse_tree_nodes.h:4440
PT_alter_table_drop_foreign_key(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4442
Definition: parse_tree_nodes.h:4447
PT_alter_table_drop_key(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4449
Definition: parse_tree_nodes.h:4786
const List< String > m_partitions
Definition: parse_tree_nodes.h:4802
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5354
PT_alter_table_drop_partition(const POS &pos, const List< String > &partitions)
Definition: parse_tree_nodes.h:4790
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4787
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) final
Definition: parse_tree_nodes.h:4797
Definition: parse_tree_nodes.h:4414
PT_alter_table_action super
Definition: parse_tree_nodes.h:4415
PT_alter_table_drop(const POS &pos, Alter_drop::drop_type drop_type, Alter_info::Alter_info_flag alter_info_flag, const char *name)
Definition: parse_tree_nodes.h:4418
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4424
Alter_drop m_alter_drop
Definition: parse_tree_nodes.h:4430
Definition: parse_tree_nodes.h:4512
PT_alter_table_action super
Definition: parse_tree_nodes.h:4513
PT_alter_table_enable_keys(const POS &pos, bool enable)
Definition: parse_tree_nodes.h:4516
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4519
bool m_enable
Definition: parse_tree_nodes.h:4526
Definition: parse_tree_nodes.h:4500
PT_alter_table_enforce_check_constraint(const POS &pos, const char *name, bool is_enforced)
Definition: parse_tree_nodes.h:4502
Definition: parse_tree_nodes.h:4469
PT_alter_table_action super
Definition: parse_tree_nodes.h:4470
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4489
Alter_constraint_enforcement m_constraint_enforcement
Definition: parse_tree_nodes.h:4496
PT_alter_table_enforce_constraint(const POS &pos, const char *name, bool is_enforced)
Definition: parse_tree_nodes.h:4481
PT_alter_table_enforce_constraint(const POS &pos, Alter_constraint_enforcement::Type alter_type, Alter_info::Alter_info_flag alter_info_flag, const char *name, bool is_enforced)
Definition: parse_tree_nodes.h:4473
Definition: parse_tree_nodes.h:5031
PT_alter_table_exchange_partition(const POS &pos, const LEX_STRING &partition_name, Table_ident *table_name, Alter_info::enum_with_validation validation)
Definition: parse_tree_nodes.h:5035
Table_ident * m_table_name
Definition: parse_tree_nodes.h:5053
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:5054
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5046
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3682
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:5032
const LEX_STRING m_partition_name
Definition: parse_tree_nodes.h:5052
Definition: parse_tree_nodes.h:4665
PT_alter_table_force(const POS &pos)
Definition: parse_tree_nodes.h:4669
PT_alter_table_action super
Definition: parse_tree_nodes.h:4666
Definition: parse_tree_nodes.h:5127
PT_alter_table_import_partition_tablespace(const POS &pos, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:5131
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5135
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:5128
Definition: parse_tree_nodes.h:5154
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:5155
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5161
PT_alter_table_import_tablespace(const POS &pos)
Definition: parse_tree_nodes.h:5158
Definition: parse_tree_nodes.h:4582
PT_alter_table_action super
Definition: parse_tree_nodes.h:4583
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4590
Alter_index_visibility m_alter_index_visibility
Definition: parse_tree_nodes.h:4597
PT_alter_table_index_visible(const POS &pos, const char *name, bool visible)
Definition: parse_tree_nodes.h:4586
Definition: parse_tree_nodes.h:4849
PT_alter_table_optimize_partition(const POS &pos, bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4853
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4860
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4850
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4866
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5370
Definition: parse_tree_nodes.h:4673
PT_alter_table_action super
Definition: parse_tree_nodes.h:4674
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5329
PT_alter_table_order(const POS &pos, PT_order_list *order)
Definition: parse_tree_nodes.h:4677
PT_order_list *const m_order
Definition: parse_tree_nodes.h:4683
Definition: parse_tree_nodes.h:4686
PT_alter_table_action super
Definition: parse_tree_nodes.h:4687
PT_partition *const m_partition
Definition: parse_tree_nodes.h:4696
PT_alter_table_partition_by(const POS &pos, PT_partition *partition)
Definition: parse_tree_nodes.h:4690
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5335
Definition: parse_tree_nodes.h:4806
PT_alter_table_partition_list_or_all(const POS &pos, Alter_info::Alter_info_flag alter_info_flag, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4810
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4815
const List< String > * m_opt_partition_list
Definition: parse_tree_nodes.h:4825
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4807
Definition: parse_tree_nodes.h:4829
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4840
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5363
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4830
PT_alter_table_rebuild_partition(const POS &pos, bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4833
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4845
Definition: parse_tree_nodes.h:4699
PT_alter_table_action super
Definition: parse_tree_nodes.h:4700
PT_alter_table_remove_partitioning(const POS &pos)
Definition: parse_tree_nodes.h:4703
Definition: parse_tree_nodes.h:4631
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4639
PT_alter_table_action super
Definition: parse_tree_nodes.h:4632
PT_alter_table_rename_column(const POS &pos, const char *from, const char *to)
Definition: parse_tree_nodes.h:4635
Alter_column m_rename_column
Definition: parse_tree_nodes.h:4645
Definition: parse_tree_nodes.h:4615
PT_alter_table_rename_key(const POS &pos, const char *from, const char *to)
Definition: parse_tree_nodes.h:4619
Alter_rename_key m_rename_key
Definition: parse_tree_nodes.h:4628
PT_alter_table_action super
Definition: parse_tree_nodes.h:4616
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4622
Definition: parse_tree_nodes.h:4600
PT_alter_table_rename(const POS &pos, const Table_ident *ident)
Definition: parse_tree_nodes.h:4604
const Table_ident *const m_ident
Definition: parse_tree_nodes.h:4612
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3589
bool is_rename_table() const override
Definition: parse_tree_nodes.h:4609
PT_alter_table_action super
Definition: parse_tree_nodes.h:4601
Definition: parse_tree_nodes.h:5004
const Mem_root_array< PT_part_definition * > * m_into
Definition: parse_tree_nodes.h:5026
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3661
partition_info m_partition_info
Definition: parse_tree_nodes.h:5027
PT_alter_table_reorganize_partition_into(const POS &pos, bool no_write_to_binlog, const List< String > &partition_names, const Mem_root_array< PT_part_definition * > *into)
Definition: parse_tree_nodes.h:5008
const List< String > m_partition_names
Definition: parse_tree_nodes.h:5025
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:5005
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:5024
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5019
Definition: parse_tree_nodes.h:4983
partition_info m_partition_info
Definition: parse_tree_nodes.h:5000
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4994
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4999
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4984
PT_alter_table_reorganize_partition(const POS &pos, bool no_write_to_binlog)
Definition: parse_tree_nodes.h:4987
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5422
Definition: parse_tree_nodes.h:4914
uint m_flags
Definition: parse_tree_nodes.h:4935
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4915
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4934
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5394
uint m_sql_flags
Definition: parse_tree_nodes.h:4936
PT_alter_table_repair_partition(const POS &pos, bool no_write_to_binlog, const List< String > *opt_partition_list, uint flags, uint sql_flags)
Definition: parse_tree_nodes.h:4918
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4928
Definition: parse_tree_nodes.h:5058
const Alter_info::enum_with_validation m_guided
Definition: parse_tree_nodes.h:5063
Item_num * m_validation_rows
Definition: parse_tree_nodes.h:5062
PT_alter_table_secondary_load(const POS &pos, Item_num *validation_only_rows, Alter_info::enum_with_validation guided, const List< String > *opt_use_partition=nullptr)
Definition: parse_tree_nodes.h:5066
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5075
const List< String > * opt_use_partition
Definition: parse_tree_nodes.h:5061
Definition: parse_tree_nodes.h:5093
PT_alter_table_secondary_unload(const POS &pos, const List< String > *opt_use_partition=nullptr)
Definition: parse_tree_nodes.h:5099
const List< String > * opt_use_partition
Definition: parse_tree_nodes.h:5096
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:5104
Definition: parse_tree_nodes.h:4529
Item * m_expr
Definition: parse_tree_nodes.h:4543
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5281
const char * m_name
Definition: parse_tree_nodes.h:4542
PT_alter_table_action super
Definition: parse_tree_nodes.h:4530
PT_alter_table_set_default(const POS &pos, const char *col_name, Item *opt_default_expr)
Definition: parse_tree_nodes.h:4533
Definition: parse_tree_nodes.h:4547
PT_alter_table_set_masking_policy_name(const POS &pos, const char *col_name, LEX_CSTRING policy_name)
Definition: parse_tree_nodes.h:4555
LEX_CSTRING m_policy_name
Definition: parse_tree_nodes.h:4552
PT_alter_table_action super
Definition: parse_tree_nodes.h:4548
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5315
const char * m_name
Definition: parse_tree_nodes.h:4551
Definition: parse_tree_nodes.h:4707
PT_alter_table_action super
Definition: parse_tree_nodes.h:4708
PT_alter_table_standalone_action(const POS &pos, Alter_info::Alter_info_flag alter_info_flag)
Definition: parse_tree_nodes.h:4713
virtual Sql_cmd * make_cmd(Table_ddl_parse_context *pc)=0
Definition: parse_tree_nodes.h:5193
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3777
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:5213
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:5214
PT_alter_table_standalone_stmt(const POS &pos, MEM_ROOT *mem_root, Table_ident *table_name, PT_alter_table_standalone_action *action, Alter_info::enum_alter_table_algorithm algo, Alter_info::enum_alter_table_lock lock, Alter_info::enum_with_validation validation)
Definition: parse_tree_nodes.h:5195
Table_ident *const m_table_name
Definition: parse_tree_nodes.h:5211
PT_alter_table_standalone_action *const m_action
Definition: parse_tree_nodes.h:5212
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:5215
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:5217
Definition: parse_tree_nodes.h:5166
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:5187
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:5188
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3739
Mem_root_array< PT_ddl_table_option * > *const m_opt_actions
Definition: parse_tree_nodes.h:5185
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:5190
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:5186
Table_ident *const m_table_name
Definition: parse_tree_nodes.h:5184
PT_alter_table_stmt(const POS &pos, MEM_ROOT *mem_root, Table_ident *table_name, Mem_root_array< PT_ddl_table_option * > *opt_actions, Alter_info::enum_alter_table_algorithm algo, Alter_info::enum_alter_table_lock lock, Alter_info::enum_with_validation validation)
Definition: parse_tree_nodes.h:5168
Definition: parse_tree_nodes.h:4962
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4963
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5416
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4976
PT_alter_table_truncate_partition(const POS &pos, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4966
Definition: parse_tree_nodes.h:5601
const option_type m_comment
Definition: parse_tree_nodes.h:5623
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5610
PT_alter_tablespace_option_comment(const POS &pos, option_type comment)
Definition: parse_tree_nodes.h:5606
decltype(Tablespace_options::ts_comment) option_type
Definition: parse_tree_nodes.h:5603
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5602
Definition: parse_tree_nodes.h:5628
PT_alter_tablespace_option_engine(const POS &pos, option_type engine_name)
Definition: parse_tree_nodes.h:5633
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5637
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5629
decltype(Tablespace_options::engine_name) option_type
Definition: parse_tree_nodes.h:5630
const option_type m_engine_name
Definition: parse_tree_nodes.h:5650
Definition: parse_tree_nodes.h:5655
PT_alter_tablespace_option_file_block_size(const POS &pos, option_type file_block_size)
Definition: parse_tree_nodes.h:5660
const option_type m_file_block_size
Definition: parse_tree_nodes.h:5677
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5664
decltype(Tablespace_options::file_block_size) option_type
Definition: parse_tree_nodes.h:5657
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5656
Definition: parse_tree_nodes.h:5584
const option_type m_nodegroup_id
Definition: parse_tree_nodes.h:5596
PT_alter_tablespace_option_nodegroup(const POS &pos, option_type nodegroup_id)
Definition: parse_tree_nodes.h:5589
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.cc:5444
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5585
decltype(Tablespace_options::nodegroup_id) option_type
Definition: parse_tree_nodes.h:5586
Definition: parse_tree_nodes.h:5530
const Option_type m_value
Definition: parse_tree_nodes.h:5543
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5531
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5537
PT_alter_tablespace_option(const POS &pos, Option_type value)
Definition: parse_tree_nodes.h:5534
Definition: parse_tree_nodes.h:3500
Sql_cmd_alter_user_default_role sql_cmd
Definition: parse_tree_nodes.h:3501
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5236
PT_alter_user_default_role(const POS &pos, bool if_exists, const List< LEX_USER > *users, const List< LEX_USER > *roles, const role_enum role_type)
Definition: parse_tree_nodes.h:3504
Definition: parse_tree_nodes.h:5242
const Sql_cmd_analyze_table::Histogram_command m_command
Definition: parse_tree_nodes.h:5264
PT_analyze_table_stmt(const POS &pos, MEM_ROOT *mem_root, bool no_write_to_binlog, Mem_root_array< Table_ident * > *table_list, Sql_cmd_analyze_table::Histogram_command command, int num_buckets, List< String > *columns, LEX_STRING data, bool auto_update)
Definition: parse_tree_nodes.h:5244
const int m_num_buckets
Definition: parse_tree_nodes.h:5265
const LEX_STRING m_data
Definition: parse_tree_nodes.h:5267
const bool m_auto_update
Definition: parse_tree_nodes.h:5268
const Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:5263
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3810
List< String > * m_columns
Definition: parse_tree_nodes.h:5266
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:5262
Definition: parse_tree_nodes.h:5342
List< Index_hint > * m_index_hints
Definition: parse_tree_nodes.h:5354
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3899
Table_ddl_node super
Definition: parse_tree_nodes.h:5343
PT_assign_to_keycache(const POS &pos, Table_ident *table, List< Index_hint > *index_hints)
Definition: parse_tree_nodes.h:5346
Table_ident * m_table
Definition: parse_tree_nodes.h:5353
A template-free base class for index options that we can predeclare in sql_lex.h.
Definition: parse_tree_nodes.h:2309
PT_base_index_option(const POS &pos)
Definition: parse_tree_nodes.h:2311
A template for options that set HA_CREATE_INFO::table_options and also records if the option was expl...
Definition: parse_tree_nodes.h:2860
PT_create_table_option super
Definition: parse_tree_nodes.h:2861
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2869
const bool value
Definition: parse_tree_nodes.h:2863
PT_bool_create_table_option(const POS &pos, bool value)
Definition: parse_tree_nodes.h:2866
Parse tree node for a single of a window extent's borders, cf.
Definition: parse_tree_nodes.h:1436
Item * build_addop(Item_cache *order_expr, bool prec, bool asc, const Window *window)
Definition: parse_tree_nodes.cc:3984
PT_border(const POS &pos, enum_window_border_type type, Item *value)
For bounded INTERVAL 2 DAYS, 'value' is 2, int_type is DAYS.
Definition: parse_tree_nodes.h:1451
PT_border(const POS &pos, enum_window_border_type type)
< For unbounded border
Definition: parse_tree_nodes.h:1445
Item * m_value
only relevant iff m_border_type == WBT_VALUE_*
Definition: parse_tree_nodes.h:1438
Item ** border_ptr()
Need such low-level access so that fix_fields updates the right pointer.
Definition: parse_tree_nodes.h:1469
interval_type m_int_type
Definition: parse_tree_nodes.h:1442
PT_border(const POS &pos, enum_window_border_type type, Item *value, interval_type int_type)
Definition: parse_tree_nodes.h:1458
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_window.cc:68
enum_window_border_type m_border_type
Definition: parse_tree_nodes.h:1440
const bool m_date_time
Definition: parse_tree_nodes.h:1441
Item * border() const
Definition: parse_tree_nodes.h:1467
Parse tree node for one or both of a window extent's borders, cf.
Definition: parse_tree_nodes.h:1488
PT_borders(const POS &pos, PT_border *start, PT_border *end)
Constructor.
Definition: parse_tree_nodes.h:1500
PT_border * m_borders[2]
Definition: parse_tree_nodes.h:1489
Definition: parse_tree_nodes.h:5386
List< Index_hint > * m_opt_key_usage_list
Definition: parse_tree_nodes.h:5404
PT_cache_index_partitions_stmt(const POS &pos, MEM_ROOT *mem_root, Table_ident *table, PT_adm_partition *partitions, List< Index_hint > *opt_key_usage_list, LEX_CSTRING key_cache_name)
Definition: parse_tree_nodes.h:5388
Table_ident * m_table
Definition: parse_tree_nodes.h:5402
PT_adm_partition * m_partitions
Definition: parse_tree_nodes.h:5403
const LEX_CSTRING m_key_cache_name
Definition: parse_tree_nodes.h:5405
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3933
Definition: parse_tree_nodes.h:5370
const LEX_CSTRING m_key_cache_name
Definition: parse_tree_nodes.h:5383
Mem_root_array< PT_assign_to_keycache * > * m_tbl_index_lists
Definition: parse_tree_nodes.h:5382
PT_cache_index_stmt(const POS &pos, MEM_ROOT *mem_root, Mem_root_array< PT_assign_to_keycache * > *tbl_index_lists, LEX_CSTRING key_cache_name)
Definition: parse_tree_nodes.h:5372
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3919
Definition: parse_tree_nodes.h:2190
PT_item_list * opt_expr_list
Definition: parse_tree_nodes.h:2192
sp_name * proc_name
Definition: parse_tree_nodes.h:2191
PT_call(const POS &pos, sp_name *proc_name_arg, PT_item_list *opt_expr_list_arg)
Definition: parse_tree_nodes.h:2195
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1520
Definition: parse_tree_nodes.h:3219
PT_table_constraint_def super
Definition: parse_tree_nodes.h:3220
PT_check_constraint(const POS &pos, LEX_STRING &name, Item *expr, bool is_enforced)
Definition: parse_tree_nodes.h:3224
Sql_check_constraint_spec cc_spec
Definition: parse_tree_nodes.h:3221
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5153
Definition: parse_tree_nodes.h:5271
PT_check_table_stmt(const POS &pos, MEM_ROOT *mem_root, Mem_root_array< Table_ident * > *table_list, decltype(HA_CHECK_OPT::flags) flags, decltype(HA_CHECK_OPT::sql_flags) sql_flags)
Definition: parse_tree_nodes.h:5273
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:5285
decltype(HA_CHECK_OPT::flags) m_flags
Definition: parse_tree_nodes.h:5286
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3832
decltype(HA_CHECK_OPT::sql_flags) m_sql_flags
Definition: parse_tree_nodes.h:5287
Base class for all column attributes in CREATE/ALTER TABLE
Definition: parse_tree_column_attrs.h:86
Definition: parse_tree_nodes.h:3235
PT_table_element super
Definition: parse_tree_nodes.h:3236
PT_column_def(const POS &pos, const LEX_STRING &field_ident, PT_field_def_base *field_def, PT_table_constraint_def *opt_column_constraint, const char *opt_place=nullptr)
Definition: parse_tree_nodes.h:3245
const LEX_STRING field_ident
Definition: parse_tree_nodes.h:3238
PT_field_def_base * field_def
Definition: parse_tree_nodes.h:3239
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2719
const char * opt_place
Definition: parse_tree_nodes.h:3242
PT_table_constraint_def * opt_column_constraint
Definition: parse_tree_nodes.h:3240
Represents an element of the WITH list: WITH [...], [...] SELECT ..., ^ or ^ i.e.
Definition: parse_tree_nodes.h:275
const LEX_STRING m_subq_text
Raw text of query expression (including parentheses)
Definition: parse_tree_nodes.h:315
const Create_col_name_list m_column_names
List of explicitly specified column names; if empty, no list.
Definition: parse_tree_nodes.h:324
Parse_tree_node super
Definition: parse_tree_nodes.h:276
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:2388
bool is(const Common_table_expr *other) const
Definition: parse_tree_nodes.h:303
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2379
PT_subquery *const m_subq_node
Parsed version of subq_text.
Definition: parse_tree_nodes.h:322
PT_common_table_expr(const POS &pos, const LEX_STRING &name, const LEX_STRING &subq_text, uint subq_text_offset, PT_subquery *sn, const Create_col_name_list *column_names, MEM_ROOT *mem_root)
Definition: parse_tree_nodes.cc:2361
uint m_subq_text_offset
Offset in bytes of m_subq_text in original statement which had the WITH clause.
Definition: parse_tree_nodes.h:320
void print(const THD *thd, String *str, enum_query_type query_type)
Definition: parse_tree_nodes.cc:2430
const LEX_STRING & name() const
The name after AS.
Definition: parse_tree_nodes.h:286
Common_table_expr m_postparse
A Table_ref representing a CTE needs access to the WITH list element it derives from.
Definition: parse_tree_nodes.h:334
LEX_STRING m_name
Definition: parse_tree_nodes.h:313
Node for the AUTO_REFRESH_SOURCE [=] <string>|NULL table option.
Definition: parse_tree_nodes.h:3204
PT_create_auto_refresh_event_source(const POS &pos)
Definition: parse_tree_nodes.h:3208
PT_create_auto_refresh_event_source(const POS &pos, const LEX_CSTRING &auto_refresh_source)
Definition: parse_tree_nodes.h:3209
const LEX_CSTRING m_auto_refresh_source
Definition: parse_tree_nodes.h:3216
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2641
Definition: parse_tree_nodes.h:3069
ulong ignore_lines
Definition: parse_tree_nodes.h:3089
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2611
PT_create_external_file_format(const POS &pos, File_information *file_info_arg, const Field_separators *field_term_arg, const Line_separators *line_term_arg, ulong ignore_lines_arg)
Definition: parse_tree_nodes.h:3073
File_information * file_info
Definition: parse_tree_nodes.h:3086
const Line_separators * line_term
Definition: parse_tree_nodes.h:3088
PT_create_table_option super
Definition: parse_tree_nodes.h:3070
const Field_separators * field_term
Definition: parse_tree_nodes.h:3087
Definition: parse_tree_nodes.h:3092
PT_create_table_option super
Definition: parse_tree_nodes.h:3093
PT_create_external_files(const POS &pos, PT_external_file_list *external_files_arg)
Definition: parse_tree_nodes.h:3096
PT_external_file_list * external_files
Definition: parse_tree_nodes.h:3102
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2622
Definition: parse_tree_nodes.h:2494
PT_create_index_stmt(const POS &pos, MEM_ROOT *mem_root, keytype type_par, const LEX_STRING &name_arg, PT_base_index_option *type, Table_ident *table_ident, List< PT_key_part_specification > *cols, Index_options options, Alter_info::enum_alter_table_algorithm algo, Alter_info::enum_alter_table_lock lock)
Definition: parse_tree_nodes.h:2496
keytype m_keytype
Definition: parse_tree_nodes.h:2516
Index_options m_options
Definition: parse_tree_nodes.h:2521
Table_ident * m_table_ident
Definition: parse_tree_nodes.h:2519
LEX_STRING m_name
Definition: parse_tree_nodes.h:2517
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:2522
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2520
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:2523
PT_base_index_option * m_type
Definition: parse_tree_nodes.h:2518
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2185
Definition: parse_tree_nodes.h:5826
PT_create_library_stmt(const POS &pos, THD *thd, bool if_not_exists, sp_name *lib_name, LEX_CSTRING comment, LEX_CSTRING language, LEX_STRING lib_source, bool is_binary)
Definition: parse_tree_nodes.h:5828
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.h:5836
Sql_cmd_create_library m_cmd
Definition: parse_tree_nodes.h:5839
Definition: parse_tree_nodes.h:5950
Item * m_expr
Definition: parse_tree_nodes.h:5967
LEX_CSTRING m_argument_name
Definition: parse_tree_nodes.h:5966
PT_create_masking_policy_stmt(const POS &pos, bool if_not_exists, LEX_CSTRING policy_name, LEX_CSTRING arg_name, Item *expr)
Definition: parse_tree_nodes.h:5952
LEX_CSTRING m_policy_name
Definition: parse_tree_nodes.h:5965
bool m_if_not_exists
Definition: parse_tree_nodes.h:5964
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.cc:5509
Parse tree node for CREATE RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5684
resourcegroups::Sql_cmd_create_resource_group sql_cmd
Definition: parse_tree_nodes.h:5685
PT_create_resource_group(const POS &pos, const LEX_CSTRING &name, const resourcegroups::Type type, const Mem_root_array< resourcegroups::Range > *cpu_list, const Value_or_default< int > &opt_priority, bool enabled)
Definition: parse_tree_nodes.h:5689
const bool has_priority
Definition: parse_tree_nodes.h:5686
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5456
Definition: parse_tree_nodes.h:3346
PT_create_role(const POS &pos, bool if_not_exists, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:3350
Sql_cmd_create_role sql_cmd
Definition: parse_tree_nodes.h:3347
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5165
Top-level node for the CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM statement.
Definition: parse_tree_nodes.h:2221
bool contains_control_char(char *str, size_t length)
Check if a UTF-8 string contains control characters.
Definition: parse_tree_nodes.h:2247
PT_create_srs(const POS &pos, unsigned long long srid, const Sql_cmd_srs_attributes &attributes, bool or_replace, bool if_not_exists)
Definition: parse_tree_nodes.h:2255
const Sql_cmd_srs_attributes m_attributes
All attributes except SRID.
Definition: parse_tree_nodes.h:2234
unsigned long long m_srid
SRID of the SRS to create.
Definition: parse_tree_nodes.h:2232
bool m_or_replace
Whether OR REPLACE is specified.
Definition: parse_tree_nodes.h:2225
Sql_cmd_create_srs sql_cmd
The SQL command object.
Definition: parse_tree_nodes.h:2223
bool m_if_not_exists
Whether IF NOT EXISTS is specified.
Definition: parse_tree_nodes.h:2227
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4996
Node for the STATS_AUTO_RECALC [=] <0|1|DEFAULT>) table option.
Definition: parse_tree_nodes.h:2958
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2504
const Ternary_option value
Definition: parse_tree_nodes.h:2961
PT_create_stats_auto_recalc_option(const POS &pos, Ternary_option value)
Definition: parse_tree_nodes.h:2973
PT_create_table_option super
Definition: parse_tree_nodes.h:2959
Node for the STATS_SAMPLE_PAGES [=] <integer>|DEFAULT table option.
Definition: parse_tree_nodes.h:2984
const value_t value
Definition: parse_tree_nodes.h:2988
PT_create_stats_stable_pages(const POS &pos, value_t value)
Constructor for implicit number of pages.
Definition: parse_tree_nodes.h:2997
PT_create_table_option super
Definition: parse_tree_nodes.h:2985
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2525
decltype(HA_CREATE_INFO::stats_sample_pages) value_t
Definition: parse_tree_nodes.h:2986
PT_create_stats_stable_pages(const POS &pos)
Constructor for the DEFAULT number of pages.
Definition: parse_tree_nodes.h:3004
Definition: parse_tree_nodes.h:3023
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:3032
const ha_storage_media value
Definition: parse_tree_nodes.h:3026
PT_create_storage_option(const POS &pos, ha_storage_media value)
Definition: parse_tree_nodes.h:3029
PT_create_table_option super
Definition: parse_tree_nodes.h:3024
Definition: parse_tree_nodes.h:3039
const CHARSET_INFO * value
Definition: parse_tree_nodes.h:3042
PT_create_table_default_charset(const POS &pos, const CHARSET_INFO *value)
Definition: parse_tree_nodes.h:3045
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2584
PT_create_table_option super
Definition: parse_tree_nodes.h:3040
Definition: parse_tree_nodes.h:3054
PT_create_table_default_collation(const POS &pos, const CHARSET_INFO *value)
Definition: parse_tree_nodes.h:3060
const CHARSET_INFO * value
Definition: parse_tree_nodes.h:3057
PT_create_table_option super
Definition: parse_tree_nodes.h:3055
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2605
Node for the ENGINE [=] <identifier>|<string> table option.
Definition: parse_tree_nodes.h:2914
const LEX_CSTRING engine
Definition: parse_tree_nodes.h:2917
PT_create_table_engine_option(const POS &pos, const LEX_CSTRING &engine)
Definition: parse_tree_nodes.h:2924
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2468
PT_create_table_option super
Definition: parse_tree_nodes.h:2915
Base class for CREATE TABLE option nodes.
Definition: parse_tree_nodes.h:2630
PT_ddl_table_option super
Definition: parse_tree_nodes.h:2631
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2639
~PT_create_table_option() override=0
PT_create_table_option(const POS &pos)
Definition: parse_tree_nodes.h:2634
Node for the SECONDARY_ENGINE [=] <identifier>|<string>|NULL table option.
Definition: parse_tree_nodes.h:2937
PT_create_table_secondary_engine_option(const POS &pos, const LEX_CSTRING &secondary_engine)
Definition: parse_tree_nodes.h:2943
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2489
const LEX_CSTRING m_secondary_engine
Definition: parse_tree_nodes.h:2950
PT_create_table_secondary_engine_option(const POS &pos)
Definition: parse_tree_nodes.h:2941
Top-level node for the CREATE TABLE statement.
Definition: parse_tree_nodes.h:3263
On_duplicate on_duplicate
Definition: parse_tree_nodes.h:3270
PT_create_table_stmt(const POS &pos, MEM_ROOT *mem_root, uint table_type, bool only_if_not_exists, Table_ident *table_name, Table_ident *opt_like_clause)
Definition: parse_tree_nodes.h:3328
PT_partition * opt_partitioning
Definition: parse_tree_nodes.h:3269
PT_create_table_stmt(const POS &pos, MEM_ROOT *mem_root, uint table_type, bool only_if_not_exists, Table_ident *table_name, const Mem_root_array< PT_table_element * > *opt_table_element_list, const Mem_root_array< PT_create_table_option * > *opt_create_table_options, PT_partition *opt_partitioning, On_duplicate on_duplicate, PT_query_expression_body *opt_query_expression, const POS &columns_end_pos=POS())
Definition: parse_tree_nodes.h:3300
const Mem_root_array< PT_table_element * > * opt_table_element_list
Definition: parse_tree_nodes.h:3267
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2759
const Mem_root_array< PT_create_table_option * > * opt_create_table_options
Definition: parse_tree_nodes.h:3268
PT_query_expression_body * opt_query_expression
Definition: parse_tree_nodes.h:3271
bool only_if_not_exists
Definition: parse_tree_nodes.h:3265
Table_ident * table_name
Definition: parse_tree_nodes.h:3266
Table_ident * opt_like_clause
Definition: parse_tree_nodes.h:3272
unsigned int table_type
Definition: parse_tree_nodes.h:3264
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:3275
POS m_columns_end_pos
Definition: parse_tree_nodes.h:3273
Definition: parse_tree_nodes.h:3010
const Mem_root_array< Table_ident * > * tables
Definition: parse_tree_nodes.h:3013
PT_create_union_option(const POS &pos, const Mem_root_array< Table_ident * > *tables)
Definition: parse_tree_nodes.h:3016
PT_create_table_option super
Definition: parse_tree_nodes.h:3011
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2534
Definition: parse_tree_nodes.h:636
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4461
PT_joined_table super
Definition: parse_tree_nodes.h:637
PT_cross_join(const POS &pos, PT_table_reference *tab1_node_arg, const POS &join_pos_arg, PT_joined_table_type Type_arg, PT_table_reference *tab2_node_arg)
Definition: parse_tree_nodes.h:640
Common base class for CREATE TABLE and ALTER TABLE option nodes.
Definition: parse_tree_nodes.h:2613
PT_ddl_table_option(const POS &pos)
Definition: parse_tree_nodes.h:2615
~PT_ddl_table_option() override=0
virtual bool is_rename_table() const
Definition: parse_tree_nodes.h:2620
Top-level node for the DELETE statement.
Definition: parse_tree_nodes.h:1991
bool add_table(Parse_context *pc, Table_ident *table)
Definition: parse_tree_nodes.cc:1209
bool is_multitable() const
Definition: parse_tree_nodes.h:2052
Item * opt_where_clause
Definition: parse_tree_nodes.h:2003
Mem_root_array_YY< Table_ident * > table_list
Definition: parse_tree_nodes.h:2000
PT_delete(const POS &pos, PT_with_clause *with_clause_arg, PT_hint_list *opt_hints_arg, int opt_delete_options_arg, Table_ident *table_ident_arg, const LEX_CSTRING &opt_table_alias_arg, List< String > *opt_use_partition_arg, Item *opt_where_clause_arg, PT_order *opt_order_clause_arg, Item *opt_delete_limit_clause_arg)
Definition: parse_tree_nodes.h:2010
SQL_I_List< Table_ref > delete_tables
Definition: parse_tree_nodes.h:2006
Item * opt_delete_limit_clause
Definition: parse_tree_nodes.h:2005
Mem_root_array_YY< PT_table_reference * > join_table_list
Definition: parse_tree_nodes.h:2002
Table_ident * table_ident
Definition: parse_tree_nodes.h:1998
PT_delete(const POS &pos, PT_with_clause *with_clause_arg, PT_hint_list *opt_hints_arg, int opt_delete_options_arg, const Mem_root_array_YY< Table_ident * > &table_list_arg, const Mem_root_array_YY< PT_table_reference * > &join_table_list_arg, Item *opt_where_clause_arg)
Definition: parse_tree_nodes.h:2031
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:1995
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1224
const int opt_delete_options
Definition: parse_tree_nodes.h:1997
Parse_tree_root super
Definition: parse_tree_nodes.h:1992
PT_order * opt_order_clause
Definition: parse_tree_nodes.h:2004
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1996
const char *const opt_table_alias
Definition: parse_tree_nodes.h:1999
List< String > * opt_use_partition
Definition: parse_tree_nodes.h:2001
Definition: parse_tree_nodes.h:542
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:1764
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1719
PT_subquery * m_subquery
Definition: parse_tree_nodes.h:557
const char *const m_table_alias
Definition: parse_tree_nodes.h:558
PT_table_reference super
Definition: parse_tree_nodes.h:543
PT_derived_table(const POS &pos, bool lateral, PT_subquery *subquery, const LEX_CSTRING &table_alias, Create_col_name_list *column_names)
Definition: parse_tree_nodes.cc:1707
bool m_lateral
Definition: parse_tree_nodes.h:556
const Create_col_name_list column_names
List of explicitly specified column names; if empty, no list.
Definition: parse_tree_nodes.h:560
Definition: parse_tree_nodes.h:5305
Alter_drop m_alter_drop
Definition: parse_tree_nodes.h:5326
Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:5323
const char * m_index_name
Definition: parse_tree_nodes.h:5321
Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:5324
PT_drop_index_stmt(const POS &pos, MEM_ROOT *mem_root, const char *index_name, Table_ident *table, Alter_info::enum_alter_table_algorithm algo, Alter_info::enum_alter_table_lock lock)
Definition: parse_tree_nodes.h:5307
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3868
Table_ident * m_table
Definition: parse_tree_nodes.h:5322
Definition: parse_tree_nodes.h:5854
Sql_cmd_drop_library m_cmd
Definition: parse_tree_nodes.h:5862
PT_drop_library_stmt(const POS &pos, bool if_exists, sp_name *lib_name)
Definition: parse_tree_nodes.h:5856
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.h:5859
Definition: parse_tree_nodes.h:5970
Sql_cmd_drop_masking_policy m_cmd
Definition: parse_tree_nodes.h:5979
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.h:5976
PT_drop_masking_policy_stmt(const POS &pos, bool if_exists, LEX_CSTRING policy_name)
Definition: parse_tree_nodes.h:5972
Parse tree node for DROP RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5726
PT_drop_resource_group(const POS &pos, const LEX_CSTRING &resource_group_name, bool force)
Definition: parse_tree_nodes.h:5730
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5489
resourcegroups::Sql_cmd_drop_resource_group sql_cmd
Definition: parse_tree_nodes.h:5727
Definition: parse_tree_nodes.h:3357
Sql_cmd_drop_role sql_cmd
Definition: parse_tree_nodes.h:3358
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5170
PT_drop_role(const POS &pos, bool ignore_errors, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:3361
Top-level node for the DROP SPATIAL REFERENCE SYSTEM statement.
Definition: parse_tree_nodes.h:2272
Sql_cmd_drop_srs sql_cmd
The SQL command object.
Definition: parse_tree_nodes.h:2274
PT_drop_srs(const POS &pos, unsigned long long srid, bool if_exists)
Definition: parse_tree_nodes.h:2282
unsigned long long m_srid
SRID of the SRS to drop.
Definition: parse_tree_nodes.h:2279
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5132
Definition: parse_tree_nodes.h:3460
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:5206
LEX_STRING ident
Definition: parse_tree_nodes.h:3461
PT_dynamic_privilege(const POS &pos, const POS &errpos, const LEX_STRING &ident)
Definition: parse_tree_nodes.h:3464
Definition: parse_tree_nodes.h:1921
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1927
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2125
PT_set_operation(const POS &pos, PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1864
Parse tree node for a window frame's exclusions, cf.
Definition: parse_tree_nodes.h:1511
enum_window_frame_exclusion m_exclusion
Definition: parse_tree_nodes.h:1512
PT_exclusion(const POS &pos, enum_window_frame_exclusion e)
Definition: parse_tree_nodes.h:1515
Definition: parse_tree_nodes.h:5752
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4125
PT_explain_for_connection(const POS &pos, my_thread_id thread_id)
Definition: parse_tree_nodes.h:5754
Sql_cmd_explain_other_thread m_cmd
Definition: parse_tree_nodes.h:5760
Definition: parse_tree_nodes.h:5763
PT_explain(const POS &pos, Explain_format_type format, bool is_analyze, bool is_explicit_format, Parse_tree_root *explainable_stmt, std::optional< std::string_view > explain_into_variable_name, LEX_CSTRING schema_name_for_explain)
Definition: parse_tree_nodes.h:5765
const bool m_analyze
Definition: parse_tree_nodes.h:5781
LEX_CSTRING m_schema_name_for_explain
Definition: parse_tree_nodes.h:5785
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4144
const bool m_explicit_format
Definition: parse_tree_nodes.h:5782
std::optional< std::string_view > m_explain_into_variable_name
Definition: parse_tree_nodes.h:5784
Parse_tree_root *const m_explainable_stmt
Definition: parse_tree_nodes.h:5783
const Explain_format_type m_format
Definition: parse_tree_nodes.h:5780
Definition: parse_tree_nodes.h:1674
PT_explicit_table(const POS &pos, const Query_options &options_arg, PT_item_list *item_list_arg, const Mem_root_array_YY< PT_table_reference * > &from_clause_arg)
Definition: parse_tree_nodes.h:1678
Definition: parse_tree_nodes.h:3117
PT_external_file_list(THD *thd)
Definition: parse_tree_nodes.h:3119
bool push_back(PT_file_attributes *file_attributes)
Definition: parse_tree_nodes.h:3121
mem_root_deque< PT_file_attributes * > files
Definition: parse_tree_nodes.h:3125
Base class for both generated and regular column definitions.
Definition: parse_tree_column_attrs.h:1021
Definition: parse_tree_nodes.h:3105
const String * prefix
Definition: parse_tree_nodes.h:3112
Ternary_option strict_load
Definition: parse_tree_nodes.h:3114
const String * name
Definition: parse_tree_nodes.h:3110
const String * uri
Definition: parse_tree_nodes.h:3109
Ternary_option allow_missing_files
Definition: parse_tree_nodes.h:3113
bool merge_attributes(PT_file_attributes *attr)
Definition: parse_tree_nodes.cc:2651
const String * pattern
Definition: parse_tree_nodes.h:3111
Definition: parse_tree_nodes.h:2567
List< Key_part_spec > * m_ref_list
Definition: parse_tree_nodes.h:2599
fk_option m_fk_delete_opt
Definition: parse_tree_nodes.h:2602
PT_foreign_key_definition(const POS &pos, const LEX_STRING &constraint_name, const LEX_STRING &key_name, List< PT_key_part_specification > *columns, Table_ident *referenced_table, List< Key_part_spec > *ref_list, fk_match_opt fk_match_option, fk_option fk_update_opt, fk_option fk_delete_opt)
Definition: parse_tree_nodes.h:2571
Table_ident * m_referenced_table
Definition: parse_tree_nodes.h:2598
LEX_STRING m_column_name
Definition: parse_tree_nodes.h:2605
fk_match_opt m_fk_match_option
Definition: parse_tree_nodes.h:2600
fk_option m_fk_update_opt
Definition: parse_tree_nodes.h:2601
const LEX_STRING m_key_name
Definition: parse_tree_nodes.h:2596
const LEX_STRING m_constraint_name
Definition: parse_tree_nodes.h:2595
void set_column_name(const LEX_STRING &column_name)
Definition: parse_tree_nodes.h:2590
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2568
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2597
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2222
Parse tree node for a window's frame, cf.
Definition: parse_tree_nodes.h:1524
PT_border * m_to
Definition: parse_tree_nodes.h:1529
PT_frame(const POS &pos, enum_window_frame_unit unit, PT_borders *from_to, PT_exclusion *exclusion)
Definition: parse_tree_nodes.h:1536
bool m_originally_absent
If true, this is an artificial frame, not specified by the user.
Definition: parse_tree_nodes.h:1534
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_window.cc:60
enum_window_frame_unit m_query_expression
Definition: parse_tree_nodes.h:1526
PT_border * m_from
Definition: parse_tree_nodes.h:1528
PT_exclusion * m_exclusion
Definition: parse_tree_nodes.h:1531
Definition: parse_tree_nodes.h:258
PT_order_list super
Definition: parse_tree_nodes.h:259
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:264
PT_gorder_list(const POS &pos)
Definition: parse_tree_nodes.h:262
Definition: parse_tree_nodes.h:3471
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5210
const List< LEX_USER > * users
Definition: parse_tree_nodes.h:3473
const bool with_admin_option
Definition: parse_tree_nodes.h:3474
const Mem_root_array< PT_role_or_privilege * > * roles
Definition: parse_tree_nodes.h:3472
PT_grant_roles(const POS &pos, const Mem_root_array< PT_role_or_privilege * > *roles, const List< LEX_USER > *users, bool with_admin_option)
Definition: parse_tree_nodes.h:3477
Definition: parse_tree_nodes.h:707
PT_group(const POS &pos, Mem_root_array_YY< PT_order_list * > group_list_arg, olap_type olap_arg)
Definition: parse_tree_nodes.h:721
bool set_num_grouping_sets(Parse_context *pc, int &num_grouping_sets)
Definition: parse_tree_nodes.cc:321
Mem_root_array_YY< PT_order_list * > group_list
Definition: parse_tree_nodes.h:710
void check_if_execute_only_in_secondary_engine(Parse_context *pc, int num_grouping_sets)
Definition: parse_tree_nodes.cc:372
bool allocate_grouping_sets(Parse_context *pc, int &num_grouping_sets)
Initializes the grouping set if the query block includes GROUP BY modifiers.
Definition: parse_tree_nodes.cc:394
olap_type olap
Definition: parse_tree_nodes.h:711
Parse_tree_node super
Definition: parse_tree_nodes.h:708
void populate_grouping_sets_rollup_cube(Parse_context *pc)
Populate the grouping set bitvector if the query block has non-primitive ROLLUP and CUBE grouping.
Definition: parse_tree_nodes.cc:509
bool set_olap_type(Parse_context *pc)
Definition: parse_tree_nodes.cc:280
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.h:714
bool populate_grouping_sets(Parse_context *pc)
Populates the grouping sets if the query block includes non-primitive grouping.
Definition: parse_tree_nodes.cc:557
bool populate_grouping_sets_fornon_primitive_grouping(Parse_context *pc)
Populate the grouping set bitvector if the query block has GROUPING SETS group by modifier.
Definition: parse_tree_nodes.cc:427
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:580
Definition: parse_tree_hints.h:100
A template for options that set a single <alter option> value in thd->lex->key_create_info.
Definition: parse_tree_nodes.h:2437
PT_index_option(const POS &pos, Option_type option_value)
Definition: parse_tree_nodes.h:2441
Option_type m_option_value
Definition: parse_tree_nodes.h:2450
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2444
Definition: parse_tree_nodes.h:2541
Index_options m_options
Definition: parse_tree_nodes.h:2564
PT_inline_index_definition(const POS &pos, keytype type_par, const LEX_STRING &name_arg, PT_base_index_option *type, List< PT_key_part_specification > *cols, Index_options options)
Definition: parse_tree_nodes.h:2545
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2542
keytype m_keytype
Definition: parse_tree_nodes.h:2560
PT_base_index_option * m_type
Definition: parse_tree_nodes.h:2562
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2563
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2210
const LEX_STRING m_name
Definition: parse_tree_nodes.h:2561
Definition: parse_tree_nodes.h:2102
virtual mem_root_deque< List_item * > & get_many_values()
Definition: parse_tree_nodes.h:2118
bool push_back(mem_root_deque< Item * > *x)
Definition: parse_tree_nodes.h:2113
PT_insert_values_list(const POS &pos, MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:2108
Parse_tree_node super
Definition: parse_tree_nodes.h:2103
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1343
mem_root_deque< List_item * > many_values
Definition: parse_tree_nodes.h:2105
Top-level node for the INSERT statement.
Definition: parse_tree_nodes.h:2129
PT_item_list *const opt_on_duplicate_column_list
Definition: parse_tree_nodes.h:2143
PT_item_list *const column_list
Definition: parse_tree_nodes.h:2138
PT_item_list *const opt_on_duplicate_value_list
Definition: parse_tree_nodes.h:2144
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:2133
bool has_query_block() const
Definition: parse_tree_nodes.h:2187
const bool is_replace
Definition: parse_tree_nodes.h:2132
PT_query_expression_body * insert_query_expression
Definition: parse_tree_nodes.h:2140
Create_col_name_list *const opt_values_column_list
Definition: parse_tree_nodes.h:2142
Parse_tree_root super
Definition: parse_tree_nodes.h:2130
Table_ident *const table_ident
Definition: parse_tree_nodes.h:2136
PT_insert_values_list * row_value_list
Definition: parse_tree_nodes.h:2139
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1354
const char *const opt_values_table_alias
Definition: parse_tree_nodes.h:2141
List< String > *const opt_use_partition
Definition: parse_tree_nodes.h:2137
const bool ignore
Definition: parse_tree_nodes.h:2135
const thr_lock_type lock_option
Definition: parse_tree_nodes.h:2134
PT_insert(const POS &pos, bool is_replace_arg, PT_hint_list *opt_hints_arg, thr_lock_type lock_option_arg, bool ignore_arg, Table_ident *table_ident_arg, List< String > *opt_use_partition_arg, PT_item_list *column_list_arg, PT_insert_values_list *row_value_list_arg, PT_query_expression_body *insert_query_expression_arg, const LEX_CSTRING &opt_values_table_alias_arg, Create_col_name_list *opt_values_column_list_arg, PT_item_list *opt_on_duplicate_column_list_arg, PT_item_list *opt_on_duplicate_value_list_arg)
Definition: parse_tree_nodes.h:2147
Definition: parse_tree_nodes.h:6008
List< PT_install_component_set_element > * m_set_elements
Definition: parse_tree_nodes.h:6011
PT_install_component(const POS &pos, THD *thd, Mem_root_array_YY< LEX_STRING > urns, List< PT_install_component_set_element > *set_elements)
Definition: parse_tree_nodes.cc:5763
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5784
Mem_root_array_YY< LEX_STRING > m_urns
Definition: parse_tree_nodes.h:6010
Definition: parse_tree_nodes.h:1930
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1936
PT_set_operation(const POS &pos, PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1864
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2130
Definition: parse_tree_nodes.h:1368
sql_exchange m_exchange
Definition: parse_tree_nodes.h:1379
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4792
PT_into_destination super
Definition: parse_tree_nodes.h:1369
PT_into_destination_dumpfile(const POS &pos, const LEX_STRING &file_name_arg)
Definition: parse_tree_nodes.h:1372
Definition: parse_tree_nodes.h:1322
PT_into_destination super
Definition: parse_tree_nodes.h:1323
sql_exchange m_exchange
Definition: parse_tree_nodes.h:1364
PT_into_destination_outfile(const POS &pos, URI_information *outfile_uri_arg, File_information *file_info, const Field_separators *field_term_arg, const Line_separators *line_term_arg, enum_destination dumpfile_flag)
Definition: parse_tree_nodes.h:1347
enum_destination dumpfile_dest
Definition: parse_tree_nodes.h:1365
PT_into_destination_outfile(const POS &pos, LEX_CSTRING attr, enum_destination dumpfile_flag)
Definition: parse_tree_nodes.h:1339
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4756
PT_into_destination_outfile(const POS &pos, const LEX_STRING &file_name_arg, File_information *file_info, const Field_separators *field_term_arg, const Line_separators *line_term_arg, enum_destination dumpfile_flag)
Definition: parse_tree_nodes.h:1326
Definition: parse_tree_nodes.h:1312
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4741
PT_into_destination(const POS &pos)
Definition: parse_tree_nodes.h:1316
Parse_tree_node super
Definition: parse_tree_nodes.h:1313
Definition: parse_tree_nodes.h:1194
PT_transaction_characteristic super
Definition: parse_tree_nodes.h:1195
PT_isolation_level(const POS &pos, enum_tx_isolation level)
Definition: parse_tree_nodes.h:1198
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independe...
Definition: parse_tree_helpers.h:109
mem_root_deque< Item * > value
Definition: parse_tree_helpers.h:117
bool push_back(Item *item)
Definition: parse_tree_helpers.h:130
uint elements() const
Definition: parse_tree_helpers.h:128
Definition: parse_tree_nodes.h:5913
Parse_tree_node super
Definition: parse_tree_nodes.h:5914
PT_jdv_name_value_list(const POS &pos, THD *thd)
Definition: parse_tree_nodes.h:5922
Mem_root_array< uint > * col_tags_list()
Definition: parse_tree_nodes.h:5947
THD * m_thd
Definition: parse_tree_nodes.h:5916
Mem_root_array< LEX_STRING > * name_list()
Definition: parse_tree_nodes.h:5945
PT_item_list * name_value_list()
Definition: parse_tree_nodes.h:5946
Mem_root_array< LEX_STRING > m_name_list
Definition: parse_tree_nodes.h:5918
PT_item_list * m_name_value_list
Definition: parse_tree_nodes.h:5917
Mem_root_array< uint > m_jdv_col_tags_list
Definition: parse_tree_nodes.h:5919
bool push_back(PT_jdv_name_value *jdv_name_value)
Definition: parse_tree_nodes.h:5928
Definition: parse_tree_nodes.h:5896
LEX_STRING m_name
Definition: parse_tree_nodes.h:5899
uint col_tags()
Definition: parse_tree_nodes.h:5910
PT_jdv_name_value(const POS &pos, LEX_STRING &name, Item *value, int col_tags)
Definition: parse_tree_nodes.h:5904
LEX_STRING name()
Definition: parse_tree_nodes.h:5908
Item * value()
Definition: parse_tree_nodes.h:5909
Item * m_value
Definition: parse_tree_nodes.h:5900
Parse_tree_node super
Definition: parse_tree_nodes.h:5897
uint m_col_tags
Definition: parse_tree_nodes.h:5901
Definition: parse_tree_nodes.h:649
Item * on
Definition: parse_tree_nodes.h:651
PT_joined_table super
Definition: parse_tree_nodes.h:650
PT_joined_table_on(const POS &pos, PT_table_reference *tab1_node_arg, const POS &join_pos_arg, PT_joined_table_type type, PT_table_reference *tab2_node_arg, Item *on_arg)
Definition: parse_tree_nodes.h:654
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4467
Definition: parse_tree_nodes.h:663
PT_joined_table_using(const POS &pos, PT_table_reference *tab1_node_arg, const POS &join_pos_arg, PT_joined_table_type type, PT_table_reference *tab2_node_arg, List< String > *using_fields_arg)
Definition: parse_tree_nodes.h:668
PT_joined_table_using(const POS &pos, PT_table_reference *tab1_node_arg, const POS &join_pos_arg, PT_joined_table_type type, PT_table_reference *tab2_node_arg)
A PT_joined_table_using without a list of columns denotes a natural join.
Definition: parse_tree_nodes.h:676
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:4506
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4495
List< String > * using_fields
Definition: parse_tree_nodes.h:665
PT_joined_table super
Definition: parse_tree_nodes.h:664
Definition: parse_tree_nodes.h:576
Table_ref * m_left_table_ref
Definition: parse_tree_nodes.h:585
PT_table_reference super
Definition: parse_tree_nodes.h:577
void add_rhs(PT_table_reference *table)
Adds the table reference as the right-hand side of this join.
Definition: parse_tree_nodes.h:619
~PT_joined_table() override=0
This class is being inherited, it should thus be abstract.
PT_joined_table_type m_type
Definition: parse_tree_nodes.h:582
Table_ref * m_right_table_ref
Definition: parse_tree_nodes.h:586
POS m_join_pos
Definition: parse_tree_nodes.h:581
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4417
bool contextualize_tabs(Parse_context *pc)
Definition: parse_tree_nodes.cc:176
PT_joined_table(const POS &pos, PT_table_reference *tab1_node_arg, const POS &join_pos_arg, PT_joined_table_type type, PT_table_reference *tab2_node_arg)
Definition: parse_tree_nodes.h:589
PT_table_reference * m_left_pt_table
Definition: parse_tree_nodes.h:580
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:4428
PT_table_reference * m_right_pt_table
Definition: parse_tree_nodes.h:583
PT_joined_table * add_cross_join(PT_cross_join *cj) override
Adds the cross join to this join operation.
Definition: parse_tree_nodes.h:613
Definition: parse_tree_nodes.h:5461
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:5468
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4025
const char * m_name
Definition: parse_tree_nodes.h:5472
PT_json_table_column super
Definition: parse_tree_nodes.h:5462
unique_ptr_destroy_only< Json_table_column > m_column
Definition: parse_tree_nodes.h:5471
PT_json_table_column_for_ordinality(const POS &pos, LEX_STRING name)
Definition: parse_tree_nodes.cc:4018
Definition: parse_tree_nodes.h:5496
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:5507
Item * m_path
Definition: parse_tree_nodes.h:5510
PT_json_table_column_with_nested_path(const POS &pos, Item *path, Mem_root_array< PT_json_table_column * > *nested_cols)
Definition: parse_tree_nodes.h:5500
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4105
PT_json_table_column super
Definition: parse_tree_nodes.h:5497
Json_table_column * m_column
Definition: parse_tree_nodes.h:5512
const Mem_root_array< PT_json_table_column * > * m_nested_columns
Definition: parse_tree_nodes.h:5511
Definition: parse_tree_nodes.h:5475
~PT_json_table_column_with_path() override
const CHARSET_INFO * m_collation
Definition: parse_tree_nodes.h:5492
unique_ptr_destroy_only< Json_table_column > m_column
Definition: parse_tree_nodes.h:5489
const char * m_name
Definition: parse_tree_nodes.h:5490
PT_json_table_column_with_path(const POS &pos, unique_ptr_destroy_only< Json_table_column > column, LEX_STRING name, PT_type *type, const CHARSET_INFO *collation)
Definition: parse_tree_nodes.cc:4035
PT_json_table_column super
Definition: parse_tree_nodes.h:5476
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:5486
PT_type * m_type
Definition: parse_tree_nodes.h:5491
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4063
Definition: parse_tree_nodes.h:499
PT_json_table_column(const POS &pos)
Definition: parse_tree_nodes.h:501
virtual Json_table_column * get_column()=0
A key part specification.
Definition: parse_tree_nodes.h:2321
bool has_expression() const
Definition: parse_tree_nodes.h:2387
LEX_CSTRING m_column_name
The name of the column that this key part indexes.
Definition: parse_tree_nodes.h:2419
Parse_tree_node super
Definition: parse_tree_nodes.h:2322
bool is_explicit() const
Definition: parse_tree_nodes.h:2380
Item * get_expression() const
Get the indexed expression.
Definition: parse_tree_nodes.h:2364
LEX_CSTRING get_column_name() const
Get the column that this key part points to.
Definition: parse_tree_nodes.h:2396
enum_order get_order() const
Definition: parse_tree_nodes.h:2374
enum_order m_order
The direction of the index.
Definition: parse_tree_nodes.h:2416
bool do_contextualize(Parse_context *pc) override
Contextualize this key part specification.
Definition: parse_tree_nodes.cc:1020
int get_prefix_length() const
Definition: parse_tree_nodes.h:2406
PT_key_part_specification(const POS &pos, Item *expression, enum_order order)
Constructor for a functional key part.
Definition: parse_tree_nodes.cc:1006
int m_prefix_length
If this is greater than zero, it represents how many bytes of the column that is indexed.
Definition: parse_tree_nodes.h:2426
Item * m_expression
The indexed expression in case this is a functional key part.
Definition: parse_tree_nodes.h:2413
Definition: parse_tree_nodes.h:5878
mem_root_deque< sp_name_with_alias > m_libraries
Definition: parse_tree_nodes.h:5881
bool push_back(PT_library_with_alias *lib)
Definition: parse_tree_nodes.h:5887
PT_library_list(const POS &pos)
Definition: parse_tree_nodes.h:5884
mem_root_deque< sp_name_with_alias > & get_libraries()
Definition: parse_tree_nodes.h:5893
Parse_tree_node super
Definition: parse_tree_nodes.h:5879
Definition: parse_tree_nodes.h:5865
PT_library_with_alias(const POS &pos, sp_name *lib_name, const LEX_CSTRING &alias)
Definition: parse_tree_nodes.h:5871
sp_name_with_alias library()
Definition: parse_tree_nodes.h:5875
Parse_tree_node super
Definition: parse_tree_nodes.h:5866
sp_name_with_alias m_library
Definition: parse_tree_nodes.h:5868
Definition: parse_tree_nodes.h:429
Parse_tree_node super
Definition: parse_tree_nodes.h:430
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.h:435
Limit_options limit_options
Definition: parse_tree_nodes.h:432
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4345
PT_limit_clause(const POS &pos, const Limit_options &limit_options_arg)
Definition: parse_tree_nodes.h:441
Definition: parse_tree_nodes.h:5427
List< Index_hint > * m_opt_cache_key_list
Definition: parse_tree_nodes.h:5445
bool m_ignore_leaves
Definition: parse_tree_nodes.h:5446
PT_adm_partition * m_partitions
Definition: parse_tree_nodes.h:5444
Table_ident * m_table
Definition: parse_tree_nodes.h:5443
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3951
PT_load_index_partitions_stmt(const POS &pos, MEM_ROOT *mem_root, Table_ident *table, PT_adm_partition *partitions, List< Index_hint > *opt_cache_key_list, bool ignore_leaves)
Definition: parse_tree_nodes.h:5429
Definition: parse_tree_nodes.h:5449
Mem_root_array< PT_preload_keys * > * m_preload_list
Definition: parse_tree_nodes.h:5458
PT_load_index_stmt(const POS &pos, MEM_ROOT *mem_root, Mem_root_array< PT_preload_keys * > *preload_list)
Definition: parse_tree_nodes.h:5451
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3969
Definition: parse_tree_nodes.h:5788
const thr_lock_type m_lock_type
Definition: parse_tree_nodes.h:5823
Sql_cmd_load_table m_cmd
Definition: parse_tree_nodes.h:5821
PT_load_table(const POS &pos, enum_filetype filetype, thr_lock_type lock_type, bool is_local_file, enum_source_type source_type, const LEX_STRING filename, ulong file_count, bool in_key_order, On_duplicate on_duplicate, Table_ident *table, List< String > *opt_partitions, const CHARSET_INFO *opt_charset, LEX_CSTRING compression_algorithm, String *opt_xml_rows_identified_by, const Field_separators *opt_field_separators, const Line_separators *opt_line_separators, ulong opt_ignore_lines, PT_item_list *opt_fields_or_vars, PT_item_list *opt_set_fields, PT_item_list *opt_set_exprs, List< String > *opt_set_expr_strings, ulong parallel, ulonglong memory_size, bool is_bulk_operation)
Definition: parse_tree_nodes.h:5790
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4272
Definition: parse_tree_nodes.h:833
PT_locking_clause_list(const POS &pos, MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:835
Mem_root_array_YY< PT_locking_clause * > m_locking_clauses
Definition: parse_tree_nodes.h:851
bool push_back(PT_locking_clause *locking_clause)
Definition: parse_tree_nodes.h:840
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:844
Definition: parse_tree_nodes.h:770
Lock_descriptor get_lock_descriptor() const
Definition: parse_tree_nodes.h:785
virtual bool set_lock_for_tables(Parse_context *pc)=0
Locked_row_action action() const
Definition: parse_tree_nodes.h:782
Locked_row_action m_locked_row_action
Definition: parse_tree_nodes.h:801
PT_locking_clause(const POS &pos, Lock_strength strength, Locked_row_action action)
Definition: parse_tree_nodes.h:772
Lock_strength m_lock_strength
Definition: parse_tree_nodes.h:800
bool do_contextualize(Parse_context *pc) final
Definition: parse_tree_nodes.cc:2683
Definition: parse_tree_nodes.h:1798
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1827
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1821
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1831
PT_locking_clause_list *const m_locking_clauses
Definition: parse_tree_nodes.h:1837
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1814
PT_locking(const POS &pos, PT_query_expression_body *qe, PT_locking_clause_list *locking_clauses)
Definition: parse_tree_nodes.h:1802
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1818
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1808
bool can_absorb_order_and_limit(bool order, bool limit) const override
True if this query expression can absorb an extraneous order by/limit clause.
Definition: parse_tree_nodes.h:1823
PT_query_expression_body *const m_query_expression
Definition: parse_tree_nodes.h:1836
Definition: parse_tree_nodes.h:5290
bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:5301
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3853
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:5302
PT_optimize_table_stmt(const POS &pos, MEM_ROOT *mem_root, bool no_write_to_binlog, Mem_root_array< Table_ident * > *table_list)
Definition: parse_tree_nodes.h:5292
Definition: parse_tree_nodes.h:1118
PT_option_value_list_head(const POS &pos, const POS &delimiter_pos_arg, Parse_tree_node *value_arg, const POS &value_pos_arg)
Definition: parse_tree_nodes.h:1126
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4621
Parse_tree_node super
Definition: parse_tree_nodes.h:1119
POS value_pos
Definition: parse_tree_nodes.h:1123
Parse_tree_node * value
Definition: parse_tree_nodes.h:1122
POS delimiter_pos
Definition: parse_tree_nodes.h:1121
Definition: parse_tree_nodes.h:1137
PT_option_value_list(const POS &pos, PT_option_value_list_head *head_arg, const POS &delimiter_pos_arg, Parse_tree_node *tail, const POS &tail_pos)
Definition: parse_tree_nodes.h:1143
PT_option_value_list_head * head
Definition: parse_tree_nodes.h:1140
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1148
PT_option_value_list_head super
Definition: parse_tree_nodes.h:1138
Definition: parse_tree_nodes.h:1002
const CHARSET_INFO * opt_charset
Definition: parse_tree_nodes.h:1005
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:1003
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:213
PT_option_value_no_option_type_charset(const POS &pos, const CHARSET_INFO *opt_charset_arg)
Definition: parse_tree_nodes.h:1008
Definition: parse_tree_nodes.h:1016
PT_option_value_no_option_type_names(const POS &pos, const POS &error_pos)
Definition: parse_tree_nodes.h:1022
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:231
POS m_error_pos
Definition: parse_tree_nodes.h:1019
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:1017
Definition: parse_tree_nodes.h:1078
POS expr_pos
Definition: parse_tree_nodes.h:1086
bool retain_current_password
Definition: parse_tree_nodes.h:1084
PT_option_value_no_option_type_password_for(const POS &pos, LEX_USER *user_arg, const char *password_arg, const char *current_password_arg, bool retain_current, bool random_pass, const POS &expr_pos_arg)
Definition: parse_tree_nodes.h:1089
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:918
LEX_USER * user
Definition: parse_tree_nodes.h:1081
const char * password
Definition: parse_tree_nodes.h:1082
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1079
bool random_password_generator
Definition: parse_tree_nodes.h:1085
const char * current_password
Definition: parse_tree_nodes.h:1083
Definition: parse_tree_nodes.h:1051
bool random_password_generator
Definition: parse_tree_nodes.h:1057
PT_option_value_no_option_type_password(const POS &pos, const char *password_arg, const char *current_password_arg, bool retain_current, bool random_password, const POS &expr_pos_arg)
Definition: parse_tree_nodes.h:1061
const char * current_password
Definition: parse_tree_nodes.h:1055
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1052
POS expr_pos
Definition: parse_tree_nodes.h:1058
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:964
bool retain_current_password
Definition: parse_tree_nodes.h:1056
const char * password
Definition: parse_tree_nodes.h:1054
Definition: parse_tree_nodes.h:962
PT_option_value_no_option_type_user_var(const POS &pos, const LEX_STRING &name_arg, Item *expr_arg)
Definition: parse_tree_nodes.h:969
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4580
LEX_STRING name
Definition: parse_tree_nodes.h:965
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:963
Item * expr
Definition: parse_tree_nodes.h:966
Definition: parse_tree_nodes.h:931
PT_option_value_no_option_type(const POS &pos)
Definition: parse_tree_nodes.h:933
Definition: parse_tree_nodes.h:1104
enum_var_type type
Definition: parse_tree_nodes.h:1107
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4616
Parse_tree_node super
Definition: parse_tree_nodes.h:1105
PT_set_scoped_system_variable * value
Definition: parse_tree_nodes.h:1108
PT_option_value_type(const POS &pos, enum_var_type type_arg, PT_set_scoped_system_variable *value_arg)
Definition: parse_tree_nodes.h:1111
Definition: parse_tree_nodes.h:216
Parse_tree_node super
Definition: parse_tree_nodes.h:217
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.h:228
PT_order_expr(const POS &pos, Item *item_arg, enum_order dir)
Definition: parse_tree_nodes.h:220
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:640
Definition: parse_tree_nodes.h:234
void push_back(PT_order_expr *order)
Definition: parse_tree_nodes.h:251
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:243
Parse_tree_node super
Definition: parse_tree_nodes.h:235
PT_order_list(const POS &pos)
Definition: parse_tree_nodes.h:241
SQL_I_List< ORDER > value
Definition: parse_tree_nodes.h:238
Definition: parse_tree_nodes.h:759
Parse_tree_node super
Definition: parse_tree_nodes.h:760
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:623
PT_order(const POS &pos, PT_order_list *order_list_arg)
Definition: parse_tree_nodes.h:764
PT_order_list * order_list
Definition: parse_tree_nodes.h:763
Node for the PARTITION clause of CREATE/ALTER TABLE.
Definition: parse_tree_partitions.h:404
Node for the PARTITION definition clause.
Definition: parse_tree_partitions.h:625
Definition: parse_tree_nodes.h:5408
List< Index_hint > * m_opt_cache_key_list
Definition: parse_tree_nodes.h:5423
Table_ddl_node super
Definition: parse_tree_nodes.h:5409
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:5430
PT_preload_keys(const POS &pos, Table_ident *table, List< Index_hint > *opt_cache_key_list, bool ignore_leaves)
Definition: parse_tree_nodes.h:5412
Table_ident * m_table
Definition: parse_tree_nodes.h:5422
bool m_ignore_leaves
Definition: parse_tree_nodes.h:5424
Definition: parse_tree_nodes.h:804
PT_query_block_locking_clause(const POS &pos, Lock_strength strength, Locked_row_action action=Locked_row_action::WAIT)
Definition: parse_tree_nodes.h:806
bool set_lock_for_tables(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2705
Definition: parse_tree_nodes.h:854
virtual bool can_absorb_order_and_limit(bool order, bool limit) const =0
True if this query expression can absorb an extraneous order by/limit clause.
virtual bool is_table_value_constructor() const =0
virtual bool is_set_operation() const =0
virtual Setop_type type() const
Definition: parse_tree_nodes.h:858
Setop_type
Definition: parse_tree_nodes.h:857
@ UNION
Definition: parse_tree_nodes.h:857
@ EXCEPT
Definition: parse_tree_nodes.h:857
@ NONE
Definition: parse_tree_nodes.h:857
@ INTERSECT
Definition: parse_tree_nodes.h:857
virtual PT_insert_values_list * get_row_value_list() const =0
PT_query_expression_body(const POS &pos)
Definition: parse_tree_nodes.h:856
virtual bool has_into_clause() const =0
virtual bool has_trailing_into_clause() const =0
Definition: parse_tree_nodes.h:1685
PT_order * m_order
Definition: parse_tree_nodes.h:1789
bool contextualize_deferred_hints(Parse_context *pc)
Definition: parse_tree_nodes.h:1713
PT_limit_clause * m_limit
Definition: parse_tree_nodes.h:1790
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1705
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4823
PT_query_expression(const POS &pos, PT_with_clause *with_clause, PT_query_expression_body *body, PT_order *order, PT_limit_clause *limit)
Definition: parse_tree_nodes.h:1687
PT_query_expression_body * m_body
Definition: parse_tree_nodes.h:1788
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1707
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1708
PT_query_expression(const POS &pos, PT_query_expression_body *body)
Definition: parse_tree_nodes.h:1700
bool contextualize_order_and_limit(Parse_context *pc)
Contextualizes the order and limit clauses, re-interpreting them according to the rules.
Definition: parse_tree_nodes.cc:1641
bool can_absorb_order_and_limit(bool order, bool limit) const override
True if this query expression can absorb an extraneous order by/limit clause.
Definition: parse_tree_nodes.h:1720
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1772
PT_query_expression(const POS &pos, PT_query_expression_body *body, PT_order *order, PT_limit_clause *limit)
Definition: parse_tree_nodes.h:1696
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:1791
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1768
Definition: parse_tree_nodes.h:1547
PT_query_primary(const POS &pos)
Definition: parse_tree_nodes.h:1549
Definition: parse_tree_nodes.h:1552
bool is_implicit_from_clause() const
Definition: parse_tree_nodes.h:1645
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1538
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:1611
PT_into_destination * opt_into1
Definition: parse_tree_nodes.h:1558
PT_query_specification(const POS &pos, PT_hint_list *opt_hints_arg, const Query_options &options_arg, PT_item_list *item_list_arg, PT_into_destination *opt_into1_arg, const Mem_root_array_YY< PT_table_reference * > &from_clause_arg, Item *opt_where_clause_arg, PT_group *opt_group_clause_arg, Item *opt_having_clause_arg, PT_window_list *opt_window_clause_arg, Item *opt_qualify_clause_arg, bool implicit_from_clause)
Definition: parse_tree_nodes.h:1568
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1555
PT_query_specification(const POS &pos, const Query_options &options_arg, PT_item_list *item_list_arg)
Definition: parse_tree_nodes.h:1609
Item * opt_having_clause
Definition: parse_tree_nodes.h:1563
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1639
PT_window_list * opt_window_clause
Definition: parse_tree_nodes.h:1564
const bool m_is_from_clause_implicit
Definition: parse_tree_nodes.h:1559
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1634
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1626
PT_item_list * item_list
Definition: parse_tree_nodes.h:1557
Mem_root_array_YY< PT_table_reference * > from_clause
Definition: parse_tree_nodes.h:1560
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1638
Query_options options
Definition: parse_tree_nodes.h:1556
PT_group * opt_group_clause
Definition: parse_tree_nodes.h:1562
bool can_absorb_order_and_limit(bool, bool) const override
True if this query expression can absorb an extraneous order by/limit clause.
Definition: parse_tree_nodes.h:1636
Item * opt_qualify_clause
Definition: parse_tree_nodes.h:1565
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1627
PT_query_specification(const POS &pos, const Query_options &options_arg, PT_item_list *item_list_arg, const Mem_root_array_YY< PT_table_reference * > &from_clause_arg, Item *opt_where_clause_arg)
Definition: parse_tree_nodes.h:1591
Item * opt_where_clause
Definition: parse_tree_nodes.h:1561
PT_query_primary super
Definition: parse_tree_nodes.h:1553
Definition: parse_tree_nodes.h:5220
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:5237
bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:5236
PT_repair_table_stmt(const POS &pos, MEM_ROOT *mem_root, bool no_write_to_binlog, Mem_root_array< Table_ident * > *table_list, decltype(HA_CHECK_OPT::flags) flags, decltype(HA_CHECK_OPT::sql_flags) sql_flags)
Definition: parse_tree_nodes.h:5222
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3792
decltype(HA_CHECK_OPT::sql_flags) m_sql_flags
Definition: parse_tree_nodes.h:5239
decltype(HA_CHECK_OPT::flags) m_flags
Definition: parse_tree_nodes.h:5238
Top-level node for the SHUTDOWN statement.
Definition: parse_tree_nodes.h:6000
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5534
Sql_cmd_restart_server sql_cmd
Definition: parse_tree_nodes.h:6005
Definition: parse_tree_nodes.h:3488
const Mem_root_array< PT_role_or_privilege * > * roles
Definition: parse_tree_nodes.h:3489
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5224
const List< LEX_USER > * users
Definition: parse_tree_nodes.h:3490
PT_revoke_roles(const POS &pos, Mem_root_array< PT_role_or_privilege * > *roles, const List< LEX_USER > *users)
Definition: parse_tree_nodes.h:3493
Definition: parse_tree_nodes.h:3424
LEX_STRING role
Definition: parse_tree_nodes.h:3425
LEX_STRING host
Definition: parse_tree_nodes.h:3426
PT_role_at_host(const POS &pos, const POS &errpos, const LEX_STRING &role, const LEX_STRING &host)
Definition: parse_tree_nodes.h:3429
LEX_USER * get_user(THD *thd) override
Definition: parse_tree_nodes.cc:5190
Definition: parse_tree_nodes.h:3436
LEX_STRING ident
Definition: parse_tree_nodes.h:3437
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:5198
LEX_USER * get_user(THD *thd) override
Definition: parse_tree_nodes.cc:5194
PT_role_or_dynamic_privilege(const POS &pos, const POS &errpos, const LEX_STRING &ident)
Definition: parse_tree_nodes.h:3440
Definition: parse_tree_nodes.h:3413
virtual LEX_USER * get_user(THD *thd)
Definition: parse_tree_nodes.cc:5180
virtual Privilege * get_privilege(THD *thd)
Definition: parse_tree_nodes.cc:5185
POS m_errpos
Definition: parse_tree_nodes.h:3415
PT_role_or_privilege(const POS &pos, const POS &errpos)
Definition: parse_tree_nodes.h:3418
Definition: parse_tree_nodes.h:420
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4339
PT_select_item_list(const POS &pos)
Definition: parse_tree_nodes.h:424
PT_item_list super
Definition: parse_tree_nodes.h:421
Definition: parse_tree_nodes.h:1396
sp_head * sp
Definition: parse_tree_nodes.h:1406
PT_select_sp_var(const POS &pos, const LEX_STRING &name_arg)
Definition: parse_tree_nodes.h:1410
uint offset
Definition: parse_tree_nodes.h:1399
uint get_offset() const override
Definition: parse_tree_nodes.h:1414
PT_select_var super
Definition: parse_tree_nodes.h:1397
bool is_local() const override
Definition: parse_tree_nodes.h:1413
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1024
Definition: parse_tree_nodes.h:1939
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1073
PT_query_expression_body * m_qe
Definition: parse_tree_nodes.h:1981
const bool m_has_trailing_locking_clauses
Definition: parse_tree_nodes.h:1983
PT_into_destination * m_into
Definition: parse_tree_nodes.h:1982
std::string get_printable_parse_tree(THD *thd) override
Definition: parse_tree_nodes.cc:1044
Parse_tree_root super
Definition: parse_tree_nodes.h:1940
PT_select_stmt(const POS &pos, enum_sql_command sql_command, PT_query_expression_body *qe)
Definition: parse_tree_nodes.h:1948
enum_sql_command m_sql_command
Definition: parse_tree_nodes.h:1980
PT_select_stmt(const POS &pos, PT_query_expression_body *qe, PT_into_destination *into=nullptr, bool has_trailing_locking_clauses=false)
Creates a SELECT command.
Definition: parse_tree_nodes.h:1967
Definition: parse_tree_nodes.h:1419
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4803
List< PT_select_var > value
Definition: parse_tree_nodes.h:1425
PT_into_destination super
Definition: parse_tree_nodes.h:1420
bool push_back(PT_select_var *var)
Definition: parse_tree_nodes.h:1429
PT_select_var_list(const POS &pos)
Definition: parse_tree_nodes.h:1423
Definition: parse_tree_nodes.h:1382
const LEX_STRING name
Definition: parse_tree_nodes.h:1384
virtual bool is_local() const
Definition: parse_tree_nodes.h:1389
virtual uint get_offset() const
Definition: parse_tree_nodes.h:1390
PT_select_var(const POS &pos, const LEX_STRING &name_arg)
Definition: parse_tree_nodes.h:1386
Definition: parse_tree_nodes.h:1029
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:1030
const CHARSET_INFO * opt_charset
Definition: parse_tree_nodes.h:1032
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:247
PT_set_names(const POS &pos, const CHARSET_INFO *opt_charset_arg, const CHARSET_INFO *opt_collation_arg)
Definition: parse_tree_nodes.h:1036
const CHARSET_INFO * opt_collation
Definition: parse_tree_nodes.h:1033
Definition: parse_tree_nodes.h:1860
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1884
bool m_is_distinct
Definition: parse_tree_nodes.h:1902
bool can_absorb_order_and_limit(bool, bool) const override
True if this query expression can absorb an extraneous order by/limit clause.
Definition: parse_tree_nodes.h:1889
bool is_distinct() const
Definition: parse_tree_nodes.h:1893
void merge_descendants(Parse_context *pc, Query_term_set_op *setop, QueryLevel &ql)
Possibly merge lower syntactic levels of set operations (UNION, INTERSECT and EXCEPT) into setop,...
Definition: parse_tree_nodes.cc:1941
PT_into_destination * m_into
Definition: parse_tree_nodes.h:1903
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1892
PT_set_operation(const POS &pos, PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1864
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1878
void set_is_rhs_in_parentheses(bool v)
Definition: parse_tree_nodes.h:1896
bool m_is_rhs_in_parentheses
Definition: parse_tree_nodes.h:1904
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1876
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.h:1905
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1891
List< PT_query_expression_body > m_list
Definition: parse_tree_nodes.h:1895
bool contextualize_setop(Parse_context *pc, Query_term_type setop_type, Surrounding_context context)
Definition: parse_tree_nodes.cc:2075
void merge_children(Query_term_set_op *setop, Query_term_set_op *lower)
Append the children of 'lower' to those of 'setop'.
Definition: parse_tree_nodes.cc:1814
Parse tree node for SET RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5741
PT_set_resource_group(const POS &pos, const LEX_CSTRING &name, Mem_root_array< ulonglong > *thread_id_list)
Definition: parse_tree_nodes.h:5745
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5499
resourcegroups::Sql_cmd_set_resource_group sql_cmd
Definition: parse_tree_nodes.h:5742
Definition: parse_tree_nodes.h:3368
PT_set_role(const POS &pos, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:3377
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5175
PT_set_role(const POS &pos, role_enum role_type, const List< LEX_USER > *opt_except_roles=nullptr)
Definition: parse_tree_nodes.h:3372
Sql_cmd_set_role sql_cmd
Definition: parse_tree_nodes.h:3369
Definition: parse_tree_nodes.h:909
Parse_tree_node super
Definition: parse_tree_nodes.h:910
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:927
PT_set_scoped_system_variable(const POS &pos, const POS &var_pos, const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name, Item *opt_expr)
Definition: parse_tree_nodes.h:913
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4538
const POS m_varpos
Definition: parse_tree_nodes.h:925
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:926
Item * m_opt_expr
Definition: parse_tree_nodes.h:928
Definition: parse_tree_nodes.h:977
const enum_var_type m_scope
Definition: parse_tree_nodes.h:994
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:978
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:996
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:997
Item * m_opt_expr
Definition: parse_tree_nodes.h:998
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4593
PT_set_system_variable(const POS &pos, enum_var_type scope, const POS &name_pos, const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name, Item *opt_expr)
Definition: parse_tree_nodes.h:981
const POS m_name_pos
Definition: parse_tree_nodes.h:995
Definition: parse_tree_nodes.h:937
Item * m_opt_expr
Definition: parse_tree_nodes.h:958
PT_set_variable(const POS &pos, const POS &varpos, const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name, const POS &expr_pos, Item *opt_expr)
Definition: parse_tree_nodes.h:941
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:938
const POS m_expr_pos
Definition: parse_tree_nodes.h:957
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:955
const POS m_varpos
Definition: parse_tree_nodes.h:954
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:836
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:956
Definition: parse_tree_nodes.h:1298
Parse_tree_node super
Definition: parse_tree_nodes.h:1299
POS set_pos
Definition: parse_tree_nodes.h:1301
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4724
PT_start_option_value_list * list
Definition: parse_tree_nodes.h:1302
PT_set(const POS &pos, const POS &set_pos_arg, PT_start_option_value_list *list_arg)
Definition: parse_tree_nodes.h:1305
Base class for Parse tree nodes of SHOW statements.
Definition: parse_tree_nodes.h:3515
PT_show_base(const POS &pos, enum_sql_command sql_command)
Definition: parse_tree_nodes.h:3517
enum_sql_command m_sql_command
SQL command.
Definition: parse_tree_nodes.h:3521
Parse tree node for SHOW BINARY LOG STATUS statement.
Definition: parse_tree_nodes.h:3987
PT_show_binary_log_status(const POS &pos)
Definition: parse_tree_nodes.h:3989
Sql_cmd_show_binary_log_status m_sql_cmd
Definition: parse_tree_nodes.h:3995
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3315
Parse tree node for SHOW BINLOG EVENTS statement.
Definition: parse_tree_nodes.h:3589
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3601
Sql_cmd_show_binlog_events m_sql_cmd
Definition: parse_tree_nodes.h:3603
PT_show_binlog_events(const POS &pos, const LEX_STRING opt_log_file_name={}, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:3591
const LEX_STRING m_opt_log_file_name
Definition: parse_tree_nodes.h:3600
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3040
Parse tree node for SHOW BINLOGS statement.
Definition: parse_tree_nodes.h:3608
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3052
PT_show_binlogs(const POS &pos)
Definition: parse_tree_nodes.h:3610
Sql_cmd_show_binlogs m_sql_cmd
Definition: parse_tree_nodes.h:3615
Parse tree node for SHOW CHARACTER SET statement.
Definition: parse_tree_nodes.h:3620
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3059
PT_show_charsets(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3622
Sql_cmd_show_charsets m_sql_cmd
Definition: parse_tree_nodes.h:3628
Parse tree node for SHOW COLLATIONS statement.
Definition: parse_tree_nodes.h:3633
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3072
PT_show_collations(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3635
Sql_cmd_show_collations m_sql_cmd
Definition: parse_tree_nodes.h:3641
Base class for Parse tree nodes of SHOW COUNT(*) { WARNINGS | ERRORS } statements.
Definition: parse_tree_nodes.h:3647
Sql_cmd * make_cmd_generic(THD *thd, LEX_CSTRING diagnostic_variable_name)
Definition: parse_tree_nodes.cc:3085
PT_show_count_base(const POS &pos)
Definition: parse_tree_nodes.h:3649
Parse tree node for SHOW COUNT(*) ERRORS.
Definition: parse_tree_nodes.h:3658
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.h:3662
PT_show_count_errors(const POS &pos)
Definition: parse_tree_nodes.h:3660
Parse tree node for SHOW COUNT(*) WARNINGS.
Definition: parse_tree_nodes.h:3669
PT_show_count_warnings(const POS &pos)
Definition: parse_tree_nodes.h:3671
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.h:3673
Parse tree node for SHOW CREATE DATABASE statement.
Definition: parse_tree_nodes.h:3680
const LEX_STRING m_name
Definition: parse_tree_nodes.h:3692
PT_show_create_database(const POS &pos, bool if_not_exists, const LEX_STRING &name)
Definition: parse_tree_nodes.h:3682
Sql_cmd_show_create_database m_sql_cmd
Definition: parse_tree_nodes.h:3694
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3117
const bool m_if_not_exists
Definition: parse_tree_nodes.h:3691
Parse tree node for SHOW CREATE EVENT statement.
Definition: parse_tree_nodes.h:3699
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3130
sp_name *const m_spname
Definition: parse_tree_nodes.h:3707
PT_show_create_event(const POS &pos, sp_name *event_name)
Definition: parse_tree_nodes.h:3701
Sql_cmd_show_create_event m_sql_cmd
Definition: parse_tree_nodes.h:3709
Parse tree node for SHOW CREATE FUNCTION statement.
Definition: parse_tree_nodes.h:3714
Sql_cmd_show_create_function m_sql_cmd
Definition: parse_tree_nodes.h:3724
PT_show_create_function(const POS &pos, sp_name *function_name)
Definition: parse_tree_nodes.h:3716
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3139
sp_name *const m_spname
Definition: parse_tree_nodes.h:3722
Parse tree node for SHOW CREATE LIBRARY statement.
Definition: parse_tree_nodes.h:3729
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3148
sp_name *const m_spname
Definition: parse_tree_nodes.h:3737
PT_show_create_library(const POS &pos, sp_name *library_name)
Definition: parse_tree_nodes.h:3731
Sql_cmd_show_create_library m_sql_cmd
Definition: parse_tree_nodes.h:3739
Definition: parse_tree_nodes.h:5982
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.cc:5529
LEX_CSTRING m_policy_name
Definition: parse_tree_nodes.h:5991
PT_show_create_masking_policy(const POS &pos, LEX_CSTRING policy_name)
Definition: parse_tree_nodes.h:5984
Parse tree node for SHOW CREATE PROCEDURE statement.
Definition: parse_tree_nodes.h:3744
Sql_cmd_show_create_procedure m_sql_cmd
Definition: parse_tree_nodes.h:3754
sp_name *const m_spname
Definition: parse_tree_nodes.h:3752
PT_show_create_procedure(const POS &pos, sp_name *procedure_name)
Definition: parse_tree_nodes.h:3746
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3157
Parse tree node for SHOW CREATE TABLE and VIEW statements.
Definition: parse_tree_nodes.h:3759
Sql_cmd_show_create_table m_sql_cmd
Definition: parse_tree_nodes.h:3767
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3166
PT_show_create_table(const POS &pos, Table_ident *table_ident)
Definition: parse_tree_nodes.h:3761
Parse tree node for SHOW CREATE TRIGGER statement.
Definition: parse_tree_nodes.h:3772
PT_show_create_trigger(const POS &pos, sp_name *trigger_name)
Definition: parse_tree_nodes.h:3774
Sql_cmd_show_create_trigger m_sql_cmd
Definition: parse_tree_nodes.h:3782
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3185
sp_name *const m_spname
Definition: parse_tree_nodes.h:3780
Parse tree node for SHOW CREATE USER statement.
Definition: parse_tree_nodes.h:3787
Sql_cmd_show_create_user m_sql_cmd
Definition: parse_tree_nodes.h:3797
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3194
PT_show_create_user(const POS &pos, LEX_USER *user)
Definition: parse_tree_nodes.h:3789
LEX_USER *const m_user
Definition: parse_tree_nodes.h:3795
Parse tree node for SHOW CREATE VIEW statement.
Definition: parse_tree_nodes.h:3802
PT_show_create_view(const POS &pos, Table_ident *table_ident)
Definition: parse_tree_nodes.h:3804
Sql_cmd_show_create_table m_sql_cmd
Definition: parse_tree_nodes.h:3810
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3178
Parse tree node for SHOW DATABASES statement.
Definition: parse_tree_nodes.h:3815
Sql_cmd_show_databases m_sql_cmd
Definition: parse_tree_nodes.h:3823
PT_show_databases(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3817
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3203
Parse tree node for SHOW ENGINE statements.
Definition: parse_tree_nodes.h:3828
PT_show_engine_base(const POS &pos, enum enum_sql_command sql_command, const LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3830
LEX_STRING m_engine
Definition: parse_tree_nodes.h:3836
bool m_all
Definition: parse_tree_nodes.h:3837
Parse tree node for SHOW ENGINE LOGS statement.
Definition: parse_tree_nodes.h:3842
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3216
PT_show_engine_logs(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3844
Sql_cmd_show_engine_logs m_sql_cmd
Definition: parse_tree_nodes.h:3850
Parse tree node for SHOW ENGINE MUTEX statement.
Definition: parse_tree_nodes.h:3855
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3230
Sql_cmd_show_engine_mutex m_sql_cmd
Definition: parse_tree_nodes.h:3863
PT_show_engine_mutex(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3857
Parse tree node for SHOW ENGINE STATUS statement.
Definition: parse_tree_nodes.h:3868
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3244
PT_show_engine_status(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3870
Sql_cmd_show_engine_status m_sql_cmd
Definition: parse_tree_nodes.h:3876
Parse tree node for SHOW ENGINES statement.
Definition: parse_tree_nodes.h:3881
PT_show_engines(const POS &pos)
Definition: parse_tree_nodes.h:3883
Sql_cmd_show_engines m_sql_cmd
Definition: parse_tree_nodes.h:3889
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3258
Parse tree node for SHOW ERRORS statement.
Definition: parse_tree_nodes.h:3894
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3903
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3267
Sql_cmd_show_errors m_sql_cmd
Definition: parse_tree_nodes.h:3905
PT_show_errors(const POS &pos, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:3896
Parse tree node for SHOW EVENTS statement.
Definition: parse_tree_nodes.h:3910
Sql_cmd_show_events m_sql_cmd
Definition: parse_tree_nodes.h:3919
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3301
PT_show_events(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3912
Parse tree node for SHOW COLUMNS statement.
Definition: parse_tree_nodes.h:3924
Sql_cmd_show_columns m_sql_cmd
Definition: parse_tree_nodes.h:3938
Show_cmd_type m_show_cmd_type
Definition: parse_tree_nodes.h:3937
PT_show_fields(const POS &pos, Show_cmd_type show_cmd_type, Table_ident *table, LEX_STRING opt_wild={}, Item *opt_where=nullptr)
Definition: parse_tree_nodes.h:3928
PT_show_table_base super
Definition: parse_tree_nodes.h:3925
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3279
Base class for Parse tree nodes of SHOW statements with LIKE/WHERE parameter.
Definition: parse_tree_nodes.h:3526
Item * m_where
Definition: parse_tree_nodes.h:3535
PT_show_filter_base(const POS &pos, enum_sql_command sql_command, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3528
LEX_STRING m_wild
Wild or where clause used in the statement.
Definition: parse_tree_nodes.h:3534
Parse tree node for SHOW FUNCTION CODE statement.
Definition: parse_tree_nodes.h:3943
PT_show_function_code(const POS &pos, const sp_name *function_name)
Definition: parse_tree_nodes.h:3945
Parse tree node for SHOW GRANTS statement.
Definition: parse_tree_nodes.h:3951
Sql_cmd_show_grants sql_cmd
Definition: parse_tree_nodes.h:3963
PT_show_grants(const POS &pos, const LEX_USER *opt_for_user, const List< LEX_USER > *opt_using_users)
Definition: parse_tree_nodes.h:3953
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5241
Parse tree node for SHOW INDEX statement.
Definition: parse_tree_nodes.h:3968
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3293
PT_show_keys(const POS &pos, bool extended_show, Table_ident *table, Item *where)
Definition: parse_tree_nodes.h:3970
Sql_cmd_show_keys m_sql_cmd
Definition: parse_tree_nodes.h:3982
bool m_extended_show
Definition: parse_tree_nodes.h:3981
PT_show_table_base super
Definition: parse_tree_nodes.h:3978
Parse tree node for SHOW OPEN TABLES statement.
Definition: parse_tree_nodes.h:4000
PT_show_open_tables(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4002
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3322
Sql_cmd_show_open_tables m_sql_cmd
Definition: parse_tree_nodes.h:4010
Parse tree node for SHOW PARSE_TREE statement.
Definition: parse_tree_nodes.h:4040
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5246
Parse_tree_root *const m_parse_tree_stmt
Definition: parse_tree_nodes.h:4049
Sql_cmd_show_parse_tree m_sql_cmd
Definition: parse_tree_nodes.h:4050
PT_show_parse_tree(const POS &pos, Parse_tree_root *parse_tree_stmt)
Definition: parse_tree_nodes.h:4042
Parse tree node for SHOW PLUGINS statement.
Definition: parse_tree_nodes.h:4015
Sql_cmd_show_plugins m_sql_cmd
Definition: parse_tree_nodes.h:4022
PT_show_plugins(const POS &pos)
Definition: parse_tree_nodes.h:4017
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3340
Parse tree node for SHOW PRIVILEGES statement.
Definition: parse_tree_nodes.h:4027
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3349
PT_show_privileges(const POS &pos)
Definition: parse_tree_nodes.h:4029
Sql_cmd_show_privileges m_sql_cmd
Definition: parse_tree_nodes.h:4035
Parse tree node for SHOW FUNCTION CODE statement.
Definition: parse_tree_nodes.h:4055
PT_show_procedure_code(const POS &pos, const sp_name *procedure_name)
Definition: parse_tree_nodes.h:4057
Parse tree node for SHOW PROCESSLIST statement.
Definition: parse_tree_nodes.h:4063
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3356
Sql_cmd_show_processlist m_sql_cmd
Definition: parse_tree_nodes.h:4071
PT_show_processlist(const POS &pos, bool verbose)
Definition: parse_tree_nodes.h:4065
Parse tree node for SHOW PROFILE statement.
Definition: parse_tree_nodes.h:4076
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3379
uint m_opt_profile_options
Definition: parse_tree_nodes.h:4089
Sql_cmd_show_profile m_sql_cmd
Definition: parse_tree_nodes.h:4093
PT_show_profile(const POS &pos, uint opt_profile_options=0, my_thread_id opt_query_id=0, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:4078
my_thread_id m_opt_query_id
Definition: parse_tree_nodes.h:4090
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:4091
Parse tree node for SHOW PROFILES statement.
Definition: parse_tree_nodes.h:4098
PT_show_profiles(const POS &pos)
Definition: parse_tree_nodes.h:4100
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3394
Sql_cmd_show_profiles m_sql_cmd
Definition: parse_tree_nodes.h:4105
Parse tree node for SHOW RELAYLOG EVENTS statement.
Definition: parse_tree_nodes.h:4110
Sql_cmd_show_relaylog_events m_sql_cmd
Definition: parse_tree_nodes.h:4128
PT_show_relaylog_events(const POS &pos, const LEX_STRING opt_log_file_name={}, PT_limit_clause *opt_limit_clause=nullptr, LEX_CSTRING opt_channel_name={})
Definition: parse_tree_nodes.h:4112
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:4125
const LEX_STRING m_opt_log_file_name
Definition: parse_tree_nodes.h:4124
const LEX_CSTRING m_opt_channel_name
Definition: parse_tree_nodes.h:4126
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3401
Parse tree node for SHOW REPLICA STATUS statement.
Definition: parse_tree_nodes.h:4145
Sql_cmd_show_replica_status m_sql_cmd
Definition: parse_tree_nodes.h:4156
const LEX_CSTRING m_opt_channel_name
Definition: parse_tree_nodes.h:4154
PT_show_replica_status(const POS &pos, LEX_CSTRING opt_channel_name={})
Definition: parse_tree_nodes.h:4147
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3421
Parse tree node for SHOW REPLICAS statement.
Definition: parse_tree_nodes.h:4133
Sql_cmd_show_replicas m_sql_cmd
Definition: parse_tree_nodes.h:4140
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3414
PT_show_replicas(const POS &pos)
Definition: parse_tree_nodes.h:4135
Parse tree node for SHOW FUNCTION/PROCEDURE CODE statements.
Definition: parse_tree_nodes.h:3575
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3372
Sql_cmd_show_routine_code m_sql_cmd
Definition: parse_tree_nodes.h:3584
PT_show_routine_code(const POS &pos, enum_sql_command sql_command, const sp_name *routine_name)
Definition: parse_tree_nodes.h:3577
Base class for Parse tree nodes of SHOW statements with schema parameter.
Definition: parse_tree_nodes.h:3540
char * m_opt_db
Optional schema name in FROM/IN clause.
Definition: parse_tree_nodes.h:3551
PT_show_schema_base(const POS &pos, enum_sql_command sql_command, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3542
Item * m_where
Definition: parse_tree_nodes.h:3554
LEX_STRING m_wild
Wild or where clause used in the statement.
Definition: parse_tree_nodes.h:3553
Parse tree node for SHOW STATUS FUNCTION statement.
Definition: parse_tree_nodes.h:4193
Sql_cmd_show_status_func m_sql_cmd
Definition: parse_tree_nodes.h:4201
PT_show_status_func(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4195
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3459
Parse tree node for SHOW STATUS LIBRARY statement.
Definition: parse_tree_nodes.h:4180
Sql_cmd_show_status_library m_sql_cmd
Definition: parse_tree_nodes.h:4188
PT_show_status_library(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4182
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3446
Parse tree node for SHOW STATUS PROCEDURE statement.
Definition: parse_tree_nodes.h:4206
PT_show_status_proc(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4208
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3472
Sql_cmd_show_status_proc m_sql_cmd
Definition: parse_tree_nodes.h:4214
Parse tree node for SHOW STATUS statement.
Definition: parse_tree_nodes.h:4161
enum_var_type m_var_type
Definition: parse_tree_nodes.h:4175
Sql_cmd_show_status m_sql_cmd
Definition: parse_tree_nodes.h:4173
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3430
PT_show_status(const POS &pos, enum_var_type var_type, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4163
Base class for Parse tree nodes of SHOW COLUMNS/SHOW INDEX statements.
Definition: parse_tree_nodes.h:3559
bool make_table_base_cmd(THD *thd, bool *temporary)
Definition: parse_tree_nodes.cc:2956
PT_show_table_base(const POS &pos, enum_sql_command sql_command, Table_ident *table_ident, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3561
Table_ident * m_table_ident
Table used in the statement.
Definition: parse_tree_nodes.h:3570
Parse tree node for SHOW TABLE STATUS statement.
Definition: parse_tree_nodes.h:4219
Sql_cmd_show_table_status m_sql_cmd
Definition: parse_tree_nodes.h:4229
PT_show_table_status(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4221
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3485
Parse tree node for SHOW TABLES statement.
Definition: parse_tree_nodes.h:4234
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3500
Show_cmd_type m_show_cmd_type
Definition: parse_tree_nodes.h:4246
PT_show_tables(const POS &pos, Show_cmd_type show_cmd_type, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4236
Sql_cmd_show_tables m_sql_cmd
Definition: parse_tree_nodes.h:4244
Parse tree node for SHOW TRIGGERS statement.
Definition: parse_tree_nodes.h:4251
PT_show_triggers(const POS &pos, bool full, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4253
bool m_full
Definition: parse_tree_nodes.h:4263
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3516
Sql_cmd_show_triggers m_sql_cmd
Definition: parse_tree_nodes.h:4261
Parse tree node for SHOW VARIABLES statement.
Definition: parse_tree_nodes.h:4268
enum_var_type m_var_type
Definition: parse_tree_nodes.h:4282
Sql_cmd_show_variables m_sql_cmd
Definition: parse_tree_nodes.h:4280
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3531
PT_show_variables(const POS &pos, enum_var_type var_type, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4270
Parse tree node for SHOW WARNINGS statement.
Definition: parse_tree_nodes.h:4287
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:4296
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3547
Sql_cmd_show_warnings m_sql_cmd
Definition: parse_tree_nodes.h:4298
PT_show_warnings(const POS &pos, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:4289
Top-level node for the SHUTDOWN statement.
Definition: parse_tree_nodes.h:2209
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.h:2213
Sql_cmd_shutdown sql_cmd
Definition: parse_tree_nodes.h:2210
Definition: parse_tree_nodes.h:1246
PT_start_option_value_list_following_option_type_eq(const POS &pos, PT_set_scoped_system_variable *head_arg, const POS &head_pos_arg, PT_option_value_list_head *opt_tail_arg)
Definition: parse_tree_nodes.h:1254
POS head_pos
Definition: parse_tree_nodes.h:1250
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4688
PT_start_option_value_list_following_option_type super
Definition: parse_tree_nodes.h:1247
PT_option_value_list_head * opt_tail
Definition: parse_tree_nodes.h:1251
PT_set_scoped_system_variable * head
Definition: parse_tree_nodes.h:1249
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4702
PT_start_option_value_list_following_option_type_transaction(const POS &pos, PT_transaction_characteristics *characteristics_arg, const POS &characteristics_pos_arg)
Definition: parse_tree_nodes.h:1273
PT_transaction_characteristics * characteristics
Definition: parse_tree_nodes.h:1269
PT_start_option_value_list_following_option_type super
Definition: parse_tree_nodes.h:1267
POS characteristics_pos
Definition: parse_tree_nodes.h:1270
Definition: parse_tree_nodes.h:1239
PT_start_option_value_list_following_option_type(const POS &pos)
Definition: parse_tree_nodes.h:1241
Definition: parse_tree_nodes.h:1155
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1156
POS head_pos
Definition: parse_tree_nodes.h:1159
PT_start_option_value_list_no_type(const POS &pos, PT_option_value_no_option_type *head_arg, const POS &head_pos_arg, PT_option_value_list_head *tail_arg)
Definition: parse_tree_nodes.h:1163
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4642
PT_option_value_list_head * tail
Definition: parse_tree_nodes.h:1160
PT_option_value_no_option_type * head
Definition: parse_tree_nodes.h:1158
Definition: parse_tree_nodes.h:1221
PT_transaction_characteristics * characteristics
Definition: parse_tree_nodes.h:1224
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1222
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4673
POS end_pos
Definition: parse_tree_nodes.h:1225
PT_start_option_value_list_transaction(const POS &pos, PT_transaction_characteristics *characteristics_arg, const POS &end_pos_arg)
Definition: parse_tree_nodes.h:1228
Definition: parse_tree_nodes.h:1283
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1284
PT_start_option_value_list_following_option_type * list
Definition: parse_tree_nodes.h:1287
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4719
PT_start_option_value_list_type(const POS &pos, enum_var_type type_arg, PT_start_option_value_list_following_option_type *list_arg)
Definition: parse_tree_nodes.h:1290
enum_var_type type
Definition: parse_tree_nodes.h:1286
Definition: parse_tree_nodes.h:1045
PT_start_option_value_list(const POS &pos)
Definition: parse_tree_nodes.h:1047
Definition: parse_tree_nodes.h:3448
PT_static_privilege(const POS &pos, const POS &errpos, uint grant, const Mem_root_array< LEX_CSTRING > *columns=nullptr)
Definition: parse_tree_nodes.h:3453
const Mem_root_array< LEX_CSTRING > * columns
Definition: parse_tree_nodes.h:3450
const uint grant
Definition: parse_tree_nodes.h:3449
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:5202
Definition: parse_tree_nodes.h:1840
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4949
Parse_tree_node super
Definition: parse_tree_nodes.h:1841
PT_query_expression_body * qe
Definition: parse_tree_nodes.h:1843
bool m_is_derived_table
Definition: parse_tree_nodes.h:1847
Query_block * value()
Definition: parse_tree_nodes.h:1857
Query_block * query_block
Definition: parse_tree_nodes.h:1844
PT_subquery(const POS &pos, PT_query_expression_body *query_expression)
Definition: parse_tree_nodes.h:1849
Definition: parse_tree_nodes.h:2536
PT_table_constraint_def(const POS &pos)
Definition: parse_tree_nodes.h:2538
Definition: parse_tree_nodes.h:185
~PT_table_ddl_stmt_base() override=0
Alter_info m_alter_info
Definition: parse_tree_nodes.h:193
PT_table_ddl_stmt_base(const POS &pos, MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:187
Base class for column/constraint definitions in CREATE TABLE.
Definition: parse_tree_nodes.h:2531
PT_table_element(const POS &pos)
Definition: parse_tree_nodes.h:2533
Definition: parse_tree_nodes.h:507
Item * m_path
Definition: parse_tree_nodes.h:524
const LEX_STRING m_table_alias
Definition: parse_tree_nodes.h:526
Item * m_expr
Definition: parse_tree_nodes.h:523
PT_table_reference super
Definition: parse_tree_nodes.h:508
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1668
Mem_root_array< PT_json_table_column * > * m_nested_columns
Definition: parse_tree_nodes.h:525
PT_table_factor_function(const POS &pos, Item *expr, Item *path, Mem_root_array< PT_json_table_column * > *nested_cols, const LEX_STRING &table_alias)
Definition: parse_tree_nodes.h:511
Definition: parse_tree_nodes.h:563
PT_joined_table * m_joined_table
Definition: parse_tree_nodes.h:573
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1778
PT_table_reference super
Definition: parse_tree_nodes.h:564
PT_table_factor_joined_table(const POS &pos, PT_joined_table *joined_table)
Definition: parse_tree_nodes.h:567
Definition: parse_tree_nodes.h:472
const char *const opt_table_alias
Definition: parse_tree_nodes.h:477
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4365
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:4397
Table_ident * table_ident
Definition: parse_tree_nodes.h:475
PT_table_factor_table_ident(const POS &pos, Table_ident *table_ident_arg, List< String > *opt_use_partition_arg, const LEX_CSTRING &opt_table_alias_arg, List< Index_hint > *opt_key_definition_arg, PT_tablesample *opt_tablesample_arg)
Definition: parse_tree_nodes.h:482
PT_table_reference super
Definition: parse_tree_nodes.h:473
List< Index_hint > * opt_key_definition
Definition: parse_tree_nodes.h:478
PT_tablesample * opt_tablesample
Definition: parse_tree_nodes.h:479
List< String > * opt_use_partition
Definition: parse_tree_nodes.h:476
Definition: parse_tree_nodes.h:814
Table_ident_list m_tables
Definition: parse_tree_nodes.h:830
bool raise_error(THD *thd, const Table_ident *name, int error)
Definition: parse_tree_nodes.cc:4525
bool set_lock_for_tables(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2935
PT_table_locking_clause(const POS &pos, Lock_strength strength, Mem_root_array_YY< Table_ident * > tables, Locked_row_action action)
Definition: parse_tree_nodes.h:818
Mem_root_array_YY< Table_ident * > Table_ident_list
Definition: parse_tree_nodes.h:816
Definition: parse_tree_nodes.h:529
PT_table_reference super
Definition: parse_tree_nodes.h:530
PT_table_reference_list_parens(const POS &pos, const Mem_root_array_YY< PT_table_reference * > table_list)
Definition: parse_tree_nodes.h:535
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4408
Mem_root_array_YY< PT_table_reference * > table_list
Definition: parse_tree_nodes.h:532
Definition: parse_tree_nodes.h:451
PT_table_reference(const POS &pos)
Definition: parse_tree_nodes.h:453
Table_ref * m_table_ref
Definition: parse_tree_nodes.h:455
virtual PT_joined_table * add_cross_join(PT_cross_join *cj)
Lets us build a parse tree top-down, which is necessary due to the context-dependent nature of the jo...
Definition: parse_tree_nodes.cc:171
Definition: parse_tree_nodes.h:1648
PT_insert_values_list *const row_value_list
Definition: parse_tree_nodes.h:1651
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1663
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1660
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1669
bool can_absorb_order_and_limit(bool, bool) const override
True if this query expression can absorb an extraneous order by/limit clause.
Definition: parse_tree_nodes.h:1665
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1661
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1620
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1667
PT_query_primary super
Definition: parse_tree_nodes.h:1649
PT_table_value_constructor(const POS &pos, PT_insert_values_list *row_value_list_arg)
Definition: parse_tree_nodes.h:1654
Definition: parse_tree_nodes.h:693
PT_tablesample(const POS &pos, tablesample_type tablesample_type_arg, Item *sample_percentage)
Definition: parse_tree_nodes.h:700
Parse_tree_node super
Definition: parse_tree_nodes.h:694
tablesample_type m_sampling_type
Definition: parse_tree_nodes.h:697
Item * m_sample_percentage
Definition: parse_tree_nodes.h:698
A template for options that set HA_CREATE_INFO::table_options and also records if the option was expl...
Definition: parse_tree_nodes.h:2792
PT_create_table_option super
Definition: parse_tree_nodes.h:2793
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2801
const Ternary_option value
Definition: parse_tree_nodes.h:2795
PT_ternary_create_table_option(const POS &pos, Ternary_option value)
Definition: parse_tree_nodes.h:2798
A template for options that set a single property in HA_CREATE_INFO, and also records if the option w...
Definition: parse_tree_nodes.h:2654
PT_traceable_create_table_option(const POS &pos, Option_type value)
Definition: parse_tree_nodes.h:2660
const Option_type value
Definition: parse_tree_nodes.h:2657
PT_create_table_option super
Definition: parse_tree_nodes.h:2655
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2663
A template for options that set a single property in a KEY_CREATE_INFO, and also records if the optio...
Definition: parse_tree_nodes.h:2459
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2464
Option_type m_option_value
Definition: parse_tree_nodes.h:2471
PT_traceable_index_option(const POS &pos, Option_type option_value)
Definition: parse_tree_nodes.h:2461
Definition: parse_tree_nodes.h:1186
PT_transaction_characteristic super
Definition: parse_tree_nodes.h:1187
PT_transaction_access_mode(const POS &pos, bool is_read_only)
Definition: parse_tree_nodes.h:1190
Definition: parse_tree_nodes.h:1172
int32 value
Definition: parse_tree_nodes.h:1176
Parse_tree_node super
Definition: parse_tree_nodes.h:1173
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4654
PT_transaction_characteristic(const POS &pos, const char *name_arg, int32 value_arg)
Definition: parse_tree_nodes.h:1179
const char * name
Definition: parse_tree_nodes.h:1175
Definition: parse_tree_nodes.h:1202
PT_transaction_characteristic * opt_tail
Definition: parse_tree_nodes.h:1206
PT_transaction_characteristics(const POS &pos, PT_transaction_characteristic *head_arg, PT_transaction_characteristic *opt_tail_arg)
Definition: parse_tree_nodes.h:1209
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1214
PT_transaction_characteristic * head
Definition: parse_tree_nodes.h:1205
Parse_tree_node super
Definition: parse_tree_nodes.h:1203
Definition: parse_tree_nodes.h:5329
PT_truncate_table_stmt(const POS &pos, Table_ident *table)
Definition: parse_tree_nodes.h:5331
Sql_cmd_truncate_table m_cmd_truncate_table
Definition: parse_tree_nodes.h:5339
Table_ident * m_table
Definition: parse_tree_nodes.h:5337
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3887
Base class for all column type nodes.
Definition: parse_tree_column_attrs.h:659
Definition: parse_tree_nodes.h:1912
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2120
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1918
PT_set_operation(const POS &pos, PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1864
Top-level node for the UPDATE statement.
Definition: parse_tree_nodes.h:2065
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:2068
Item * opt_limit_clause
Definition: parse_tree_nodes.h:2077
PT_update(const POS &pos, PT_with_clause *with_clause_arg, PT_hint_list *opt_hints_arg, thr_lock_type opt_low_priority_arg, bool opt_ignore_arg, const Mem_root_array_YY< PT_table_reference * > &join_table_list_arg, PT_item_list *column_list_arg, PT_item_list *value_list_arg, Item *opt_where_clause_arg, PT_order *opt_order_clause_arg, Item *opt_limit_clause_arg)
Definition: parse_tree_nodes.h:2080
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1288
Mem_root_array_YY< PT_table_reference * > join_table_list
Definition: parse_tree_nodes.h:2072
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:2069
bool opt_ignore
Definition: parse_tree_nodes.h:2071
PT_item_list * value_list
Definition: parse_tree_nodes.h:2074
thr_lock_type opt_low_priority
Definition: parse_tree_nodes.h:2070
PT_item_list * column_list
Definition: parse_tree_nodes.h:2073
Parse_tree_root super
Definition: parse_tree_nodes.h:2066
PT_order * opt_order_clause
Definition: parse_tree_nodes.h:2076
Item * opt_where_clause
Definition: parse_tree_nodes.h:2075
Parse tree node for a list of window definitions corresponding to a <window clause> in SQL 2003.
Definition: parse_tree_window.h:63
Represents the WITH clause: WITH [...], [...] SELECT ..., ^^^^^^^^^^^^^^^^^.
Definition: parse_tree_nodes.h:366
const Table_ref * m_most_inner_in_parsing
The innermost CTE reference which we're parsing at the moment.
Definition: parse_tree_nodes.h:415
void print(const THD *thd, String *str, enum_query_type query_type)
Definition: parse_tree_nodes.cc:2411
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2400
void leave_parsing_definition(const Table_ref *old)
Definition: parse_tree_nodes.h:396
Parse_tree_node super
Definition: parse_tree_nodes.h:367
PT_with_clause(const POS &pos, const PT_with_list *l, bool r)
Definition: parse_tree_nodes.h:370
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.h:402
const PT_with_list *const m_list
All CTEs of this clause.
Definition: parse_tree_nodes.h:408
const Table_ref * enter_parsing_definition(Table_ref *tl)
Call this to record in the WITH clause that we are contextualizing the CTE definition inserted in tab...
Definition: parse_tree_nodes.h:391
const bool m_recursive
True if the user has specified the RECURSIVE keyword.
Definition: parse_tree_nodes.h:410
Represents the WITH list.
Definition: parse_tree_nodes.h:344
Mem_root_array< PT_common_table_expr * > m_elements
Definition: parse_tree_nodes.h:358
Parse_tree_node super
Definition: parse_tree_nodes.h:345
bool push_back(PT_common_table_expr *el)
Definition: parse_tree_nodes.cc:2349
PT_with_list(const POS &pos, MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:350
const Mem_root_array< PT_common_table_expr * > & elements() const
Definition: parse_tree_nodes.h:353
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:231
virtual bool contextualize(Context *pc) final
Definition: parse_tree_node_base.h:321
bool is_contextualized() const
Definition: parse_tree_node_base.h:310
void error(Context *pc, const POS &pos) const
syntax_error() function replacement for deferred reporting of syntax errors
Definition: parse_tree_node_base.h:346
virtual bool do_contextualize(Context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_node_base.h:284
POS m_pos
Definition: parse_tree_node_base.h:245
Base class for all top-level nodes of SQL statements.
Definition: parse_tree_nodes.h:162
Parse_tree_root()=default
void operator=(const Parse_tree_root &)=delete
Parse_tree_root(const Parse_tree_root &)=delete
virtual ~Parse_tree_root()=default
Parse_tree_root(const POS &pos)
Definition: parse_tree_nodes.h:168
virtual std::string get_printable_parse_tree(THD *thd)
Definition: parse_tree_nodes.h:178
POS m_pos
Textual location of a token just parsed.
Definition: parse_tree_nodes.h:173
virtual Sql_cmd * make_cmd(THD *thd)=0
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:1179
bool clear_correlated_query_blocks()
Empties all correlated query blocks defined within the query expression; that is, correlated CTEs def...
Definition: sql_union.cc:987
Common base class for n-ary set operations, including unary.
Definition: query_term.h:555
Simple intrusive linked list.
Definition: sql_list.h:48
Class to represent the check constraint specifications obtained from the SQL statement parse.
Definition: sql_check_constraint.h:43
Item * check_expr
Check constraint expression.
Definition: sql_check_constraint.h:80
bool is_enforced
Check constraint state (enforced/not enforced)
Definition: sql_check_constraint.h:86
LEX_STRING name
Name of the check constraint.
Definition: sql_check_constraint.h:77
Definition: sql_admin.h:409
Definition: sql_cmd_ddl.h:99
Class that represents the ALTER TABLE t1 ANALYZE PARTITION p statement.
Definition: sql_partition_admin.h:53
Class that represents the ALTER TABLE t1 CHECK PARTITION p statement.
Definition: sql_partition_admin.h:75
Class that represents the ALTER TABLE t1 EXCHANGE PARTITION p WITH TABLE t2 statement.
Definition: sql_partition_admin.h:39
Class that represents the ALTER TABLE t1 OPTIMIZE PARTITION p statement.
Definition: sql_partition_admin.h:91
Class that represents the ALTER TABLE t1 REPAIR PARTITION p statement.
Definition: sql_partition_admin.h:106
Class that represents the ALTER TABLE t1 TRUNCATE PARTITION p statement.
Definition: sql_partition_admin.h:121
Represents the generic ALTER TABLE statement.
Definition: sql_alter.h:639
Sql_cmd_alter_user_default_role ALTER USER ... DEFAULT ROLE ... statement.
Definition: sql_admin.h:368
Histogram_command
Specifies which (if any) of the commands UPDATE HISTOGRAM or DROP HISTOGRAM that is specified after A...
Definition: sql_admin.h:71
Definition: sql_cmd_ddl.h:76
Sql_cmd_create_role represents the CREATE ROLE ... statement.
Definition: sql_admin.h:288
Definition: sql_cmd_srs.h:56
Represents ALTER TABLE IMPORT/DISCARD TABLESPACE statements.
Definition: sql_alter.h:650
Definition: sql_cmd_ddl.h:116
Definition: sql_cmd_ddl.h:154
Sql_cmd_drop_role represents the DROP ROLE ... statement.
Definition: sql_admin.h:308
Definition: sql_cmd_srs.h:110
Definition: opt_explain.h:204
Definition: sql_load.h:49
Sql_cmd_restart_server represents the RESTART server statement.
Definition: sql_restart_server.h:41
Represents ALTER TABLE SECONDARY_LOAD/SECONDARY_UNLOAD statements.
Definition: sql_alter.h:663
Sql_cmd_set_role represents the SET ROLE ... statement.
Definition: sql_admin.h:260
Represents SHOW BINARY LOG STATUS statement.
Definition: sql_show.h:464
Following are all subclasses of class Sql_cmd_show, in alphabetical order.
Definition: sql_show.h:234
Represents SHOW BINARY LOGS statement.
Definition: sql_show.h:249
Represents SHOW CHARACTER SET statement.
Definition: sql_show.h:258
Represents SHOW COLLATION statement.
Definition: sql_show.h:265
Represents SHOW COLUMNS statement.
Definition: sql_show.h:272
Represents SHOW CREATE DATABASE statement.
Definition: sql_show.h:279
Represents SHOW CREATE EVENT statement.
Definition: sql_show.h:288
Represents SHOW CREATE FUNCTION statement.
Definition: sql_show.h:297
Represents SHOW CREATE LIBRARY statement.
Definition: sql_show.h:307
Represents SHOW CREATE PROCEDURE statement.
Definition: sql_show.h:317
Represents SHOW CREATE TABLE/VIEW statement.
Definition: sql_show.h:327
Represents SHOW CREATE TRIGGER statement.
Definition: sql_show.h:343
Represents SHOW CREATE USER statement.
Definition: sql_show.h:353
Represents SHOW DATABASES statement.
Definition: sql_show.h:376
Represents SHOW ENGINE LOGS statement.
Definition: sql_show.h:384
Represents SHOW ENGINE MUTEX statement.
Definition: sql_show.h:393
Represents SHOW ENGINE STATUS statement.
Definition: sql_show.h:402
Represents SHOW STORAGE ENGINES statement.
Definition: sql_show.h:412
Represents SHOW ERRORS statement.
Definition: sql_show.h:419
Represents SHOW EVENTS statement.
Definition: sql_show.h:429
Represents SHOW GRANTS statement.
Definition: sql_show.h:439
Represents the SHOW INDEX statement.
Definition: sql_show.h:457
Represents SHOW OPEN TABLES statement.
Definition: sql_show.h:474
Represents SHOW PARSE_TREE statement.
Definition: sql_show.h:516
Represents SHOW PLUGINS statement.
Definition: sql_show.h:481
Represents SHOW PRIVILEGES statement.
Definition: sql_show.h:488
Represents SHOW PROCESSLIST statement.
Definition: sql_show.h:496
Represents SHOW PROFILE statement.
Definition: sql_show.h:523
Represents SHOW PROFILES statement.
Definition: sql_show.h:530
Represents SHOW RELAYLOG EVENTS statement.
Definition: sql_show.h:538
Represents SHOW REPLICA STATUS statement.
Definition: sql_show.h:562
Represents SHOW REPLICAS statement.
Definition: sql_show.h:553
Represents SHOW FUNCTION CODE and SHOW PROCEDURE CODE statements.
Definition: sql_show.h:218
Represents SHOW STATUS FUNCTION statement.
Definition: sql_show.h:587
Represents SHOW STATUS LIBRARY statement.
Definition: sql_show.h:580
Represents SHOW STATUS PROCEDURE statement.
Definition: sql_show.h:594
Represents SHOW STATUS statement.
Definition: sql_show.h:572
Represents SHOW TABLE STATUS statement.
Definition: sql_show.h:601
Represents SHOW TABLES statement.
Definition: sql_show.h:609
Represents SHOW TRIGGERS statement.
Definition: sql_show.h:616
Represents SHOW VARIABLES statement.
Definition: sql_show.h:623
Represents SHOW WARNINGS statement.
Definition: sql_show.h:630
Sql_cmd_shutdown represents the SHUTDOWN statement.
Definition: sql_admin.h:249
Sql_cmd_truncate_table represents the TRUNCATE statement.
Definition: sql_truncate.h:44
Representation of an SQL command.
Definition: sql_cmd.h:83
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:169
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
LEX * lex
Definition: sql_class.h:1006
const CHARSET_INFO * charset() const
Definition: sql_lexer_thd.h:42
MEM_ROOT * mem_root
Definition: sql_lexer_thd.h:40
Definition: sql_lex.h:313
Definition: table.h:2958
Definition: sql_exchange.h:133
void merge_uri_info_separators(URI_information *uri_info)
Definition: sql_exchange.h:137
Represents the (explicit) window of a SQL 2003 section 7.11 <window clause>, or the implicit (inlined...
Definition: window.h:110
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:172
Definition: partition_info.h:209
uint num_parts
Definition: partition_info.h:370
Sql_cmd_alter_resource_group represents ALTER RESOURCE GROUP statement.
Definition: resource_group_sql_cmd.h:77
Sql_cmd_create_resource_group represents CREATE RESOURCE GROUP statement.
Definition: resource_group_sql_cmd.h:46
Sql_cmd_drop_resource_group represents DROP RESOURCE GROUP statement.
Definition: resource_group_sql_cmd.h:111
Sql_cmd_set_resource_group represents SET RESOURCE GROUP statement.
Definition: resource_group_sql_cmd.h:133
sp_head represents one instance of a stored program.
Definition: sp_head.h:389
Definition: sp_head.h:124
Definition: sql_exchange.h:196
URI_information uri_info
Definition: sql_exchange.h:200
Field_separators field
Definition: sql_exchange.h:198
File_information file_info
Definition: sql_exchange.h:201
LEX_CSTRING outfile_json
Definition: sql_exchange.h:207
Line_separators line
Definition: sql_exchange.h:199
static MEM_ROOT mem_root
Definition: client_plugin.cc:114
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:31
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:217
bool make_subquery_node(THD *thd, PT_subquery **node)
Definition: sql_parse.cc:5819
bool lookup(Table_ref *tl, PT_common_table_expr **found)
Looks up a table reference into the list of CTEs.
Definition: sql_parse.cc:5920
bool match_table_ref(Table_ref *tl, bool in_self, bool *found)
Definition: sql_parse.cc:6001
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::avg_row_length), HA_CREATE_USED_AVG_ROW_LENGTH > PT_create_avg_row_length_option
Node for the AVG_ROW_LENGTH_ROWS [=] <integer> table option.
Definition: parse_tree_nodes.h:2698
PT_ternary_create_table_option< HA_CREATE_USED_PACK_KEYS, 0, HA_OPTION_PACK_KEYS, HA_OPTION_NO_PACK_KEYS > PT_create_pack_keys_option
Node for the PACK_KEYS [=] 1|0|DEFAULT table option.
Definition: parse_tree_nodes.h:2836
PT_ternary_create_table_option< HA_CREATE_USED_ALLOW_MISSING_FILES, 0, HA_OPTION_ALLOW_MISSING_FILES, HA_OPTION_NO_ALLOW_MISSING_FILES > PT_create_allow_missing_files_option
Node for the ALLOW_MISSING_FILES [=] 1|0|DEFAULT table option.
Definition: parse_tree_nodes.h:3144
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::auto_increment_value), HA_CREATE_USED_AUTO > PT_create_auto_increment_option
Node for the AUTO_INCREMENT [=] <integer> table option.
Definition: parse_tree_nodes.h:2743
PT_ternary_create_table_option< HA_CREATE_USED_AUTO_REFRESH, 0, HA_OPTION_AUTO_REFRESH, HA_OPTION_NO_AUTO_REFRESH > PT_create_auto_refresh_option
Node for the AUTO_REFRESH_MODE [=] 1|0|DEFAULT table option.
Definition: parse_tree_nodes.h:3196
PT_ternary_create_table_option< HA_CREATE_USED_STRICT_LOAD, 0, HA_OPTION_STRICT_LOAD, HA_OPTION_NO_STRICT_LOAD > PT_create_strict_load_option
Node for the STRICT_LOAD [=] 1|0|DEFAULT table option.
Definition: parse_tree_nodes.h:3179
PT_bool_create_table_option< HA_CREATE_USED_CHECKSUM, HA_OPTION_CHECKSUM, HA_OPTION_NO_CHECKSUM > PT_create_checksum_option
Node for the CHECKSUM|TABLE_CHECKSUM [=] 0|<not 0> table option.
Definition: parse_tree_nodes.h:2892
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::compress), HA_CREATE_USED_COMPRESS > PT_create_compress_option
Node for the COMPRESSION [=] <string> table option.
Definition: parse_tree_nodes.h:2725
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::encrypt_type), HA_CREATE_USED_ENCRYPT > PT_create_encryption_option
Node for the ENGRYPTION [=] <string> table option.
Definition: parse_tree_nodes.h:2734
PT_ternary_create_table_option< HA_CREATE_USED_STATS_PERSISTENT, 0, HA_OPTION_STATS_PERSISTENT, HA_OPTION_NO_STATS_PERSISTENT > PT_create_stats_persistent_option
Node for the STATS_PERSISTENT [=] 1|0|DEFAULT table option.
Definition: parse_tree_nodes.h:2853
PT_bool_create_table_option< HA_CREATE_USED_DELAY_KEY_WRITE, HA_OPTION_DELAY_KEY_WRITE, HA_OPTION_NO_DELAY_KEY_WRITE > PT_create_delay_key_write_option
Node for the DELAY_KEY_WRITE [=] 0|<not 0> table option.
Definition: parse_tree_nodes.h:2907
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::comment), HA_CREATE_USED_COMMENT > PT_create_commen_option
Node for the COMMENT [=] <string> table option.
Definition: parse_tree_nodes.h:2716
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::max_rows), HA_CREATE_USED_MAX_ROWS > PT_create_max_rows_option
Node for the MAX_ROWS [=] <integer> table option.
Definition: parse_tree_nodes.h:2680
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::min_rows), HA_CREATE_USED_MIN_ROWS > PT_create_min_rows_option
Node for the MIN_ROWS [=] <integer> table option.
Definition: parse_tree_nodes.h:2689
PT_ternary_create_table_option< HA_CREATE_USED_VERIFY_KEY_CONSTRAINTS, 0, HA_OPTION_VERIFY_KEY_CONSTRAINTS, HA_OPTION_NO_VERIFY_KEY_CONSTRAINTS > PT_create_verify_key_constraints_option
Node for the VERIFY_KEY_CONSTRAINTS [=] 1|0|DEFAULT table option.
Definition: parse_tree_nodes.h:3162
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::password), HA_CREATE_USED_PASSWORD > PT_create_password_option
Node for the PASSWORD [=] <string> table option.
Definition: parse_tree_nodes.h:2707
static int flags[50]
Definition: hp_test1.cc:40
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:180
fk_match_opt
Definition: key_spec.h:58
enum_order
Definition: key_spec.h:65
@ ORDER_NOT_RELEVANT
Definition: key_spec.h:65
@ ORDER_ASC
Definition: key_spec.h:65
@ ORDER_DESC
Definition: key_spec.h:65
keytype
Definition: key_spec.h:40
fk_option
Definition: key_spec.h:49
constexpr const LEX_STRING NULL_STR
Definition: lex_string.h:47
#define comment
Definition: lexyy.cc:959
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
std::unique_ptr< T, Destroy_only< T > > unique_ptr_destroy_only
std::unique_ptr, but only destroying.
Definition: my_alloc.h:480
This file includes constants used by all storage engines.
#define HA_OPTION_NO_DELAY_KEY_WRITE
DELAY_KEY_WRITE=0 option was specified.
Definition: my_base.h:724
#define HA_OPTION_NO_PACK_KEYS
PACK_KEYS=0 option was specified.
Definition: my_base.h:667
#define HA_OPTION_CHECKSUM
CHECKSUM=1 option was specified.
Definition: my_base.h:652
#define HA_OPTION_AUTO_REFRESH
AUTO_REFRESH=1 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:793
#define HA_OPTION_STRICT_LOAD
STRICT_LOAD=1 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:775
#define HA_OPTION_NO_CHECKSUM
CHECKSUM=0 option was specified.
Definition: my_base.h:719
#define HA_OPTION_ALLOW_MISSING_FILES
ALLOW_MISSING_FILES=1 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:739
#define HA_OPTION_DELAY_KEY_WRITE
DELAY_KEY_WRITE=1 option was specified.
Definition: my_base.h:660
ha_key_alg
Definition: my_base.h:98
#define HA_OPTION_NO_VERIFY_KEY_CONSTRAINTS
VERIFY_KEY_CONSTRAINTS=0 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:765
#define HA_OPTION_NO_ALLOW_MISSING_FILES
ALLOW_MISSING_FILES=0 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:749
#define HA_OPTION_NO_STRICT_LOAD
STRICT_LOAD=0 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:784
#define HA_OPTION_NO_AUTO_REFRESH
AUTO_REFRESH=0 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:800
#define HA_OPTION_STATS_PERSISTENT
STATS_PERSISTENT=1 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:692
ha_storage_media
Definition: my_base.h:116
#define HA_OPTION_PACK_KEYS
PACK_KEYS=1 option was specified.
Definition: my_base.h:620
#define HA_OPTION_VERIFY_KEY_CONSTRAINTS
VERIFY_KEY_CONSTRAINTS=1 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:757
#define HA_OPTION_NO_STATS_PERSISTENT
STATS_PERSISTENT=0 has been specified in CREATE/ALTER TABLE.
Definition: my_base.h:699
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
#define MYF(v)
Definition: my_inttypes.h:97
int32_t int32
Definition: my_inttypes.h:66
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_SHOW_ENGINE_LOGS
Definition: my_sqlcommand.h:64
@ SQLCOM_SHOW_GRANTS
Definition: my_sqlcommand.h:70
@ SQLCOM_SHOW_CREATE_DB
Definition: my_sqlcommand.h:74
@ SQLCOM_SHOW_STATUS_FUNC
Definition: my_sqlcommand.h:145
@ SQLCOM_SHOW_CREATE_FUNC
Definition: my_sqlcommand.h:143
@ SQLCOM_SHOW_CREATE_TRIGGER
Definition: my_sqlcommand.h:174
@ SQLCOM_SHOW_CREATE_MASKING_POLICY
Definition: my_sqlcommand.h:214
@ SQLCOM_SHOW_ENGINE_MUTEX
Definition: my_sqlcommand.h:66
@ SQLCOM_SHOW_PARSE_TREE
Definition: my_sqlcommand.h:206
@ SQLCOM_SHOW_PRIVILEGES
Definition: my_sqlcommand.h:129
@ SQLCOM_SHOW_BINLOGS
Definition: my_sqlcommand.h:115
@ SQLCOM_SHOW_BINLOG_EVENTS
Definition: my_sqlcommand.h:123
@ SQLCOM_SHOW_REPLICAS
Definition: my_sqlcommand.h:120
@ SQLCOM_SHOW_WARNS
Definition: my_sqlcommand.h:125
@ SQLCOM_SHOW_STATUS_PROC
Definition: my_sqlcommand.h:144
@ SQLCOM_SHOW_PLUGINS
Definition: my_sqlcommand.h:165
@ SQLCOM_SHOW_PROFILE
Definition: my_sqlcommand.h:175
@ SQLCOM_SHOW_DATABASES
Definition: my_sqlcommand.h:58
@ SQLCOM_SHOW_CHARSETS
Definition: my_sqlcommand.h:72
@ SQLCOM_SHOW_OPEN_TABLES
Definition: my_sqlcommand.h:116
@ SQLCOM_SHOW_TABLE_STATUS
Definition: my_sqlcommand.h:75
@ SQLCOM_SELECT
Definition: my_sqlcommand.h:47
@ SQLCOM_SHOW_ERRORS
Definition: my_sqlcommand.h:127
@ SQLCOM_SHOW_REPLICA_STATUS
Definition: my_sqlcommand.h:69
@ SQLCOM_SHOW_FIELDS
Definition: my_sqlcommand.h:60
@ SQLCOM_SHOW_CREATE_USER
Definition: my_sqlcommand.h:183
@ SQLCOM_SHOW_STATUS
Definition: my_sqlcommand.h:63
@ SQLCOM_SHOW_BINLOG_STATUS
Definition: my_sqlcommand.h:68
@ SQLCOM_SHOW_ENGINE_STATUS
Definition: my_sqlcommand.h:65
@ SQLCOM_SHOW_EVENTS
Definition: my_sqlcommand.h:173
@ SQLCOM_SHOW_CREATE_PROC
Definition: my_sqlcommand.h:142
@ SQLCOM_SHOW_COLLATIONS
Definition: my_sqlcommand.h:73
@ SQLCOM_SHOW_PROC_CODE
Definition: my_sqlcommand.h:159
@ SQLCOM_SHOW_FUNC_CODE
Definition: my_sqlcommand.h:160
@ SQLCOM_SHOW_KEYS
Definition: my_sqlcommand.h:61
@ SQLCOM_SHOW_STATUS_LIBRARY
Definition: my_sqlcommand.h:211
@ SQLCOM_SHOW_TABLES
Definition: my_sqlcommand.h:59
@ SQLCOM_SHOW_VARIABLES
Definition: my_sqlcommand.h:62
@ SQLCOM_SHOW_CREATE_EVENT
Definition: my_sqlcommand.h:172
@ SQLCOM_SHOW_PROCESSLIST
Definition: my_sqlcommand.h:67
@ SQLCOM_SHOW_RELAYLOG_EVENTS
Definition: my_sqlcommand.h:179
@ SQLCOM_SHOW_STORAGE_ENGINES
Definition: my_sqlcommand.h:128
@ SQLCOM_SHOW_CREATE_LIBRARY
Definition: my_sqlcommand.h:209
@ SQLCOM_SHOW_TRIGGERS
Definition: my_sqlcommand.h:76
@ SQLCOM_SHOW_CREATE
Definition: my_sqlcommand.h:71
@ SQLCOM_SHOW_PROFILES
Definition: my_sqlcommand.h:176
Common header for many mysys elements.
static my_thread_id thread_id
Definition: my_thr_init.cc:60
uint32 my_thread_id
Definition: my_thread_local.h:34
Interface for low level time utilities.
interval_type
Available interval types used in any statement.
Definition: my_time.h:451
@ INTERVAL_LAST
Definition: my_time.h:472
static bool column_names
Definition: mysql.cc:174
char * user
Definition: mysqladmin.cc:67
static bool ignore_errors
Definition: mysqlcheck.cc:62
static uint verbose
Definition: mysqlcheck.cc:66
thread_local MEM_ROOT ** THR_MALLOC
Definition: mysqld.cc:1593
static char * path
Definition: mysqldump.cc:150
static char * where
Definition: mysqldump.cc:153
static longlong opt_ignore_lines
Definition: mysqlimport.cc:85
static Secondary_engine * secondary_engine
Definition: mysqltest.cc:260
static char * opt_db
Definition: mysqltest.cc:196
const char * collation
Definition: audit_api_message_emit.cc:184
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1077
std::string format(const routing_guidelines::Session_info &session_info, bool extended_session_info)
Definition: dest_metadata_cache.cc:170
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
const std::string charset("charset")
std::string dir
Double write files location.
Definition: buf0dblwr.cc:77
Definition: my_file.cc:178
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:76
bool any_of(const Container &c, const Value &value)
Definition: any_of.h:35
void right(std::string *to_trim)
Definition: trim.h:41
void left(std::string *to_trim)
Definition: trim.h:35
MediaType
Definition: media_type.h:33
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
HARNESS_EXPORT void lower(std::string &s)
lower-case a string.
Definition: string_utils.cc:95
Definition: options.cc:57
Type
Definition: resource_group_basic_types.h:33
const char * table_name
Definition: rules_table_service.cc:56
Cursor end()
A past-the-end Cursor.
Definition: rules_table_service.cc:192
olap_type
Definition: olap.h:31
@ ROLLUP_TYPE
Definition: olap.h:33
EXPLAIN <command>.
MY_SQL_PARSER_LTYPE POS
Definition: parse_location.h:57
Surrounding_context
Definition: parse_tree_node_base.h:101
bool contextualize_nodes(Mem_root_array_YY< Node_type * > nodes, Parse_context_type *pc)
Calls contextualize() on every node in the array.
Definition: parse_tree_nodes.h:150
PT_base_index_option * make_index_secondary_engine_attribute(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5754
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::row_type), HA_CREATE_USED_ROW_FORMAT > PT_create_row_format_option
Definition: parse_tree_nodes.h:2747
#define TYPE_AND_REF(x)
Definition: parse_tree_nodes.h:2671
Parse_tree_node_tmpl< Table_ddl_parse_context > Table_ddl_node
Base class for all table DDL (ALTER TABLE and CREATE TABLE) nodes.
Definition: parse_tree_nodes.h:214
decltype(HA_CREATE_INFO::table_options) table_options_t
Definition: parse_tree_nodes.h:2784
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::data_file_name), HA_CREATE_USED_DATADIR > PT_create_data_directory_option
Definition: parse_tree_nodes.h:2756
PT_index_option< ulong, &KEY_CREATE_INFO::block_size > PT_block_size
Definition: parse_tree_nodes.h:2475
PT_alter_tablespace_option_base * make_tablespace_engine_attribute(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5568
PT_column_attr_base * make_column_external_format(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5704
PT_index_option< LEX_CSTRING, &KEY_CREATE_INFO::comment > PT_index_comment
Definition: parse_tree_nodes.h:2477
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::connect_string), HA_CREATE_USED_CONNECTION > PT_create_connection_option
Definition: parse_tree_nodes.h:2768
Mem_root_array_YY< PT_base_index_option * > Index_options
Definition: parse_tree_nodes.h:2474
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::tablespace), HA_CREATE_USED_TABLESPACE > PT_create_tablespace_option
Definition: parse_tree_nodes.h:2764
PT_base_index_option * make_index_engine_attribute(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5734
To * setop_cast(PT_query_expression_body *from, bool is_distinct)
Helper function to imitate dynamic_cast for PT_set_operation hierarchy.
Definition: parse_tree_nodes.h:6048
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::index_file_name), HA_CREATE_USED_INDEXDIR > PT_create_index_directory_option
Definition: parse_tree_nodes.h:2760
PT_index_option< LEX_CSTRING, &KEY_CREATE_INFO::parser_name > PT_fulltext_index_parser_name
Definition: parse_tree_nodes.h:2479
PT_column_attr_base * make_column_engine_attribute(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5645
PT_create_table_option * make_table_engine_attribute(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5589
Parse_tree_node_tmpl< Alter_tablespace_parse_context > PT_alter_tablespace_option_base
Definition: parse_tree_nodes.h:5525
PT_traceable_index_option< ha_key_alg, &KEY_CREATE_INFO::algorithm, &KEY_CREATE_INFO::is_algorithm_explicit > PT_index_type
The data structure (B-tree, Hash, etc) used for an index is called 'index_type' in the manual.
Definition: parse_tree_nodes.h:2492
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::m_implicit_tablespace_autoextend_size), HA_CREATE_USED_AUTOEXTEND_SIZE > PT_create_ts_autoextend_size_option
Definition: parse_tree_nodes.h:2782
PT_set_operation * flatten_equal_set_ops(MEM_ROOT *mem_root, const POS &pos, PT_query_expression_body *left, bool is_distinct, PT_query_expression_body *right, bool is_right_in_parentheses)
Flatten set operators at parse time.
Definition: parse_tree_nodes.h:6078
PT_column_attr_base * make_column_secondary_engine_attribute(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5675
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::key_block_size), HA_CREATE_USED_KEY_BLOCK_SIZE > PT_create_key_block_size_option
Definition: parse_tree_nodes.h:2772
PT_create_table_option * make_table_secondary_engine_attribute(MEM_ROOT *, LEX_CSTRING)
Factory function which instantiates PT_attribute with suitable parameters, allocates on the provided ...
Definition: parse_tree_nodes.cc:5622
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::m_transactional_ddl), HA_CREATE_USED_START_TRANSACTION > PT_create_start_transaction_option
Definition: parse_tree_nodes.h:2777
PT_index_option< bool, &KEY_CREATE_INFO::is_visible > PT_index_visibility
Definition: parse_tree_nodes.h:2480
PT_traceable_create_table_option< TYPE_AND_REF(HA_CREATE_INFO::merge_insert_method), HA_CREATE_USED_INSERT_METHOD > PT_create_insert_method_option
Definition: parse_tree_nodes.h:2752
On_duplicate
Definition: parser_yystype.h:250
Locked_row_action
We will static_cast this one to thr_lock_type.
Definition: parser_yystype.h:221
Lock_strength
Definition: parser_yystype.h:218
PT_joined_table_type
Internally there is no CROSS JOIN join type, as cross joins are just a special case of inner joins wi...
Definition: parser_yystype.h:233
@ JTT_LEFT
Definition: parser_yystype.h:237
@ JTT_STRAIGHT_INNER
Definition: parser_yystype.h:240
@ JTT_NATURAL_LEFT
Definition: parser_yystype.h:242
@ JTT_NATURAL
Definition: parser_yystype.h:236
@ JTT_NATURAL_INNER
Definition: parser_yystype.h:241
@ JTT_NATURAL_RIGHT
Definition: parser_yystype.h:243
@ JTT_STRAIGHT
Definition: parser_yystype.h:235
@ JTT_RIGHT
Definition: parser_yystype.h:238
@ JTT_INNER
Definition: parser_yystype.h:234
Show_cmd_type
Definition: parser_yystype.h:268
Ternary_option
Definition: parser_yystype.h:248
const char * filename
Definition: pfs_example_component_population.cc:67
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:86
Query_term_type
This class hierarchy is used to represent SQL structures between <query expression> and <query specif...
Definition: query_term.h:96
required string type
Definition: replication_group_member_actions.proto:34
repeated Action action
Definition: replication_group_member_actions.proto:43
required bool enabled
Definition: replication_group_member_actions.proto:33
"public" interface to sys_var - server configuration variables.
enum_var_type
Definition: set_var.h:92
@ OPT_GLOBAL
Definition: set_var.h:95
@ OPT_SESSION
Definition: set_var.h:94
#define HA_CREATE_USED_COMPRESS
COMPRESSION="zlib|lz4|none" used during table create.
Definition: handler.h:776
#define HA_CREATE_USED_CONNECTION
Definition: handler.h:743
#define HA_CREATE_USED_INSERT_METHOD
Definition: handler.h:728
constexpr const uint64_t HA_CREATE_USED_VERIFY_KEY_CONSTRAINTS
Definition: handler.h:824
#define HA_CREATE_USED_PACK_KEYS
Definition: handler.h:732
#define HA_CREATE_USED_DATADIR
Definition: handler.h:735
#define HA_CREATE_USED_KEY_BLOCK_SIZE
Definition: handler.h:744
#define HA_CREATE_USED_INDEXDIR
Definition: handler.h:736
constexpr const uint64_t HA_CREATE_USED_AUTOEXTEND_SIZE
These flags convey that the options AUTOEXTEND_SIZE has been specified in the CREATE TABLE statement.
Definition: handler.h:818
#define HA_CREATE_USED_TABLESPACE
This is set whenever a 'TABLESPACE=...' phrase is used on CREATE TABLE.
Definition: handler.h:773
enum_tx_isolation
Definition: handler.h:3339
#define HA_CREATE_USED_ROW_FORMAT
Definition: handler.h:740
#define HA_CREATE_USED_ENCRYPT
ENCRYPTION="Y" used during table create.
Definition: handler.h:779
#define HA_CREATE_USED_DELAY_KEY_WRITE
Definition: handler.h:739
#define HA_CREATE_USED_MIN_ROWS
Definition: handler.h:729
#define HA_CREATE_USED_PASSWORD
Definition: handler.h:742
constexpr const uint64_t HA_CREATE_USED_START_TRANSACTION
This option is used to convey that the create table should not commit the operation and keep the tran...
Definition: handler.h:802
#define HA_CREATE_USED_COMMENT
Definition: handler.h:741
#define HA_CREATE_USED_MAX_ROWS
Definition: handler.h:730
constexpr const uint64_t HA_CREATE_USED_ALLOW_MISSING_FILES
Definition: handler.h:823
#define HA_CREATE_USED_CHECKSUM
Definition: handler.h:738
#define HA_CREATE_USED_STATS_PERSISTENT
This is set whenever STATS_PERSISTENT=0|1|default has been specified in CREATE/ALTER TABLE.
Definition: handler.h:754
constexpr const uint64_t HA_CREATE_USED_STRICT_LOAD
Definition: handler.h:825
#define HA_CREATE_USED_AVG_ROW_LENGTH
Definition: handler.h:731
#define HA_CREATE_USED_AUTO
Definition: handler.h:725
constexpr const uint64_t HA_CREATE_USED_AUTO_REFRESH
Definition: handler.h:826
alter_instance_action_enum
Definition: sql_admin.h:392
role_enum
Definition: sql_admin.h:255
This file declares the interface of classes Sql_cmd_create_srs and Sql_cmd_drop_srs,...
constexpr const long STACK_MIN_SIZE
Stack reservation.
Definition: sql_const.h:144
enum_filetype
Definition: sql_exchange.h:34
enum_destination
Definition: sql_exchange.h:42
@ DUMPFILE_DEST
Definition: sql_exchange.h:45
enum_source_type
Definition: sql_exchange.h:32
case opt name
Definition: sslopt-case.h:29
#define STRING_WITH_LEN(X)
Definition: string_with_len.h:29
Definition: parse_tree_nodes.h:5516
Alter_tablespace_parse_context(THD *thd, bool show_parse_tree=false)
Definition: parse_tree_nodes.cc:5440
THD *const thd
Definition: parse_tree_nodes.h:5517
MEM_ROOT *const mem_root
Definition: parse_tree_nodes.h:5518
Definition: m_ctype.h:421
Definition: parse_tree_nodes.h:3405
const LEX_STRING ident
Definition: parse_tree_nodes.h:3406
Dynamic_privilege(const LEX_STRING &ident, const Mem_root_array< LEX_CSTRING > *columns_arg)
Definition: parse_tree_nodes.h:3408
uint sql_flags
Definition: handler.h:3967
uint flags
Definition: handler.h:3966
Struct to hold information about the table that should be created.
Definition: handler.h:3355
ulonglong auto_increment_value
Definition: handler.h:3398
bool m_transactional_ddl
Definition: handler.h:3436
enum row_type row_type
Row type of the table definition.
Definition: handler.h:3419
LEX_STRING compress
Algorithm (and possible options) to be used for InnoDB's transparent page compression.
Definition: handler.h:3371
LEX_STRING encrypt_type
This attribute is used for InnoDB's transparent page encryption.
Definition: handler.h:3379
ulong avg_row_length
Definition: handler.h:3400
const char * data_file_name
Definition: handler.h:3393
ulonglong m_implicit_tablespace_autoextend_size
Definition: handler.h:3441
uint stats_sample_pages
Definition: handler.h:3405
uint merge_insert_method
Definition: handler.h:3422
LEX_STRING connect_string
Definition: handler.h:3359
const char * tablespace
Definition: handler.h:3361
ulonglong max_rows
Definition: handler.h:3396
const char * password
Definition: handler.h:3360
ha_storage_media storage_media
Definition: handler.h:3423
LEX_STRING comment
Definition: handler.h:3362
const char * index_file_name
Definition: handler.h:3394
std::uint32_t key_block_size
Definition: handler.h:3404
uint64_t table_options
Definition: handler.h:3399
ulonglong min_rows
Definition: handler.h:3397
uint64_t used_fields
Definition: handler.h:3401
Definition: table.h:2825
Opt_hints_global * opt_hints_global
Definition: sql_lex.h:4125
Definition: parser_yystype.h:196
bool is_offset_first
Definition: parser_yystype.h:202
Definition: thr_lock.h:99
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: mysql_lex_string.h:40
const char * str
Definition: mysql_lex_string.h:41
Definition: mysql_lex_string.h:35
char * str
Definition: mysql_lex_string.h:36
size_t length
Definition: mysql_lex_string.h:37
Bison "location" class.
Definition: parse_location.h:43
Definition: table.h:298
const char * used_alias
Tells whether this ORDER element was referenced with an alias or with an expression in the query,...
Definition: table.h:339
Item * item_initial
The initial ordering expression.
Definition: table.h:318
ORDER * next
Definition: table.h:305
enum_order direction
Definition: table.h:330
table_map used
Definition: table.h:351
Definition: parse_tree_node_base.h:405
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:422
THD *const thd
Current thread handler.
Definition: parse_tree_node_base.h:423
MEM_ROOT * mem_root
Current MEM_ROOT.
Definition: parse_tree_node_base.h:424
This class is used for representing both static and dynamic privileges on global as well as table and...
Definition: parse_tree_nodes.h:3387
const Mem_root_array< LEX_CSTRING > * columns
Definition: parse_tree_nodes.h:3391
Privilege(privilege_type type, const Mem_root_array< LEX_CSTRING > *columns)
Definition: parse_tree_nodes.h:3393
privilege_type
Definition: parse_tree_nodes.h:3388
@ STATIC
Definition: parse_tree_nodes.h:3388
@ DYNAMIC
Definition: parse_tree_nodes.h:3388
privilege_type type
Definition: parse_tree_nodes.h:3390
Info on properties that can be set with '–disable_X' and '–disable_X' commands.
Definition: mysqltest.cc:281
Definition: parse_tree_node_base.h:115
Definition: parser_yystype.h:205
Definition: sql_cmd_srs.h:41
Definition: parse_tree_nodes.h:3398
const uint grant
Definition: parse_tree_nodes.h:3399
Static_privilege(uint grant, const Mem_root_array< LEX_CSTRING > *columns_arg)
Definition: parse_tree_nodes.h:3401
Parse context for the table DDL (ALTER TABLE and CREATE TABLE) nodes.
Definition: parse_tree_nodes.h:203
HA_CREATE_INFO *const create_info
Definition: parse_tree_nodes.h:206
Alter_info *const alter_info
Definition: parse_tree_nodes.h:207
Table_ddl_parse_context(THD *thd_arg, Query_block *select_arg, Alter_info *alter_info)
Definition: parse_tree_nodes.cc:163
KEY_CREATE_INFO *const key_create_info
Definition: parse_tree_nodes.h:208
Structure used by parser to store options for tablespace statements and pass them on to Execution cla...
Definition: sql_tablespace.h:43
ulonglong redo_buffer_size
Definition: sql_tablespace.h:46
ulonglong undo_buffer_size
Definition: sql_tablespace.h:45
ulonglong file_block_size
Definition: sql_tablespace.h:50
std::optional< ulonglong > autoextend_size
Definition: sql_tablespace.h:48
uint nodegroup_id
Definition: sql_tablespace.h:51
LEX_STRING ts_comment
Definition: sql_tablespace.h:53
LEX_STRING encryption
Definition: sql_tablespace.h:55
ulonglong max_size
Definition: sql_tablespace.h:49
LEX_CSTRING engine_name
Definition: sql_tablespace.h:54
ulonglong initial_size
Definition: sql_tablespace.h:47
bool wait_until_completed
Definition: sql_tablespace.h:52
ulonglong extent_size
Definition: sql_tablespace.h:44
Definition: parser_yystype.h:330
Definition: task.h:427
Definition: sql_lex.h:2620
Explain_format_type
Values for explain_format sysvar.
Definition: system_variables.h:115
tablesample_type
Definition: tablesample.h:27
thr_lock_type
Definition: thr_lock.h:51
@ TL_WRITE
Definition: thr_lock.h:92
@ TL_READ_WITH_SHARED_LOCKS
Definition: thr_lock.h:63
@ TL_IGNORE
Definition: thr_lock.h:52
thr_locked_row_action
Definition: thr_lock.h:97
enum_window_frame_exclusion
Cf.
Definition: window_lex.h:48
enum_window_frame_unit
Cf.
Definition: window_lex.h:31
enum_window_border_type
Cf.
Definition: window_lex.h:37
@ WBT_VALUE_FOLLOWING
Definition: window_lex.h:40
@ WBT_VALUE_PRECEDING
Definition: window_lex.h:39