MySQL 8.4.4
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
parse_tree_nodes.h
Go to the documentation of this file.
1/* Copyright (c) 2013, 2024, 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
39#include "my_inttypes.h" // TODO: replace with cstdint
40#include "my_list.h"
41#include "my_sqlcommand.h"
42#include "my_sys.h"
43#include "my_thread_local.h"
44#include "my_time.h"
45#include "mysqld_error.h"
46#include "sql/check_stack.h"
47#include "sql/enum_query_type.h"
48#include "sql/handler.h"
49#include "sql/key_spec.h"
50#include "sql/mem_root_array.h"
51#include "sql/opt_explain.h" // Sql_cmd_explain_other_thread
52#include "sql/parse_location.h"
53#include "sql/parse_tree_helpers.h" // PT_item_list
55#include "sql/parser_yystype.h"
56#include "sql/partition_info.h"
59#include "sql/set_var.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:
721 PT_group(const POS &pos, PT_order_list *group_list_arg, olap_type olap_arg)
722 : super(pos), group_list(group_list_arg), olap(olap_arg) {}
723
724 bool do_contextualize(Parse_context *pc) override;
725};
726
727class PT_order : public Parse_tree_node {
729
730 public:
732 explicit PT_order(const POS &pos, PT_order_list *order_list_arg)
733 : super(pos), order_list(order_list_arg) {}
734
735 bool do_contextualize(Parse_context *pc) override;
736};
737
739 public:
740 PT_locking_clause(const POS &pos, Lock_strength strength,
742 : Parse_tree_node(pos),
743 m_lock_strength(strength),
745
746 bool do_contextualize(Parse_context *pc) final;
747
748 virtual bool set_lock_for_tables(Parse_context *pc) = 0;
749
751
752 protected:
754 thr_lock_type lock_type = TL_IGNORE;
755 switch (m_lock_strength) {
757 lock_type = TL_WRITE;
758 break;
760 lock_type = TL_READ_WITH_SHARED_LOCKS;
761 break;
762 }
763
764 return {lock_type, static_cast<thr_locked_row_action>(action())};
765 }
766
767 private:
770};
771
773 public:
775 const POS &pos, Lock_strength strength,
777 : PT_locking_clause(pos, strength, action) {}
778
779 bool set_lock_for_tables(Parse_context *pc) override;
780};
781
783 public:
785
789 : PT_locking_clause(pos, strength, action), m_tables(tables) {}
790
791 bool set_lock_for_tables(Parse_context *pc) override;
792
793 private:
794 bool raise_error(THD *thd, const Table_ident *name, int error);
795
796 bool raise_error(int error);
797
799};
800
802 public:
804 : Parse_tree_node(pos) {
806 }
807
808 bool push_back(PT_locking_clause *locking_clause) {
809 return m_locking_clauses.push_back(locking_clause);
810 }
811
812 bool do_contextualize(Parse_context *pc) override {
813 for (auto locking_clause : m_locking_clauses)
814 if (locking_clause->contextualize(pc)) return true;
815 return false;
816 }
817
818 private:
820};
821
823 public:
824 explicit PT_query_expression_body(const POS &pos) : Parse_tree_node(pos) {}
826 virtual Setop_type type() const { return NONE; }
827 virtual bool is_set_operation() const = 0;
828 /**
829 True if this query expression can absorb an extraneous order by/limit
830 clause. The `ORDER BY`/`LIMIT` syntax is mostly consistestent, i.e. a
831 trailing clause may not refer to the tables in the `<query primary>`, with
832 one glaring exception:
833
834 (...( SELECT ... )...) ORDER BY ...
835
836 If the nested query expression doesn't contain `ORDER BY`, the statement
837 is interpreted as if the `ORDER BY` was absorbed by the innermost query
838 expression, i.e.:
839
840 (...( SELECT ... ORDER BY ... )...)
841
842 There is no rewriting of the parse tree nor AST happening here, the
843 transformation is done by the contextualizer (see
844 PT_query_expression::contextualize_order_and_limit), which interprets the
845 parse tree, and builds the AST according to this interpretation. This
846 interpretation is governed by the following rule: An `ORDER BY` can be
847 absorbed if none the nested query expressions contains an `ORDER BY` *or*
848 `LIMIT`. The rule is complex, so here are some examples for illustration:
849
850 In these cases the `ORDER BY` *is* absorbed:
851
852 ( SELECT * FROM t1 ) ORDER BY t1.a;
853 (( SELECT * FROM t1 )) ORDER BY t1.a;
854
855 In these cases the ORDER BY is *not* absorbed:
856
857 ( SELECT * FROM t1 ORDER BY 1 ) ORDER BY t1.a;
858 (( SELECT * FROM t1 ) ORDER BY 1 ) ORDER BY t1.a;
859 ( SELECT * FROM t1 LIMIT 1 ) ORDER BY t1.a;
860 (( SELECT * FROM t1 ) LIMIT 1 ) ORDER BY t1.a;
861
862 The same happens with `LIMIT`, obviously, but the optimizer is freeer to
863 choose when to apply the limit, and there are name no resolution issues
864 involved.
865
866 @param order True if the outer query block has the ORDER BY clause.
867 @param limit True if the outer query block has the LIMIT clause.
868 */
869 virtual bool can_absorb_order_and_limit(bool order, bool limit) const = 0;
870 virtual bool has_into_clause() const = 0;
871 virtual bool has_trailing_into_clause() const = 0;
872
873 virtual bool is_table_value_constructor() const = 0;
875};
876
879
880 public:
881 PT_set_scoped_system_variable(const POS &pos, const POS &var_pos,
882 const LEX_CSTRING &opt_prefix,
883 const LEX_CSTRING &name, Item *opt_expr)
884 : super(pos),
885 m_varpos(var_pos),
886 m_opt_prefix{opt_prefix},
887 m_name{name},
888 m_opt_expr{opt_expr} {}
889
890 bool do_contextualize(Parse_context *pc) override;
891
892 private:
897};
898
900 protected:
902 : Parse_tree_node(pos) {}
903};
904
907
908 public:
909 PT_set_variable(const POS &pos, const POS &varpos,
910 const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name,
911 const POS &expr_pos, Item *opt_expr)
912 : super{pos},
913 m_varpos{varpos},
914 m_opt_prefix{opt_prefix},
915 m_name{name},
916 m_expr_pos{expr_pos},
917 m_opt_expr{opt_expr} {}
918
919 bool do_contextualize(Parse_context *pc) override;
920
921 private:
927};
928
932
935
936 public:
938 const LEX_STRING &name_arg,
939 Item *expr_arg)
940 : super(pos), name(name_arg), expr(expr_arg) {}
941
942 bool do_contextualize(Parse_context *pc) override;
943};
944
947
948 public:
950 const POS &name_pos, const LEX_CSTRING &opt_prefix,
951 const LEX_CSTRING &name, Item *opt_expr)
952 : super(pos),
953 m_scope{scope},
954 m_name_pos{name_pos},
955 m_opt_prefix{opt_prefix},
956 m_name{name},
957 m_opt_expr{opt_expr} {}
958
959 bool do_contextualize(Parse_context *pc) override;
960
961 private:
967};
968
972
974
975 public:
977 const CHARSET_INFO *opt_charset_arg)
978 : super(pos), opt_charset(opt_charset_arg) {}
979
980 bool do_contextualize(Parse_context *pc) override;
981};
982
986
988
989 public:
991 const POS &error_pos)
992 : super(pos), m_error_pos(error_pos) {}
993
994 bool do_contextualize(Parse_context *pc) override;
995};
996
999
1002
1003 public:
1004 PT_set_names(const POS &pos, const CHARSET_INFO *opt_charset_arg,
1005 const CHARSET_INFO *opt_collation_arg)
1006 : super(pos),
1007 opt_charset(opt_charset_arg),
1008 opt_collation(opt_collation_arg) {}
1009
1010 bool do_contextualize(Parse_context *pc) override;
1011};
1012
1014 protected:
1015 explicit PT_start_option_value_list(const POS &pos) : Parse_tree_node(pos) {}
1016};
1017
1021
1022 const char *password;
1023 const char *current_password;
1027
1028 public:
1030 const char *password_arg,
1031 const char *current_password_arg,
1032 bool retain_current,
1033 bool random_password,
1034 const POS &expr_pos_arg)
1035 : super(pos),
1036 password(password_arg),
1037 current_password(current_password_arg),
1038 retain_current_password(retain_current),
1039 random_password_generator(random_password),
1040 expr_pos(expr_pos_arg) {}
1041
1042 bool do_contextualize(Parse_context *pc) override;
1043};
1044
1048
1050 const char *password;
1051 const char *current_password;
1055
1056 public:
1058 const POS &pos, LEX_USER *user_arg, const char *password_arg,
1059 const char *current_password_arg, bool retain_current, bool random_pass,
1060 const POS &expr_pos_arg)
1061 : super(pos),
1062 user(user_arg),
1063 password(password_arg),
1064 current_password(current_password_arg),
1065 retain_current_password(retain_current),
1066 random_password_generator(random_pass),
1067 expr_pos(expr_pos_arg) {}
1068
1069 bool do_contextualize(Parse_context *pc) override;
1070};
1071
1074
1077
1078 public:
1081 : super(pos), type(type_arg), value(value_arg) {}
1082
1083 bool do_contextualize(Parse_context *pc) override;
1084};
1085
1088
1092
1093 public:
1094 PT_option_value_list_head(const POS &pos, const POS &delimiter_pos_arg,
1095 Parse_tree_node *value_arg,
1096 const POS &value_pos_arg)
1097 : super(pos),
1098 delimiter_pos(delimiter_pos_arg),
1099 value(value_arg),
1100 value_pos(value_pos_arg) {}
1101
1102 bool do_contextualize(Parse_context *pc) override;
1103};
1104
1107
1109
1110 public:
1112 const POS &delimiter_pos_arg, Parse_tree_node *tail,
1113 const POS &tail_pos)
1114 : super(pos, delimiter_pos_arg, tail, tail_pos), head(head_arg) {}
1115
1116 bool do_contextualize(Parse_context *pc) override {
1117 uchar dummy;
1118 if (check_stack_overrun(pc->thd, STACK_MIN_SIZE, &dummy)) return true;
1119 return head->contextualize(pc) || super::do_contextualize(pc);
1120 }
1121};
1122
1125
1129
1130 public:
1133 const POS &head_pos_arg,
1134 PT_option_value_list_head *tail_arg)
1135 : super(pos), head(head_arg), head_pos(head_pos_arg), tail(tail_arg) {}
1136
1137 bool do_contextualize(Parse_context *pc) override;
1138};
1139
1142
1143 const char *name;
1145
1146 public:
1147 PT_transaction_characteristic(const POS &pos, const char *name_arg,
1148 int32 value_arg)
1149 : super(pos), name(name_arg), value(value_arg) {}
1150
1151 bool do_contextualize(Parse_context *pc) override;
1152};
1153
1156
1157 public:
1158 explicit PT_transaction_access_mode(const POS &pos, bool is_read_only)
1159 : super(pos, "transaction_read_only", (int32)is_read_only) {}
1160};
1161
1164
1165 public:
1166 explicit PT_isolation_level(const POS &pos, enum_tx_isolation level)
1167 : super(pos, "transaction_isolation", (int32)level) {}
1168};
1169
1172
1175
1176 public:
1179 PT_transaction_characteristic *opt_tail_arg)
1180 : super(pos), head(head_arg), opt_tail(opt_tail_arg) {}
1181
1182 bool do_contextualize(Parse_context *pc) override {
1183 return (super::do_contextualize(pc) || head->contextualize(pc) ||
1184 (opt_tail != nullptr && opt_tail->contextualize(pc)));
1185 }
1186};
1187
1191
1194
1195 public:
1197 const POS &pos, PT_transaction_characteristics *characteristics_arg,
1198 const POS &end_pos_arg)
1199 : super(pos),
1200 characteristics(characteristics_arg),
1201 end_pos(end_pos_arg) {}
1202
1203 bool do_contextualize(Parse_context *pc) override;
1204};
1205
1207 : public Parse_tree_node {
1208 protected:
1210 : Parse_tree_node(pos) {}
1211};
1212
1216
1220
1221 public:
1223 const POS &pos, PT_set_scoped_system_variable *head_arg,
1224 const POS &head_pos_arg, PT_option_value_list_head *opt_tail_arg)
1225 : super(pos),
1226 head(head_arg),
1227 head_pos(head_pos_arg),
1228 opt_tail(opt_tail_arg) {}
1229
1230 bool do_contextualize(Parse_context *pc) override;
1231};
1232
1236
1239
1240 public:
1242 const POS &pos, PT_transaction_characteristics *characteristics_arg,
1243 const POS &characteristics_pos_arg)
1244 : super(pos),
1245 characteristics(characteristics_arg),
1246 characteristics_pos(characteristics_pos_arg) {}
1247
1248 bool do_contextualize(Parse_context *pc) override;
1249};
1250
1253
1256
1257 public:
1259 const POS &pos, enum_var_type type_arg,
1261 : super(pos), type(type_arg), list(list_arg) {}
1262
1263 bool do_contextualize(Parse_context *pc) override;
1264};
1265
1266class PT_set : public Parse_tree_node {
1268
1271
1272 public:
1273 PT_set(const POS &pos, const POS &set_pos_arg,
1275 : super(pos), set_pos(set_pos_arg), list(list_arg) {}
1276
1277 bool do_contextualize(Parse_context *pc) override;
1278};
1279
1282
1283 protected:
1284 explicit PT_into_destination(const POS &pos) : super(pos) {}
1285
1286 public:
1287 bool do_contextualize(Parse_context *pc) override;
1288};
1289
1292
1293 public:
1294 PT_into_destination_outfile(const POS &pos, const LEX_STRING &file_name_arg,
1295 const CHARSET_INFO *charset_arg,
1296 const Field_separators &field_term_arg,
1297 const Line_separators &line_term_arg)
1298 : PT_into_destination(pos), m_exchange(file_name_arg.str, false) {
1299 m_exchange.cs = charset_arg;
1300 m_exchange.field.merge_field_separators(field_term_arg);
1301 m_exchange.line.merge_line_separators(line_term_arg);
1302 }
1303
1304 bool do_contextualize(Parse_context *pc) override;
1305
1306 private:
1308};
1309
1312
1313 public:
1314 PT_into_destination_dumpfile(const POS &pos, const LEX_STRING &file_name_arg)
1315 : PT_into_destination(pos), m_exchange(file_name_arg.str, true) {}
1316
1317 bool do_contextualize(Parse_context *pc) override;
1318
1319 private:
1321};
1322
1324 public:
1326
1327 explicit PT_select_var(const POS &pos, const LEX_STRING &name_arg)
1328 : Parse_tree_node(pos), name(name_arg) {}
1329
1330 virtual bool is_local() const { return false; }
1331 virtual uint get_offset() const {
1332 assert(0);
1333 return 0;
1334 }
1335};
1336
1339
1340 uint offset = 0;
1341
1342#ifndef NDEBUG
1343 /*
1344 Routine to which this Item_splocal belongs. Used for checking if correct
1345 runtime context is used for variable handling.
1346 */
1347 sp_head *sp = nullptr;
1348#endif
1349
1350 public:
1351 PT_select_sp_var(const POS &pos, const LEX_STRING &name_arg)
1352 : super(pos, name_arg) {}
1353
1354 bool is_local() const override { return true; }
1355 uint get_offset() const override { return offset; }
1356
1357 bool do_contextualize(Parse_context *pc) override;
1358};
1359
1362
1363 public:
1364 explicit PT_select_var_list(const POS &pos) : PT_into_destination(pos) {}
1365
1367
1368 bool do_contextualize(Parse_context *pc) override;
1369
1370 bool push_back(PT_select_var *var) { return value.push_back(var); }
1371};
1372
1373/**
1374 Parse tree node for a single of a window extent's borders,
1375 cf. <window frame extent> in SQL 2003.
1376*/
1378 friend class Window;
1379 Item *m_value{nullptr}; ///< only relevant iff m_border_type == WBT_VALUE_*
1380 public:
1382 const bool m_date_time;
1383 interval_type m_int_type = INTERVAL_LAST; // clang-tidy needs initialization.
1384
1385 ///< For unbounded border
1389 }
1390
1391 ///< For bounded non-temporal border, e.g. 2 PRECEDING: 'value' is 2.
1393 : Parse_tree_node(pos),
1394 m_value(value),
1396 m_date_time(false) {}
1397
1398 ///< For bounded INTERVAL 2 DAYS, 'value' is 2, int_type is DAYS.
1400 interval_type int_type)
1401 : Parse_tree_node(pos),
1402 m_value(value),
1404 m_date_time(true),
1405 m_int_type(int_type) {}
1406
1407 ///< @returns the '2' in '2 PRECEDING' or 'INTERVAL 2 DAYS PRECEDING'
1408 Item *border() const { return m_value; }
1409 /// Need such low-level access so that fix_fields updates the right pointer
1410 Item **border_ptr() { return &m_value; }
1411
1412 /**
1413 @returns Addition operator for computation of frames, nullptr if error.
1414 @param order_expr Expression to add to/subtract from
1415 @param prec true if PRECEDING
1416 @param asc true if ASC
1417 @param window only used for error generation
1418 */
1419 Item *build_addop(Item_cache *order_expr, bool prec, bool asc,
1420 const Window *window);
1421
1422 bool do_contextualize(Parse_context *pc) override;
1423};
1424
1425/**
1426 Parse tree node for one or both of a window extent's borders, cf.
1427 <window frame extent> in SQL 2003.
1428*/
1431 friend class PT_frame;
1432
1433 public:
1434 /**
1435 Constructor.
1436
1437 Frames of the form "frame_start no_frame_end" are translated during
1438 parsing to "BETWEEN frame_start AND CURRENT ROW". So both 'start' and
1439 'end' are non-nullptr.
1440 */
1442 : Parse_tree_node(pos) {
1443 m_borders[0] = start;
1444 m_borders[1] = end;
1445 }
1446};
1447
1448/**
1449 Parse tree node for a window frame's exclusions, cf. the
1450 <window frame exclusion> clause in SQL 2003.
1451*/
1454
1455 public:
1457 : Parse_tree_node(pos), m_exclusion(e) {}
1458 // enum_window_frame_exclusion exclusion() { return m_exclusion; }
1459};
1460
1461/**
1462 Parse tree node for a window's frame, cf. the <window frame clause>
1463 in SQL 2003.
1464*/
1466 public:
1468
1471
1473
1474 /// If true, this is an artificial frame, not specified by the user
1476
1477 PT_frame(const POS &pos, enum_window_frame_unit unit, PT_borders *from_to,
1478 PT_exclusion *exclusion)
1479 : Parse_tree_node(pos),
1480 m_query_expression(unit),
1481 m_from(from_to->m_borders[0]),
1482 m_to(from_to->m_borders[1]),
1483 m_exclusion(exclusion) {}
1484
1485 bool do_contextualize(Parse_context *pc) override;
1486};
1487
1489 protected:
1490 explicit PT_query_primary(const POS &pos) : PT_query_expression_body(pos) {}
1491};
1492
1495
1507
1508 public:
1510 const POS &pos, PT_hint_list *opt_hints_arg,
1511 const Query_options &options_arg, PT_item_list *item_list_arg,
1512 PT_into_destination *opt_into1_arg,
1513 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg,
1514 Item *opt_where_clause_arg, PT_group *opt_group_clause_arg,
1515 Item *opt_having_clause_arg, PT_window_list *opt_window_clause_arg,
1516 Item *opt_qualify_clause_arg, bool implicit_from_clause)
1517 : super(pos),
1518 opt_hints(opt_hints_arg),
1519 options(options_arg),
1520 item_list(item_list_arg),
1521 opt_into1(opt_into1_arg),
1522 m_is_from_clause_implicit{implicit_from_clause},
1523 from_clause(from_clause_arg),
1524 opt_where_clause(opt_where_clause_arg),
1525 opt_group_clause(opt_group_clause_arg),
1526 opt_having_clause(opt_having_clause_arg),
1527 opt_window_clause(opt_window_clause_arg),
1528 opt_qualify_clause(opt_qualify_clause_arg) {
1529 assert(implicit_from_clause ? from_clause.empty() : true);
1530 }
1531
1533 const POS &pos, const Query_options &options_arg,
1534 PT_item_list *item_list_arg,
1535 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg,
1536 Item *opt_where_clause_arg)
1537 : super(pos),
1539 options(options_arg),
1540 item_list(item_list_arg),
1543 from_clause(from_clause_arg),
1544 opt_where_clause(opt_where_clause_arg),
1549
1550 PT_query_specification(const POS &pos, const Query_options &options_arg,
1551 PT_item_list *item_list_arg)
1552 : super(pos),
1554 options(options_arg),
1555 item_list(item_list_arg),
1558 from_clause{},
1564
1565 bool do_contextualize(Parse_context *pc) override;
1566
1567 bool has_into_clause() const override { return opt_into1 != nullptr; }
1568 bool has_trailing_into_clause() const override {
1570 opt_where_clause == nullptr && opt_group_clause == nullptr &&
1571 opt_having_clause == nullptr && opt_window_clause == nullptr &&
1572 opt_qualify_clause == nullptr);
1573 }
1574
1575 bool is_set_operation() const override { return false; }
1576
1577 bool can_absorb_order_and_limit(bool, bool) const override { return true; }
1578
1579 bool is_table_value_constructor() const override { return false; }
1580 PT_insert_values_list *get_row_value_list() const override { return nullptr; }
1581
1582 protected:
1583 void add_json_info(Json_object *obj) override;
1584
1585 private:
1587};
1588
1591
1593
1594 public:
1595 explicit PT_table_value_constructor(const POS &pos,
1596 PT_insert_values_list *row_value_list_arg)
1597 : super(pos), row_value_list(row_value_list_arg) {}
1598
1599 bool do_contextualize(Parse_context *pc) override;
1600
1601 bool has_into_clause() const override { return false; }
1602 bool has_trailing_into_clause() const override { return false; }
1603
1604 bool is_set_operation() const override { return false; }
1605
1606 bool can_absorb_order_and_limit(bool, bool) const override { return true; }
1607
1608 bool is_table_value_constructor() const override { return true; }
1609
1611 return row_value_list;
1612 }
1613};
1614
1617
1618 public:
1620 const POS &pos, const Query_options &options_arg,
1621 PT_item_list *item_list_arg,
1622 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg)
1623 : super(pos, options_arg, item_list_arg, from_clause_arg, nullptr) {}
1624};
1625
1627 public:
1628 PT_query_expression(const POS &pos, PT_with_clause *with_clause,
1629 PT_query_expression_body *body, PT_order *order,
1630 PT_limit_clause *limit)
1632 m_body(body),
1633 m_order(order),
1634 m_limit(limit),
1635 m_with_clause(with_clause) {}
1636
1638 PT_order *order, PT_limit_clause *limit)
1639 : PT_query_expression(pos, nullptr, body, order, limit) {}
1640
1642 : PT_query_expression(pos, body, nullptr, nullptr) {}
1643
1644 bool do_contextualize(Parse_context *pc) override;
1645
1646 bool is_set_operation() const override { return m_body->is_set_operation(); }
1647
1648 bool has_into_clause() const override { return m_body->has_into_clause(); }
1649 bool has_trailing_into_clause() const override {
1650 return (m_body->has_trailing_into_clause() && m_order == nullptr &&
1651 m_limit == nullptr);
1652 }
1653
1654 bool can_absorb_order_and_limit(bool order, bool limit) const override {
1655 if (m_body->is_set_operation()) {
1656 return false;
1657 }
1658 if (m_order == nullptr && m_limit == nullptr) {
1659 /*
1660 It is safe to push ORDER and/or LIMIT down in:
1661
1662 (SELECT ...<no order or limit clauses>) ORDER BY ... LIMIT ...;
1663 (SELECT ...<no order or limit clauses>) ORDER BY ...;
1664 (SELECT ...<no order or limit clauses>) LIMIT ...;
1665 */
1666 return true;
1667 }
1668 if (m_limit != nullptr && !order && limit) {
1669 /*
1670 In MySQL, it is ok(*) to push LIMIT down in:
1671
1672 (SELECT ... [ORDER BY ...] LIMIT a) LIMIT b;
1673
1674 *) MySQL doesn't follow the standard when overwriting `LIMIT a` with
1675 `LIMIT b` if a < b. Moreover, the result of:
1676
1677 (SELECT ... ORDER BY order1 LIMIT a) ORDER BY order1 LIMIT b; (1)
1678
1679 can diverge from:
1680
1681 (SELECT ... ORDER BY order1 LIMIT a) LIMIT b; (2)
1682
1683 since the example (1) never overwrites `LIMIT a` with `LIMIT b`,
1684 while the example (2) does overwrite.
1685
1686 TODO: add a warning, deprecate and replace this behavior with the
1687 standard one.
1688 */
1689 return true;
1690 }
1691 if (m_order != nullptr && m_limit == nullptr && !order && limit) {
1692 /*
1693 Allow pushdown of LIMIT into body with ORDER BY, e.g
1694
1695 (SELECT ... ORDER BY order1) LIMIT a;
1696 */
1697 return true;
1698 }
1699 return false;
1700 }
1701
1702 bool is_table_value_constructor() const override {
1704 }
1705
1707 return m_body->get_row_value_list();
1708 }
1709
1710 private:
1711 /**
1712 Contextualizes the order and limit clauses, re-interpreting them according
1713 to the rules. If the `<query expression body>` can absorb the clauses,
1714 they are simply contextualized into the current Query_block. If not, we
1715 have to create the "fake" Query_block unless there is one already
1716 (Query_expression::new_set_operation_query() is known to do this.)
1717
1718 @see PT_query_expression::can_absorb_order_and_limit()
1719 */
1721
1726};
1727
1728/*
1729 After the removal of the `... <locking_clause> <into_clause>` syntax
1730 PT_locking will disappear.
1731*/
1734
1735 public:
1737 PT_locking_clause_list *locking_clauses)
1738 : super(pos),
1740 m_locking_clauses{locking_clauses} {}
1741
1742 bool do_contextualize(Parse_context *pc) override {
1743 return (super::do_contextualize(pc) ||
1746 }
1747
1748 bool is_set_operation() const override {
1750 }
1751
1752 bool has_into_clause() const override {
1754 }
1755 bool has_trailing_into_clause() const override { return false; }
1756
1757 bool can_absorb_order_and_limit(bool order, bool limit) const override {
1758 return m_query_expression->can_absorb_order_and_limit(order, limit);
1759 }
1760
1761 bool is_table_value_constructor() const override {
1763 }
1764
1767 }
1768
1769 private:
1772};
1773
1776
1779
1780 public:
1782
1783 PT_subquery(const POS &pos, PT_query_expression_body *query_expression)
1784 : super(pos),
1785 qe(query_expression),
1787 m_is_derived_table(false) {}
1788
1789 bool do_contextualize(Parse_context *pc) override;
1790
1792};
1793
1796
1797 public:
1800 bool is_rhs_in_parentheses = false)
1801 : super(pos),
1803 m_is_rhs_in_parentheses{is_rhs_in_parentheses} {
1804 m_list.push_back(lhs);
1805 m_list.push_back(rhs);
1806 }
1807
1809 QueryLevel &ql);
1810 bool is_set_operation() const override { return true; }
1811
1812 bool has_into_clause() const override {
1813 return std::any_of(m_list.cbegin(), m_list.cend(),
1814 [](const PT_query_expression_body &body) {
1815 return body.has_into_clause();
1816 });
1817 }
1818 bool has_trailing_into_clause() const override {
1819 return !m_is_rhs_in_parentheses &&
1820 m_list[m_list.elements - 1]->has_trailing_into_clause();
1821 }
1822
1823 bool can_absorb_order_and_limit(bool, bool) const override { return false; }
1824
1825 bool is_table_value_constructor() const override { return false; }
1826 PT_insert_values_list *get_row_value_list() const override { return nullptr; }
1827 bool is_distinct() const { return m_is_distinct; }
1828
1831
1832 protected:
1834 Surrounding_context context);
1839 void add_json_info(Json_object *obj) override {
1840 obj->add_alias("distinct", create_dom_ptr<Json_boolean>(m_is_distinct));
1841 obj->add_alias("rhs_in_parentheses",
1842 create_dom_ptr<Json_boolean>(m_is_rhs_in_parentheses));
1843 }
1844};
1845
1848
1849 public:
1851 bool do_contextualize(Parse_context *pc) override;
1852 enum Setop_type type() const override { return UNION; }
1853};
1854
1857
1858 public:
1860 bool do_contextualize(Parse_context *pc) override;
1861 enum Setop_type type() const override { return EXCEPT; }
1862};
1863
1866
1867 public:
1869 bool do_contextualize(Parse_context *pc) override;
1870 enum Setop_type type() const override { return INTERSECT; }
1871};
1872
1875
1876 public:
1877 /**
1878 @param pos Position of this clause in the SQL statement.
1879 @param qe The query expression.
1880 @param sql_command The type of SQL command.
1881 */
1882 PT_select_stmt(const POS &pos, enum_sql_command sql_command,
1884 : super(pos),
1885 m_sql_command(sql_command),
1886 m_qe(qe),
1887 m_into(nullptr),
1889
1890 /**
1891 Creates a SELECT command. Only SELECT commands can have into.
1892
1893 @param pos Position of this clause in the SQL
1894 statement.
1895 @param qe The query expression.
1896 @param into The own INTO destination.
1897 @param has_trailing_locking_clauses True if there are locking clauses (like
1898 `FOR UPDATE`) at the end of the
1899 statement.
1900 */
1902 PT_into_destination *into = nullptr,
1903 bool has_trailing_locking_clauses = false)
1904 : super(pos),
1906 m_qe{qe},
1907 m_into{into},
1908 m_has_trailing_locking_clauses{has_trailing_locking_clauses} {}
1909
1910 Sql_cmd *make_cmd(THD *thd) override;
1911 std::string get_printable_parse_tree(THD *thd) override;
1912
1913 private:
1918};
1919
1920/**
1921 Top-level node for the DELETE statement
1922
1923 @ingroup ptn_stmt
1924*/
1925class PT_delete final : public Parse_tree_root {
1927
1928 private:
1933 const char *const opt_table_alias;
1941
1942 public:
1943 // single-table DELETE node constructor:
1944 PT_delete(const POS &pos, PT_with_clause *with_clause_arg,
1945 PT_hint_list *opt_hints_arg, int opt_delete_options_arg,
1946 Table_ident *table_ident_arg,
1947 const LEX_CSTRING &opt_table_alias_arg,
1948 List<String> *opt_use_partition_arg, Item *opt_where_clause_arg,
1949 PT_order *opt_order_clause_arg, Item *opt_delete_limit_clause_arg)
1950 : super(pos),
1951 m_with_clause(with_clause_arg),
1952 opt_hints(opt_hints_arg),
1953 opt_delete_options(opt_delete_options_arg),
1954 table_ident(table_ident_arg),
1955 opt_table_alias(opt_table_alias_arg.str),
1956 opt_use_partition(opt_use_partition_arg),
1957 opt_where_clause(opt_where_clause_arg),
1958 opt_order_clause(opt_order_clause_arg),
1959 opt_delete_limit_clause(opt_delete_limit_clause_arg) {
1961 join_table_list.init_empty_const();
1962 }
1963
1964 // multi-table DELETE node constructor:
1965 PT_delete(const POS &pos, PT_with_clause *with_clause_arg,
1966 PT_hint_list *opt_hints_arg, int opt_delete_options_arg,
1967 const Mem_root_array_YY<Table_ident *> &table_list_arg,
1968 const Mem_root_array_YY<PT_table_reference *> &join_table_list_arg,
1969 Item *opt_where_clause_arg)
1970 : super(pos),
1971 m_with_clause(with_clause_arg),
1972 opt_hints(opt_hints_arg),
1973 opt_delete_options(opt_delete_options_arg),
1976 table_list(table_list_arg),
1978 join_table_list(join_table_list_arg),
1979 opt_where_clause(opt_where_clause_arg),
1982
1983 Sql_cmd *make_cmd(THD *thd) override;
1984
1985 private:
1986 bool is_multitable() const {
1987 assert((table_ident != nullptr) ^ (table_list.size() > 0));
1988 return table_ident == nullptr;
1989 }
1990
1992};
1993
1994/**
1995 Top-level node for the UPDATE statement
1996
1997 @ingroup ptn_stmt
1998*/
2001
2012
2013 public:
2014 PT_update(const POS &pos, PT_with_clause *with_clause_arg,
2015 PT_hint_list *opt_hints_arg, thr_lock_type opt_low_priority_arg,
2016 bool opt_ignore_arg,
2017 const Mem_root_array_YY<PT_table_reference *> &join_table_list_arg,
2018 PT_item_list *column_list_arg, PT_item_list *value_list_arg,
2019 Item *opt_where_clause_arg, PT_order *opt_order_clause_arg,
2020 Item *opt_limit_clause_arg)
2021 : super(pos),
2022 m_with_clause(with_clause_arg),
2023 opt_hints(opt_hints_arg),
2024 opt_low_priority(opt_low_priority_arg),
2025 opt_ignore(opt_ignore_arg),
2026 join_table_list(join_table_list_arg),
2027 column_list(column_list_arg),
2028 value_list(value_list_arg),
2029 opt_where_clause(opt_where_clause_arg),
2030 opt_order_clause(opt_order_clause_arg),
2031 opt_limit_clause(opt_limit_clause_arg) {}
2032
2033 Sql_cmd *make_cmd(THD *thd) override;
2034};
2035
2038
2040
2041 public:
2043 : super(pos), many_values(mem_root) {}
2044
2045 bool do_contextualize(Parse_context *pc) override;
2046
2048 many_values.push_back(x);
2049 return false;
2050 }
2051
2053 assert(is_contextualized());
2054 return many_values;
2055 }
2056};
2057
2058/**
2059 Top-level node for the INSERT statement
2060
2061 @ingroup ptn_stmt
2062*/
2063class PT_insert final : public Parse_tree_root {
2065
2066 const bool is_replace;
2069 const bool ignore;
2075 const char *const opt_values_table_alias;
2079
2080 public:
2081 PT_insert(const POS &pos, bool is_replace_arg, PT_hint_list *opt_hints_arg,
2082 thr_lock_type lock_option_arg, bool ignore_arg,
2083 Table_ident *table_ident_arg, List<String> *opt_use_partition_arg,
2084 PT_item_list *column_list_arg,
2085 PT_insert_values_list *row_value_list_arg,
2086 PT_query_expression_body *insert_query_expression_arg,
2087 const LEX_CSTRING &opt_values_table_alias_arg,
2088 Create_col_name_list *opt_values_column_list_arg,
2089 PT_item_list *opt_on_duplicate_column_list_arg,
2090 PT_item_list *opt_on_duplicate_value_list_arg)
2091 : super(pos),
2092 is_replace(is_replace_arg),
2093 opt_hints(opt_hints_arg),
2094 lock_option(lock_option_arg),
2095 ignore(ignore_arg),
2096 table_ident(table_ident_arg),
2097 opt_use_partition(opt_use_partition_arg),
2098 column_list(column_list_arg),
2099 row_value_list(row_value_list_arg),
2100 insert_query_expression(insert_query_expression_arg),
2101 opt_values_table_alias(opt_values_table_alias_arg.str),
2102 opt_values_column_list(opt_values_column_list_arg),
2103 opt_on_duplicate_column_list(opt_on_duplicate_column_list_arg),
2104 opt_on_duplicate_value_list(opt_on_duplicate_value_list_arg) {
2105 // REPLACE statement can't have IGNORE flag:
2106 assert(!is_replace || !ignore);
2107 // REPLACE statement can't have ON DUPLICATE KEY UPDATE clause:
2108 assert(!is_replace || opt_on_duplicate_column_list == nullptr);
2109 // INSERT/REPLACE ... SELECT can't have VALUES clause:
2110 assert((row_value_list != nullptr) ^ (insert_query_expression != nullptr));
2111 // ON DUPLICATE KEY UPDATE: column and value arrays must have same sizes:
2112 assert((opt_on_duplicate_column_list == nullptr &&
2113 opt_on_duplicate_value_list == nullptr) ||
2116 }
2117
2118 Sql_cmd *make_cmd(THD *thd) override;
2119
2120 private:
2121 bool has_query_block() const { return insert_query_expression != nullptr; }
2122};
2123
2124class PT_call final : public Parse_tree_root {
2127
2128 public:
2129 PT_call(const POS &pos, sp_name *proc_name_arg,
2130 PT_item_list *opt_expr_list_arg)
2131 : Parse_tree_root(pos),
2132 proc_name(proc_name_arg),
2133 opt_expr_list(opt_expr_list_arg) {}
2134
2135 Sql_cmd *make_cmd(THD *thd) override;
2136};
2137
2138/**
2139 Top-level node for the SHUTDOWN statement
2140
2141 @ingroup ptn_stmt
2142*/
2143class PT_shutdown final : public Parse_tree_root {
2145
2146 public:
2147 Sql_cmd *make_cmd(THD *) override { return &sql_cmd; }
2148};
2149
2150/**
2151 Top-level node for the CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM statement.
2152
2153 @ingroup ptn_stmt
2154*/
2155class PT_create_srs final : public Parse_tree_root {
2156 /// The SQL command object.
2158 /// Whether OR REPLACE is specified.
2160 /// Whether IF NOT EXISTS is specified.
2162 /// SRID of the SRS to create.
2163 ///
2164 /// The range is larger than that of gis::srid_t, so it must be
2165 /// verified to be less than the uint32 maximum value.
2166 unsigned long long m_srid;
2167 /// All attributes except SRID.
2169
2170 /// Check if a UTF-8 string contains control characters.
2171 ///
2172 /// @note This function only checks single byte control characters (U+0000 to
2173 /// U+001F, and U+007F). There are some control characters at U+0080 to U+00A0
2174 /// that are not detected by this function.
2175 ///
2176 /// @param str The string.
2177 /// @param length Length of the string.
2178 ///
2179 /// @retval false The string contains no control characters.
2180 /// @retval true The string contains at least one control character.
2181 bool contains_control_char(char *str, size_t length) {
2182 for (size_t pos = 0; pos < length; pos++) {
2183 if (std::iscntrl(str[pos])) return true;
2184 }
2185 return false;
2186 }
2187
2188 public:
2189 PT_create_srs(const POS &pos, unsigned long long srid,
2190 const Sql_cmd_srs_attributes &attributes, bool or_replace,
2191 bool if_not_exists)
2192 : Parse_tree_root(pos),
2193 m_or_replace(or_replace),
2194 m_if_not_exists(if_not_exists),
2195 m_srid(srid),
2196 m_attributes(attributes) {}
2197
2198 Sql_cmd *make_cmd(THD *thd) override;
2199};
2200
2201/**
2202 Top-level node for the DROP SPATIAL REFERENCE SYSTEM statement.
2203
2204 @ingroup ptn_stmt
2205*/
2206class PT_drop_srs final : public Parse_tree_root {
2207 /// The SQL command object.
2209 /// SRID of the SRS to drop.
2210 ///
2211 /// The range is larger than that of gis::srid_t, so it must be
2212 /// verified to be less than the uint32 maximum value.
2213 unsigned long long m_srid;
2214
2215 public:
2216 PT_drop_srs(const POS &pos, unsigned long long srid, bool if_exists)
2217 : Parse_tree_root(pos), sql_cmd(srid, if_exists), m_srid(srid) {}
2218
2219 Sql_cmd *make_cmd(THD *thd) override;
2220};
2221
2222/**
2223 Top-level node for the ALTER INSTANCE statement
2224
2225 @ingroup ptn_stmt
2226*/
2229
2230 public:
2232 const POS &pos, enum alter_instance_action_enum alter_instance_action,
2233 const LEX_CSTRING &channel)
2234 : Parse_tree_root(pos), sql_cmd(alter_instance_action, channel) {}
2235
2236 Sql_cmd *make_cmd(THD *thd) override;
2237};
2238
2239/**
2240 A template-free base class for index options that we can predeclare in
2241 sql_lex.h
2242*/
2244 protected:
2245 explicit PT_base_index_option(const POS &pos) : Table_ddl_node(pos) {}
2246};
2247
2248/**
2249 A key part specification.
2250
2251 This can either be a "normal" key part (a key part that points to a column),
2252 or this can be a functional key part (a key part that points to an
2253 expression).
2254*/
2257
2258 public:
2259 /**
2260 Constructor for a functional key part.
2261
2262 @param pos Position of this clause in the SQL statement.
2263 @param expression The expression to index.
2264 @param order The direction of the index.
2265 */
2266 PT_key_part_specification(const POS &pos, Item *expression, enum_order order);
2267
2268 /**
2269 Constructor for a "normal" key part. That is a key part that points to a
2270 column and not an expression.
2271
2272 @param pos Position of this clause in the SQL statement.
2273 @param column_name The column name that this key part points to.
2274 @param order The direction of the index.
2275 @param prefix_length How many bytes or characters this key part should
2276 index, or zero if it should index the entire column.
2277 */
2278 PT_key_part_specification(const POS &pos, const LEX_CSTRING &column_name,
2279 enum_order order, int prefix_length);
2280
2281 /**
2282 Contextualize this key part specification. This will also call itemize on
2283 the indexed expression if this is a functional key part.
2284
2285 @param pc The parse context
2286
2287 @retval true on error
2288 @retval false on success
2289 */
2290 bool do_contextualize(Parse_context *pc) override;
2291
2292 /**
2293 Get the indexed expression. The caller must ensure that has_expression()
2294 returns true before calling this.
2295
2296 @returns The indexed expression
2297 */
2299 assert(has_expression());
2300 return m_expression;
2301 }
2302
2303 /**
2304 @returns The direction of the index: ORDER_ASC, ORDER_DESC or
2305 ORDER_NOT_RELEVANT in case the user didn't explicitly specify a
2306 direction.
2307 */
2308 enum_order get_order() const { return m_order; }
2309
2310 /**
2311 @retval true if the user explicitly specified a direction (asc/desc).
2312 @retval false if the user didn't explicitly specify a direction.
2313 */
2314 bool is_explicit() const { return get_order() != ORDER_NOT_RELEVANT; }
2315
2316 /**
2317 @retval true if the key part contains an expression (and thus is a
2318 functional key part).
2319 @retval false if the key part doesn't contain an expression.
2320 */
2321 bool has_expression() const { return m_expression != nullptr; }
2322
2323 /**
2324 Get the column that this key part points to. This is only valid if this
2325 key part isn't a functional index. The caller must thus check the return
2326 value of has_expression() before calling this function.
2327
2328 @returns The column that this key part points to.
2329 */
2331 assert(!has_expression());
2332 return m_column_name;
2333 }
2334
2335 /**
2336 @returns The number of bytes that this key part should index. If the column
2337 this key part points to is a non-binary column, this is the number
2338 of characters. Returns zero if the entire column should be indexed.
2339 */
2340 int get_prefix_length() const { return m_prefix_length; }
2341
2342 private:
2343 /**
2344 The indexed expression in case this is a functional key part. Only valid if
2345 has_expression() returns true.
2346 */
2348
2349 /// The direction of the index.
2351
2352 /// The name of the column that this key part indexes.
2354
2355 /**
2356 If this is greater than zero, it represents how many bytes of the column
2357 that is indexed. Note that for non-binary columns (VARCHAR, TEXT etc), this
2358 is the number of characters.
2359 */
2361};
2362
2363/**
2364 A template for options that set a single `<alter option>` value in
2365 thd->lex->key_create_info.
2366
2367 @tparam Option_type The data type of the option.
2368 @tparam Property Pointer-to-member for the option of KEY_CREATE_INFO.
2369*/
2370template <typename Option_type, Option_type KEY_CREATE_INFO::*Property>
2372 public:
2373 /// @param pos Position of this clause in the SQL statement.
2374 /// @param option_value The value of the option.
2375 PT_index_option(const POS &pos, Option_type option_value)
2376 : PT_base_index_option(pos), m_option_value(option_value) {}
2377
2380 return false;
2381 }
2382
2383 private:
2384 Option_type m_option_value;
2385};
2386
2387/**
2388 A template for options that set a single property in a KEY_CREATE_INFO, and
2389 also records if the option was explicitly set.
2390*/
2391template <typename Option_type, Option_type KEY_CREATE_INFO::*Property,
2392 bool KEY_CREATE_INFO::*Property_is_explicit>
2394 public:
2395 PT_traceable_index_option(const POS &pos, Option_type option_value)
2396 : PT_base_index_option(pos), m_option_value(option_value) {}
2397
2400 pc->key_create_info->*Property_is_explicit = true;
2401 return false;
2402 }
2403
2404 private:
2405 Option_type m_option_value;
2406};
2407
2415
2416/**
2417 The data structure (B-tree, Hash, etc) used for an index is called
2418 'index_type' in the manual. Internally, this is stored in
2419 KEY_CREATE_INFO::algorithm, while what the manual calls 'algorithm' is
2420 stored in partition_info::key_algorithm. In an `<create_index_stmt>`
2421 it's ignored. The terminology is somewhat confusing, but we stick to the
2422 manual in the parser.
2423*/
2427
2429 public:
2431 const LEX_STRING &name_arg, PT_base_index_option *type,
2432 Table_ident *table_ident,
2438 m_keytype(type_par),
2439 m_name(name_arg),
2440 m_type(type),
2441 m_table_ident(table_ident),
2442 m_columns(cols),
2444 m_algo(algo),
2445 m_lock(lock) {}
2446
2447 Sql_cmd *make_cmd(THD *thd) override;
2448
2449 private:
2458};
2459
2460/**
2461 Base class for column/constraint definitions in CREATE %TABLE
2462
2463 @ingroup ptn_create_table_stuff
2464*/
2466 protected:
2467 explicit PT_table_element(const POS &pos) : Table_ddl_node(pos) {}
2468};
2469
2471 protected:
2472 explicit PT_table_constraint_def(const POS &pos) : PT_table_element(pos) {}
2473};
2474
2477
2478 public:
2480 const LEX_STRING &name_arg,
2484 : super(pos),
2485 m_keytype(type_par),
2486 m_name(name_arg),
2487 m_type(type),
2488 m_columns(cols),
2489 m_options(options) {}
2490
2491 bool do_contextualize(Table_ddl_parse_context *pc) override;
2492
2493 private:
2499};
2500
2503
2504 public:
2505 PT_foreign_key_definition(const POS &pos, const LEX_STRING &constraint_name,
2506 const LEX_STRING &key_name,
2508 Table_ident *referenced_table,
2509 List<Key_part_spec> *ref_list,
2510 fk_match_opt fk_match_option,
2511 fk_option fk_update_opt, fk_option fk_delete_opt)
2512 : super(pos),
2513 m_constraint_name(constraint_name),
2514 m_key_name(key_name),
2515 m_columns(columns),
2516 m_referenced_table(referenced_table),
2517 m_ref_list(ref_list),
2518 m_fk_match_option(fk_match_option),
2519 m_fk_update_opt(fk_update_opt),
2520 m_fk_delete_opt(fk_delete_opt) {}
2521
2522 bool do_contextualize(Table_ddl_parse_context *pc) override;
2523
2524 private:
2533};
2534
2535/**
2536 Common base class for CREATE TABLE and ALTER TABLE option nodes
2537
2538 @ingroup ptn_create_or_alter_table_options
2539*/
2541 protected:
2542 explicit PT_ddl_table_option(const POS &pos) : Table_ddl_node(pos) {}
2543
2544 public:
2545 ~PT_ddl_table_option() override = 0; // Force abstract class declaration
2546
2547 virtual bool is_rename_table() const { return false; }
2548};
2549
2551
2552/**
2553 Base class for CREATE TABLE option nodes
2554
2555 @ingroup ptn_create_or_alter_table_options
2556*/
2559
2560 protected:
2561 explicit PT_create_table_option(const POS &pos) : super(pos) {}
2562
2563 public:
2564 ~PT_create_table_option() override = 0; // Force abstract class declaration
2565
2567 if (super::do_contextualize(pc)) return true;
2569 return false;
2570 }
2571};
2572
2574
2575/**
2576 A template for options that set a single property in HA_CREATE_INFO, and
2577 also records if the option was explicitly set.
2578*/
2579template <typename Option_type, Option_type HA_CREATE_INFO::*Property,
2580 uint64_t Property_flag>
2583
2584 const Option_type value;
2585
2586 public:
2587 explicit PT_traceable_create_table_option(const POS &pos, Option_type value)
2588 : super(pos), value(value) {}
2589
2591 if (super::do_contextualize(pc)) return true;
2592 pc->create_info->*Property = value;
2593 pc->create_info->used_fields |= Property_flag;
2594 return false;
2595 }
2596};
2597
2598#define TYPE_AND_REF(x) decltype(x), &x
2599
2600/**
2601 Node for the @SQL{MAX_ROWS [=] @B{@<integer@>}} table option
2602
2603 @ingroup ptn_create_or_alter_table_options
2604*/
2608
2609/**
2610 Node for the @SQL{MIN_ROWS [=] @B{@<integer@>}} table option
2611
2612 @ingroup ptn_create_or_alter_table_options
2613*/
2617
2618/**
2619 Node for the @SQL{AVG_ROW_LENGTH_ROWS [=] @B{@<integer@>}} table option
2620
2621 @ingroup ptn_create_or_alter_table_options
2622*/
2626
2627/**
2628 Node for the @SQL{PASSWORD [=] @B{@<string@>}} table option
2629
2630 @ingroup ptn_create_or_alter_table_options
2631*/
2635
2636/**
2637 Node for the @SQL{COMMENT [=] @B{@<string@>}} table option
2638
2639 @ingroup ptn_create_or_alter_table_options
2640*/
2644
2645/**
2646 Node for the @SQL{COMPRESSION [=] @B{@<string@>}} table option
2647
2648 @ingroup ptn_create_or_alter_table_options
2649*/
2653
2654/**
2655 Node for the @SQL{ENGRYPTION [=] @B{@<string@>}} table option
2656
2657 @ingroup ptn_create_or_alter_table_options
2658*/
2662
2663/**
2664 Node for the @SQL{AUTO_INCREMENT [=] @B{@<integer@>}} table option
2665
2666 @ingroup ptn_create_or_alter_table_options
2667*/
2671
2675
2680
2684
2688
2692
2696
2700
2705
2710
2712
2713/**
2714 A template for options that set HA_CREATE_INFO::table_options and
2715 also records if the option was explicitly set.
2716*/
2717template <ulong Property_flag, table_options_t Default, table_options_t Yes,
2718 table_options_t No>
2721
2723
2724 public:
2726 : super(pos), value(value) {}
2727
2729 if (super::do_contextualize(pc)) return true;
2730 pc->create_info->table_options &= ~(Yes | No);
2731 switch (value) {
2732 case Ternary_option::ON:
2733 pc->create_info->table_options |= Yes;
2734 break;
2736 pc->create_info->table_options |= No;
2737 break;
2739 break;
2740 default:
2741 assert(false);
2742 }
2743 pc->create_info->used_fields |= Property_flag;
2744 return false;
2745 }
2746};
2747
2748/**
2749 Node for the @SQL{PACK_KEYS [=] @B{1|0|DEFAULT}} table option
2750
2751 @ingroup ptn_create_or_alter_table_options
2752
2753 PACK_KEYS | Constructor parameter
2754 ----------|----------------------
2755 1 | Ternary_option::ON
2756 0 | Ternary_option::OFF
2757 DEFAULT | Ternary_option::DEFAULT
2758*/
2760 0, // DEFAULT
2761 HA_OPTION_PACK_KEYS, // ON
2764
2765/**
2766 Node for the @SQL{STATS_PERSISTENT [=] @B{1|0|DEFAULT}} table option
2767
2768 @ingroup ptn_create_or_alter_table_options
2769
2770 STATS_PERSISTENT | Constructor parameter
2771 -----------------|----------------------
2772 1 | Ternary_option::ON
2773 0 | Ternary_option::OFF
2774 DEFAULT | Ternary_option::DEFAULT
2775*/
2777 0, // DEFAULT
2781
2782/**
2783 A template for options that set HA_CREATE_INFO::table_options and
2784 also records if the option was explicitly set.
2785*/
2786template <ulong Property_flag, table_options_t Yes, table_options_t No>
2789
2790 const bool value;
2791
2792 public:
2793 explicit PT_bool_create_table_option(const POS &pos, bool value)
2794 : super(pos), value(value) {}
2795
2797 if (super::do_contextualize(pc)) return true;
2798 pc->create_info->table_options &= ~(Yes | No);
2799 pc->create_info->table_options |= value ? Yes : No;
2800 pc->create_info->used_fields |= Property_flag;
2801 return false;
2802 }
2803};
2804
2805/**
2806 Node for the @SQL{CHECKSUM|TABLE_CHECKSUM [=] @B{0|@<not 0@>}} table option
2807
2808 @ingroup ptn_create_or_alter_table_options
2809
2810 TABLE_CHECKSUM | Constructor parameter
2811 ---------------|----------------------
2812 0 | false
2813 not 0 | true
2814*/
2816 HA_OPTION_CHECKSUM, // ON
2818 >
2820
2821/**
2822 Node for the @SQL{DELAY_KEY_WRITE [=] @B{0|@<not 0@>}} table option
2823
2824 @ingroup ptn_create_or_alter_table_options
2825
2826 TABLE_CHECKSUM | Constructor parameter
2827 ---------------|----------------------
2828 0 | false
2829 not 0 | true
2830*/
2835
2836/**
2837 Node for the @SQL{ENGINE [=] @B{@<identifier@>|@<string@>}} table option
2838
2839 @ingroup ptn_create_or_alter_table_options
2840*/
2843
2845
2846 public:
2847 /**
2848 @param pos Position of this clause in the SQL statement.
2849 @param engine Storage engine name.
2850 */
2852 const LEX_CSTRING &engine)
2853 : super(pos), engine(engine) {}
2854
2855 bool do_contextualize(Table_ddl_parse_context *pc) override;
2856};
2857
2858/**
2859 Node for the @SQL{SECONDARY_ENGINE [=] @B{@<identifier@>|@<string@>|NULL}}
2860 table option.
2861
2862 @ingroup ptn_create_or_alter_table_options
2863*/
2866
2867 public:
2869 : super(pos) {}
2871 const POS &pos, const LEX_CSTRING &secondary_engine)
2873
2874 bool do_contextualize(Table_ddl_parse_context *pc) override;
2875
2876 private:
2878};
2879
2880/**
2881 Node for the @SQL{STATS_AUTO_RECALC [=] @B{@<0|1|DEFAULT@>})} table option
2882
2883 @ingroup ptn_create_or_alter_table_options
2884*/
2887
2889
2890 public:
2891 /**
2892 @param pos Position of this clause in the SQL statement.
2893 @param value
2894 STATS_AUTO_RECALC | value
2895 ------------------|----------------------
2896 1 | Ternary_option::ON
2897 0 | Ternary_option::OFF
2898 DEFAULT | Ternary_option::DEFAULT
2899 */
2901 : super(pos), value(value) {}
2902
2903 bool do_contextualize(Table_ddl_parse_context *pc) override;
2904};
2905
2906/**
2907 Node for the @SQL{STATS_SAMPLE_PAGES [=] @B{@<integer@>|DEFAULT}} table option
2908
2909 @ingroup ptn_create_or_alter_table_options
2910*/
2914
2916
2917 public:
2918 /**
2919 Constructor for implicit number of pages
2920
2921 @param pos Position of this clause in the SQL statement.
2922 @param value Number of pages, 1@<=N@<=65535.
2923 */
2925 : super(pos), value(value) {
2926 assert(value != 0 && value <= 0xFFFF);
2927 }
2928 /**
2929 Constructor for the DEFAULT number of pages
2930 */
2932 : super(pos), value(0) {} // DEFAULT
2933
2934 bool do_contextualize(Table_ddl_parse_context *pc) override;
2935};
2936
2939
2941
2942 public:
2943 explicit PT_create_union_option(const POS &pos,
2945 : super(pos), tables(tables) {}
2946
2947 bool do_contextualize(Table_ddl_parse_context *pc) override;
2948};
2949
2952
2954
2955 public:
2957 : super(pos), value(value) {}
2958
2960 if (super::do_contextualize(pc)) return true;
2962 return false;
2963 }
2964};
2965
2968
2970
2971 public:
2973 const CHARSET_INFO *value)
2974 : super(pos), value(value) {
2975 assert(value != nullptr);
2976 }
2977
2978 bool do_contextualize(Table_ddl_parse_context *pc) override;
2979};
2980
2983
2985
2986 public:
2988 const CHARSET_INFO *value)
2989 : super(pos), value(value) {
2990 assert(value != nullptr);
2991 }
2992
2993 bool do_contextualize(Table_ddl_parse_context *pc) override;
2994};
2995
2999
3000 public:
3001 explicit PT_check_constraint(const POS &pos, LEX_STRING &name, Item *expr,
3002 bool is_enforced)
3003 : super(pos) {
3004 cc_spec.name = name;
3005 cc_spec.check_expr = expr;
3006 cc_spec.is_enforced = is_enforced;
3007 }
3009
3010 bool do_contextualize(Table_ddl_parse_context *pc) override;
3011};
3012
3015
3018 // Currently we ignore that constraint in the executor.
3020
3021 const char *opt_place;
3022
3023 public:
3027 const char *opt_place = nullptr)
3028 : super(pos),
3033
3034 bool do_contextualize(Table_ddl_parse_context *pc) override;
3035};
3036
3037/**
3038 Top-level node for the CREATE %TABLE statement
3039
3040 @ingroup ptn_create_table
3041*/
3052
3054
3055 public:
3056 /**
3057 @param pos Position of this clause in the SQL
3058 statement.
3059 @param mem_root MEM_ROOT to use for allocation
3060 @param is_temporary True if @SQL{CREATE @B{TEMPORARY} %TABLE}
3061 @param only_if_not_exists True if @SQL{CREATE %TABLE ... @B{IF NOT EXISTS}}
3062 @param table_name @SQL{CREATE %TABLE ... @B{@<table name@>}}
3063 @param opt_table_element_list NULL or a list of table column and
3064 constraint definitions.
3065 @param opt_create_table_options NULL or a list of
3066 @ref ptn_create_or_alter_table_options
3067 "table options".
3068 @param opt_partitioning NULL or the @SQL{PARTITION BY} clause.
3069 @param on_duplicate DUPLICATE, IGNORE or fail with an error
3070 on data duplication errors (relevant
3071 for @SQL{CREATE TABLE ... SELECT}
3072 statements).
3073 @param opt_query_expression NULL or the @SQL{@B{SELECT}} clause.
3074 */
3076 const POS &pos, MEM_ROOT *mem_root, bool is_temporary,
3092 /**
3093 @param pos Position of this clause in the SQL statement.
3094 @param mem_root MEM_ROOT to use for allocation
3095 @param is_temporary True if @SQL{CREATE @B{TEMPORARY} %TABLE}.
3096 @param only_if_not_exists True if @SQL{CREATE %TABLE ... @B{IF NOT EXISTS}}.
3097 @param table_name @SQL{CREATE %TABLE ... @B{@<table name@>}}.
3098 @param opt_like_clause NULL or the @SQL{@B{LIKE @<table name@>}} clause.
3099 */
3113
3114 Sql_cmd *make_cmd(THD *thd) override;
3115};
3116
3117class PT_create_role final : public Parse_tree_root {
3119
3120 public:
3121 PT_create_role(const POS &pos, bool if_not_exists,
3122 const List<LEX_USER> *roles)
3123 : Parse_tree_root(pos), sql_cmd(if_not_exists, roles) {}
3124
3125 Sql_cmd *make_cmd(THD *thd) override;
3126};
3127
3128class PT_drop_role final : public Parse_tree_root {
3130
3131 public:
3132 explicit PT_drop_role(const POS &pos, bool ignore_errors,
3133 const List<LEX_USER> *roles)
3134 : Parse_tree_root(pos), sql_cmd(ignore_errors, roles) {}
3135
3136 Sql_cmd *make_cmd(THD *thd) override;
3137};
3138
3141
3142 public:
3143 explicit PT_set_role(const POS &pos, role_enum role_type,
3144 const List<LEX_USER> *opt_except_roles = nullptr)
3145 : Parse_tree_root(pos), sql_cmd(role_type, opt_except_roles) {
3146 assert(role_type == role_enum::ROLE_ALL || opt_except_roles == nullptr);
3147 }
3148 explicit PT_set_role(const POS &pos, const List<LEX_USER> *roles)
3149 : Parse_tree_root(pos), sql_cmd(roles) {}
3150
3151 Sql_cmd *make_cmd(THD *thd) override;
3152};
3153
3154/**
3155 This class is used for representing both static and dynamic privileges on
3156 global as well as table and column level.
3157*/
3160
3163
3166 : type(type), columns(columns) {}
3167};
3168
3170 const uint grant;
3171
3173 : Privilege(STATIC, columns_arg), grant(grant) {}
3174};
3175
3178
3180 const Mem_root_array<LEX_CSTRING> *columns_arg)
3181 : Privilege(DYNAMIC, columns_arg), ident(ident) {}
3182};
3183
3185 private:
3187
3188 public:
3189 explicit PT_role_or_privilege(const POS &pos, const POS &errpos)
3190 : Parse_tree_node(pos), m_errpos(errpos) {}
3191 virtual LEX_USER *get_user(THD *thd);
3192 virtual Privilege *get_privilege(THD *thd);
3193};
3194
3198
3199 public:
3200 PT_role_at_host(const POS &pos, const POS &errpos, const LEX_STRING &role,
3201 const LEX_STRING &host)
3202 : PT_role_or_privilege(pos, errpos), role(role), host(host) {}
3203
3204 LEX_USER *get_user(THD *thd) override;
3205};
3206
3209
3210 public:
3211 PT_role_or_dynamic_privilege(const POS &pos, const POS &errpos,
3212 const LEX_STRING &ident)
3213 : PT_role_or_privilege(pos, errpos), ident(ident) {}
3214
3215 LEX_USER *get_user(THD *thd) override;
3216 Privilege *get_privilege(THD *thd) override;
3217};
3218
3220 const uint grant;
3222
3223 public:
3224 PT_static_privilege(const POS &pos, const POS &errpos, uint grant,
3225 const Mem_root_array<LEX_CSTRING> *columns = nullptr)
3226 : PT_role_or_privilege(pos, errpos), grant(grant), columns(columns) {}
3227
3228 Privilege *get_privilege(THD *thd) override;
3229};
3230
3233
3234 public:
3235 PT_dynamic_privilege(const POS &pos, const POS &errpos,
3236 const LEX_STRING &ident)
3237 : PT_role_or_privilege(pos, errpos), ident(ident) {}
3238
3239 Privilege *get_privilege(THD *thd) override;
3240};
3241
3242class PT_grant_roles final : public Parse_tree_root {
3246
3247 public:
3251 : Parse_tree_root(pos),
3252 roles(roles),
3253 users(users),
3255
3256 Sql_cmd *make_cmd(THD *thd) override;
3257};
3258
3259class PT_revoke_roles final : public Parse_tree_root {
3262
3263 public:
3265 const List<LEX_USER> *users)
3266 : Parse_tree_root(pos), roles(roles), users(users) {}
3267
3268 Sql_cmd *make_cmd(THD *thd) override;
3269};
3270
3273
3274 public:
3275 PT_alter_user_default_role(const POS &pos, bool if_exists,
3276 const List<LEX_USER> *users,
3277 const List<LEX_USER> *roles,
3278 const role_enum role_type)
3279 : Parse_tree_root(pos), sql_cmd(if_exists, users, roles, role_type) {}
3280
3281 Sql_cmd *make_cmd(THD *thd) override;
3282};
3283
3284/// Base class for Parse tree nodes of SHOW statements
3285
3287 protected:
3288 PT_show_base(const POS &pos, enum_sql_command sql_command)
3289 : Parse_tree_root(pos), m_sql_command(sql_command) {}
3290
3291 /// SQL command
3293};
3294
3295/// Base class for Parse tree nodes of SHOW statements with LIKE/WHERE parameter
3296
3298 protected:
3300 const LEX_STRING &wild, Item *where)
3301 : PT_show_base(pos, sql_command), m_wild(wild), m_where(where) {
3302 assert(m_wild.str == nullptr || m_where == nullptr);
3303 }
3304 /// Wild or where clause used in the statement.
3307};
3308
3309/// Base class for Parse tree nodes of SHOW statements with schema parameter.
3310
3312 protected:
3314 char *opt_db, const LEX_STRING &wild, Item *where)
3315 : PT_show_base(pos, sql_command),
3317 m_wild(wild),
3318 m_where(where) {
3319 assert(m_wild.str == nullptr || m_where == nullptr);
3320 }
3321 /// Optional schema name in FROM/IN clause.
3323 /// Wild or where clause used in the statement.
3326};
3327
3328/// Base class for Parse tree nodes of SHOW COLUMNS/SHOW INDEX statements.
3329
3331 protected:
3332 PT_show_table_base(const POS &pos, enum_sql_command sql_command,
3333 Table_ident *table_ident, const LEX_STRING &wild,
3334 Item *where)
3335 : PT_show_filter_base(pos, sql_command, wild, where),
3336 m_table_ident(table_ident) {}
3337
3338 bool make_table_base_cmd(THD *thd, bool *temporary);
3339
3340 /// Table used in the statement.
3342};
3343
3344/// Parse tree node for SHOW FUNCTION/PROCEDURE CODE statements.
3345
3347 protected:
3349 const sp_name *routine_name)
3350 : PT_show_base(pos, sql_command), m_sql_cmd(sql_command, routine_name) {}
3351
3352 Sql_cmd *make_cmd(THD *thd) override;
3353
3354 private:
3356};
3357
3358/// Parse tree node for SHOW BINLOG EVENTS statement
3359
3361 public:
3362 PT_show_binlog_events(const POS &pos, const LEX_STRING opt_log_file_name = {},
3363 PT_limit_clause *opt_limit_clause = nullptr)
3365 m_opt_log_file_name(opt_log_file_name),
3366 m_opt_limit_clause(opt_limit_clause) {}
3367
3368 Sql_cmd *make_cmd(THD *thd) override;
3369
3370 private:
3373
3375};
3376
3377/// Parse tree node for SHOW BINLOGS statement
3378
3379class PT_show_binlogs final : public PT_show_base {
3380 public:
3382
3383 Sql_cmd *make_cmd(THD *thd) override;
3384
3385 private:
3387};
3388
3389/// Parse tree node for SHOW CHARACTER SET statement
3390
3392 public:
3393 PT_show_charsets(const POS &pos, const LEX_STRING &wild, Item *where)
3395
3396 Sql_cmd *make_cmd(THD *thd) override;
3397
3398 private:
3400};
3401
3402/// Parse tree node for SHOW COLLATIONS statement
3403
3405 public:
3406 PT_show_collations(const POS &pos, const LEX_STRING &wild, Item *where)
3408
3409 Sql_cmd *make_cmd(THD *thd) override;
3410
3411 private:
3413};
3414
3415/// Base class for Parse tree nodes of SHOW COUNT(*) { WARNINGS | ERRORS }
3416/// statements.
3417
3419 public:
3420 explicit PT_show_count_base(const POS &pos)
3421 : PT_show_base{pos, SQLCOM_SELECT} {}
3422
3423 protected:
3424 Sql_cmd *make_cmd_generic(THD *thd, LEX_CSTRING diagnostic_variable_name);
3425};
3426
3427/// Parse tree node for SHOW COUNT(*) ERRORS
3428
3430 public:
3431 explicit PT_show_count_errors(const POS &pos) : PT_show_count_base(pos) {}
3432
3433 Sql_cmd *make_cmd(THD *thd) override {
3434 return make_cmd_generic(thd, LEX_CSTRING{STRING_WITH_LEN("error_count")});
3435 }
3436};
3437
3438/// Parse tree node for SHOW COUNT(*) WARNINGS
3439
3441 public:
3442 explicit PT_show_count_warnings(const POS &pos) : PT_show_count_base(pos) {}
3443
3444 Sql_cmd *make_cmd(THD *thd) override {
3445 return make_cmd_generic(thd, LEX_CSTRING{STRING_WITH_LEN("warning_count")});
3446 }
3447};
3448
3449/// Parse tree node for SHOW CREATE DATABASE statement
3450
3452 public:
3453 PT_show_create_database(const POS &pos, bool if_not_exists,
3454 const LEX_STRING &name)
3456 m_if_not_exists(if_not_exists),
3457 m_name(name) {}
3458
3459 Sql_cmd *make_cmd(THD *thd) override;
3460
3461 private:
3464
3466};
3467
3468/// Parse tree node for SHOW CREATE EVENT statement
3469
3471 public:
3472 PT_show_create_event(const POS &pos, sp_name *event_name)
3473 : PT_show_base(pos, SQLCOM_SHOW_CREATE_EVENT), m_spname(event_name) {}
3474
3475 Sql_cmd *make_cmd(THD *thd) override;
3476
3477 private:
3479
3481};
3482
3483/// Parse tree node for SHOW CREATE FUNCTION statement
3484
3486 public:
3487 PT_show_create_function(const POS &pos, sp_name *function_name)
3488 : PT_show_base(pos, SQLCOM_SHOW_CREATE_FUNC), m_spname(function_name) {}
3489
3490 Sql_cmd *make_cmd(THD *thd) override;
3491
3492 private:
3494
3496};
3497
3498/// Parse tree node for SHOW CREATE PROCEDURE statement
3499
3501 public:
3502 PT_show_create_procedure(const POS &pos, sp_name *procedure_name)
3503 : PT_show_base(pos, SQLCOM_SHOW_CREATE_PROC), m_spname(procedure_name) {}
3504
3505 Sql_cmd *make_cmd(THD *thd) override;
3506
3507 private:
3509
3511};
3512
3513/// Parse tree node for SHOW CREATE TABLE and VIEW statements
3514
3516 public:
3517 PT_show_create_table(const POS &pos, Table_ident *table_ident)
3518 : PT_show_base(pos, SQLCOM_SHOW_CREATE), m_sql_cmd(false, table_ident) {}
3519
3520 Sql_cmd *make_cmd(THD *thd) override;
3521
3522 private:
3524};
3525
3526/// Parse tree node for SHOW CREATE TRIGGER statement
3527
3529 public:
3530 PT_show_create_trigger(const POS &pos, sp_name *trigger_name)
3531 : PT_show_base(pos, SQLCOM_SHOW_CREATE_TRIGGER), m_spname(trigger_name) {}
3532
3533 Sql_cmd *make_cmd(THD *thd) override;
3534
3535 private:
3537
3539};
3540
3541/// Parse tree node for SHOW CREATE USER statement
3542
3543class PT_show_create_user final : public PT_show_base {
3544 public:
3547
3548 Sql_cmd *make_cmd(THD *thd) override;
3549
3550 private:
3552
3554};
3555
3556/// Parse tree node for SHOW CREATE VIEW statement
3557
3558class PT_show_create_view final : public PT_show_base {
3559 public:
3560 PT_show_create_view(const POS &pos, Table_ident *table_ident)
3561 : PT_show_base(pos, SQLCOM_SHOW_CREATE), m_sql_cmd(true, table_ident) {}
3562
3563 Sql_cmd *make_cmd(THD *thd) override;
3564
3565 private:
3567};
3568
3569/// Parse tree node for SHOW DATABASES statement
3570
3572 public:
3573 PT_show_databases(const POS &pos, const LEX_STRING &wild, Item *where)
3575
3576 Sql_cmd *make_cmd(THD *thd) override;
3577
3578 private:
3580};
3581
3582/// Parse tree node for SHOW ENGINE statements
3583
3585 protected:
3586 PT_show_engine_base(const POS &pos, enum enum_sql_command sql_command,
3587 const LEX_STRING opt_engine = {})
3588 : PT_show_base(pos, sql_command),
3589 m_engine(opt_engine),
3590 m_all(opt_engine.str == nullptr) {}
3591
3593 bool m_all;
3594};
3595
3596/// Parse tree node for SHOW ENGINE LOGS statement
3597
3599 public:
3600 PT_show_engine_logs(const POS &pos, LEX_STRING opt_engine = {})
3601 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_LOGS, opt_engine) {}
3602
3603 Sql_cmd *make_cmd(THD *thd) override;
3604
3605 private:
3607};
3608
3609/// Parse tree node for SHOW ENGINE MUTEX statement
3610
3612 public:
3613 PT_show_engine_mutex(const POS &pos, LEX_STRING opt_engine = {})
3614 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_MUTEX, opt_engine) {}
3615
3616 Sql_cmd *make_cmd(THD *thd) override;
3617
3618 private:
3620};
3621
3622/// Parse tree node for SHOW ENGINE STATUS statement
3623
3625 public:
3626 PT_show_engine_status(const POS &pos, LEX_STRING opt_engine = {})
3627 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_STATUS, opt_engine) {}
3628
3629 Sql_cmd *make_cmd(THD *thd) override;
3630
3631 private:
3633};
3634
3635/// Parse tree node for SHOW ENGINES statement
3636
3637class PT_show_engines final : public PT_show_base {
3638 public:
3641
3642 Sql_cmd *make_cmd(THD *thd) override;
3643
3644 private:
3646};
3647
3648/// Parse tree node for SHOW ERRORS statement
3649
3650class PT_show_errors final : public PT_show_base {
3651 public:
3652 PT_show_errors(const POS &pos, PT_limit_clause *opt_limit_clause = nullptr)
3654 m_opt_limit_clause(opt_limit_clause) {}
3655
3656 Sql_cmd *make_cmd(THD *thd) override;
3657
3658 private:
3660
3662};
3663
3664/// Parse tree node for SHOW EVENTS statement
3665
3667 public:
3668 PT_show_events(const POS &pos, char *opt_db, const LEX_STRING &wild,
3669 Item *where)
3671
3672 Sql_cmd *make_cmd(THD *thd) override;
3673
3674 private:
3676};
3677
3678/// Parse tree node for SHOW COLUMNS statement.
3679
3682
3683 public:
3684 PT_show_fields(const POS &pos, Show_cmd_type show_cmd_type,
3685 Table_ident *table, LEX_STRING opt_wild = {},
3686 Item *opt_where = nullptr)
3687 : PT_show_table_base(pos, SQLCOM_SHOW_FIELDS, table, opt_wild, opt_where),
3688 m_show_cmd_type(show_cmd_type) {}
3689
3690 Sql_cmd *make_cmd(THD *thd) override;
3691
3692 private:
3695};
3696
3697/// Parse tree node for SHOW FUNCTION CODE statement.
3698
3700 public:
3701 PT_show_function_code(const POS &pos, const sp_name *function_name)
3702 : PT_show_routine_code(pos, SQLCOM_SHOW_FUNC_CODE, function_name) {}
3703};
3704
3705/// Parse tree node for SHOW GRANTS statement.
3706
3707class PT_show_grants final : public PT_show_base {
3708 public:
3709 PT_show_grants(const POS &pos, const LEX_USER *opt_for_user,
3710 const List<LEX_USER> *opt_using_users)
3712 sql_cmd(opt_for_user, opt_using_users) {
3713 assert(opt_using_users == nullptr || opt_for_user != nullptr);
3714 }
3715
3716 Sql_cmd *make_cmd(THD *thd) override;
3717
3718 private:
3720};
3721
3722/// Parse tree node for SHOW INDEX statement.
3723
3724class PT_show_keys final : public PT_show_table_base {
3725 public:
3726 PT_show_keys(const POS &pos, bool extended_show, Table_ident *table,
3727 Item *where)
3729 m_extended_show(extended_show) {}
3730
3731 Sql_cmd *make_cmd(THD *thd) override;
3732
3733 private:
3735
3736 // Flag to indicate EXTENDED keyword usage in the statement.
3739};
3740
3741/// Parse tree node for SHOW BINARY LOG STATUS statement
3742
3744 public:
3747
3748 Sql_cmd *make_cmd(THD *thd) override;
3749
3750 private:
3752};
3753
3754/// Parse tree node for SHOW OPEN TABLES statement
3755
3757 public:
3758 PT_show_open_tables(const POS &pos, char *opt_db, const LEX_STRING &wild,
3759 Item *where)
3761 }
3762
3763 Sql_cmd *make_cmd(THD *thd) override;
3764
3765 private:
3767};
3768
3769/// Parse tree node for SHOW PLUGINS statement
3770
3771class PT_show_plugins final : public PT_show_base {
3772 public:
3774
3775 Sql_cmd *make_cmd(THD *thd) override;
3776
3777 private:
3779};
3780
3781/// Parse tree node for SHOW PRIVILEGES statement
3782
3783class PT_show_privileges final : public PT_show_base {
3784 public:
3787
3788 Sql_cmd *make_cmd(THD *thd) override;
3789
3790 private:
3792};
3793
3794/// Parse tree node for SHOW PARSE_TREE statement
3795
3796class PT_show_parse_tree final : public PT_show_base {
3797 public:
3798 PT_show_parse_tree(const POS &pos, Parse_tree_root *parse_tree_stmt)
3800 m_parse_tree_stmt(parse_tree_stmt) {}
3801
3802 Sql_cmd *make_cmd(THD *thd) override;
3803
3804 private:
3807};
3808
3809/// Parse tree node for SHOW FUNCTION CODE statement.
3810
3812 public:
3813 PT_show_procedure_code(const POS &pos, const sp_name *procedure_name)
3814 : PT_show_routine_code(pos, SQLCOM_SHOW_PROC_CODE, procedure_name) {}
3815};
3816
3817/// Parse tree node for SHOW PROCESSLIST statement
3818
3819class PT_show_processlist final : public PT_show_base {
3820 public:
3823
3824 Sql_cmd *make_cmd(THD *thd) override;
3825
3826 private:
3828};
3829
3830/// Parse tree node for SHOW PROFILE statement
3831
3832class PT_show_profile final : public PT_show_base {
3833 public:
3834 PT_show_profile(const POS &pos, uint opt_profile_options = 0,
3835 my_thread_id opt_query_id = 0,
3836 PT_limit_clause *opt_limit_clause = nullptr)
3838 m_opt_profile_options(opt_profile_options),
3839 m_opt_query_id(opt_query_id),
3840 m_opt_limit_clause(opt_limit_clause) {}
3841
3842 Sql_cmd *make_cmd(THD *thd) override;
3843
3844 private:
3848
3850};
3851
3852/// Parse tree node for SHOW PROFILES statement
3853
3854class PT_show_profiles final : public PT_show_base {
3855 public:
3857
3858 Sql_cmd *make_cmd(THD *thd) override;
3859
3860 private:
3862};
3863
3864/// Parse tree node for SHOW RELAYLOG EVENTS statement
3865
3867 public:
3869 const LEX_STRING opt_log_file_name = {},
3870 PT_limit_clause *opt_limit_clause = nullptr,
3871 LEX_CSTRING opt_channel_name = {})
3873 m_opt_log_file_name(opt_log_file_name),
3874 m_opt_limit_clause(opt_limit_clause),
3875 m_opt_channel_name(opt_channel_name) {}
3876
3877 Sql_cmd *make_cmd(THD *thd) override;
3878
3879 private:
3883
3885};
3886
3887/// Parse tree node for SHOW REPLICAS statement
3888
3889class PT_show_replicas final : public PT_show_base {
3890 public:
3892
3893 Sql_cmd *make_cmd(THD *thd) override;
3894
3895 private:
3897};
3898
3899/// Parse tree node for SHOW REPLICA STATUS statement
3900
3902 public:
3903 PT_show_replica_status(const POS &pos, LEX_CSTRING opt_channel_name = {})
3905 m_opt_channel_name(opt_channel_name) {}
3906
3907 Sql_cmd *make_cmd(THD *thd) override;
3908
3909 private:
3911
3913};
3914
3915/// Parse tree node for SHOW STATUS statement
3916
3918 public:
3919 PT_show_status(const POS &pos, enum_var_type var_type, const LEX_STRING &wild,
3920 Item *where)
3922 m_var_type(var_type) {
3924 }
3925
3926 Sql_cmd *make_cmd(THD *thd) override;
3927
3928 private:
3930
3932};
3933
3934/// Parse tree node for SHOW STATUS FUNCTION statement
3935
3937 public:
3938 PT_show_status_func(const POS &pos, const LEX_STRING &wild, Item *where)
3940
3941 Sql_cmd *make_cmd(THD *thd) override;
3942
3943 private:
3945};
3946
3947/// Parse tree node for SHOW STATUS PROCEDURE statement
3948
3950 public:
3951 PT_show_status_proc(const POS &pos, const LEX_STRING &wild, Item *where)
3953
3954 Sql_cmd *make_cmd(THD *thd) override;
3955
3956 private:
3958};
3959
3960/// Parse tree node for SHOW TABLE STATUS statement
3961
3963 public:
3964 PT_show_table_status(const POS &pos, char *opt_db, const LEX_STRING &wild,
3965 Item *where)
3967 where) {}
3968
3969 Sql_cmd *make_cmd(THD *thd) override;
3970
3971 private:
3973};
3974
3975/// Parse tree node for SHOW TABLES statement
3976
3978 public:
3979 PT_show_tables(const POS &pos, Show_cmd_type show_cmd_type, char *opt_db,
3980 const LEX_STRING &wild, Item *where)
3982 m_show_cmd_type(show_cmd_type) {}
3983
3984 Sql_cmd *make_cmd(THD *thd) override;
3985
3986 private:
3988
3990};
3991
3992/// Parse tree node for SHOW TRIGGERS statement
3993
3995 public:
3996 PT_show_triggers(const POS &pos, bool full, char *opt_db,
3997 const LEX_STRING &wild, Item *where)
3999 m_full(full) {}
4000
4001 Sql_cmd *make_cmd(THD *thd) override;
4002
4003 private:
4005
4007};
4008
4009/// Parse tree node for SHOW VARIABLES statement
4010
4012 public:
4014 const LEX_STRING &wild, Item *where)
4016 m_var_type(var_type) {
4018 }
4019
4020 Sql_cmd *make_cmd(THD *thd) override;
4021
4022 private:
4024
4026};
4027
4028/// Parse tree node for SHOW WARNINGS statement
4029
4030class PT_show_warnings final : public PT_show_base {
4031 public:
4032 PT_show_warnings(const POS &pos, PT_limit_clause *opt_limit_clause = nullptr)
4034 m_opt_limit_clause(opt_limit_clause) {}
4035
4036 Sql_cmd *make_cmd(THD *thd) override;
4037
4038 private:
4040
4042};
4043
4046
4047 protected:
4048 explicit PT_alter_table_action(const POS &pos,
4050 : super(pos), flag(flag) {}
4051
4052 public:
4053 bool do_contextualize(Table_ddl_parse_context *pc) override;
4054
4055 protected:
4056 /**
4057 A routine used by the parser to decide whether we are specifying a full
4058 partitioning or if only partitions to add or to reorganize.
4059
4060 @retval true ALTER TABLE ADD/REORGANIZE PARTITION.
4061 @retval false Something else.
4062 */
4066 }
4067
4068 public:
4070};
4071
4074
4075 public:
4076 PT_alter_table_add_column(const POS &pos, const LEX_STRING &field_ident,
4077 PT_field_def_base *field_def,
4078 PT_table_constraint_def *opt_column_constraint,
4079 const char *opt_place)
4080 : super(pos, Alter_info::ALTER_ADD_COLUMN),
4081 m_column_def(POS(), field_ident, field_def, opt_column_constraint,
4082 opt_place) {}
4083
4086 }
4087
4088 private:
4089 PT_column_def m_column_def; // TODO: Position is not set.
4090};
4091
4094
4095 public:
4097 const POS &pos, const Mem_root_array<PT_table_element *> *columns)
4098 : super(pos, Alter_info::ALTER_ADD_COLUMN), m_columns(columns) {}
4099
4101 if (super::do_contextualize(pc)) return true;
4102
4103 for (auto *column : *m_columns)
4104 if (column->contextualize(pc)) return true;
4105
4106 return false;
4107 }
4108
4109 private:
4111};
4112
4115
4116 public:
4118 PT_table_constraint_def *constraint)
4119 : super(pos, Alter_info::ALTER_ADD_INDEX), m_constraint(constraint) {}
4120
4123 }
4124
4125 private:
4127};
4128
4131
4132 public:
4133 PT_alter_table_change_column(const POS &pos, const LEX_STRING &old_name,
4134 const LEX_STRING &new_name,
4135 PT_field_def_base *field_def,
4136 const char *opt_place)
4137 : super(pos, Alter_info::ALTER_CHANGE_COLUMN),
4138 m_old_name(old_name),
4139 m_new_name(new_name),
4140 m_field_def(field_def),
4141 m_opt_place(opt_place) {}
4142
4144 PT_field_def_base *field_def,
4145 const char *opt_place)
4146 : PT_alter_table_change_column(pos, name, name, field_def, opt_place) {}
4147
4148 bool do_contextualize(Table_ddl_parse_context *pc) override;
4149
4150 private:
4154 const char *m_opt_place;
4155};
4156
4159
4160 protected:
4162 Alter_info::Alter_info_flag alter_info_flag,
4163 const char *name)
4164 : super(pos, alter_info_flag), m_alter_drop(drop_type, name) {}
4165
4166 public:
4168 return (super::do_contextualize(pc) ||
4169 pc->alter_info->drop_list.push_back(&m_alter_drop));
4170 }
4171
4172 private:
4174};
4175
4177 public:
4178 explicit PT_alter_table_drop_column(const POS &pos, const char *name)
4179 : PT_alter_table_drop(pos, Alter_drop::COLUMN,
4180 Alter_info::ALTER_DROP_COLUMN, name) {}
4181};
4182
4184 public:
4185 explicit PT_alter_table_drop_foreign_key(const POS &pos, const char *name)
4187 Alter_info::DROP_FOREIGN_KEY, name) {}
4188};
4189
4191 public:
4192 explicit PT_alter_table_drop_key(const POS &pos, const char *name)
4193 : PT_alter_table_drop(pos, Alter_drop::KEY, Alter_info::ALTER_DROP_INDEX,
4194 name) {}
4195};
4196
4198 public:
4200 const char *name)
4201 : PT_alter_table_drop(pos, Alter_drop::CHECK_CONSTRAINT,
4202 Alter_info::DROP_CHECK_CONSTRAINT, name) {}
4203};
4204
4206 public:
4207 explicit PT_alter_table_drop_constraint(const POS &pos, const char *name)
4208 : PT_alter_table_drop(pos, Alter_drop::ANY_CONSTRAINT,
4209 Alter_info::DROP_ANY_CONSTRAINT, name) {}
4210};
4211
4214
4215 protected:
4217 const POS &pos, Alter_constraint_enforcement::Type alter_type,
4218 Alter_info::Alter_info_flag alter_info_flag, const char *name,
4219 bool is_enforced)
4220 : super(pos, alter_info_flag),
4221 m_constraint_enforcement(alter_type, name, is_enforced) {}
4222
4223 public:
4224 explicit PT_alter_table_enforce_constraint(const POS &pos, const char *name,
4225 bool is_enforced)
4226 : super(pos, is_enforced ? Alter_info::ENFORCE_ANY_CONSTRAINT
4227 : Alter_info::SUSPEND_ANY_CONSTRAINT),
4229 Alter_constraint_enforcement::Type::ANY_CONSTRAINT, name,
4230 is_enforced) {}
4231
4233 return (super::do_contextualize(pc) ||
4236 }
4237
4238 private:
4240};
4241
4244 public:
4246 const char *name,
4247 bool is_enforced)
4249 pos, Alter_constraint_enforcement::Type::CHECK_CONSTRAINT,
4250 is_enforced ? Alter_info::ENFORCE_CHECK_CONSTRAINT
4251 : Alter_info::SUSPEND_CHECK_CONSTRAINT,
4252 name, is_enforced) {}
4253};
4254
4257
4258 public:
4259 explicit PT_alter_table_enable_keys(const POS &pos, bool enable)
4260 : super(pos, Alter_info::ALTER_KEYS_ONOFF), m_enable(enable) {}
4261
4263 pc->alter_info->keys_onoff =
4265 return super::do_contextualize(pc);
4266 }
4267
4268 private:
4270};
4271
4274
4275 public:
4276 PT_alter_table_set_default(const POS &pos, const char *col_name,
4277 Item *opt_default_expr)
4278 : super(pos, Alter_info::ALTER_CHANGE_COLUMN_DEFAULT),
4279 m_name(col_name),
4280 m_expr(opt_default_expr) {}
4281
4282 bool do_contextualize(Table_ddl_parse_context *pc) override;
4283
4284 private:
4285 const char *m_name;
4287};
4288
4291
4292 public:
4293 PT_alter_table_column_visibility(const POS &pos, const char *col_name,
4294 bool is_visible)
4295 : super(pos, Alter_info::ALTER_COLUMN_VISIBILITY),
4296 m_alter_column(col_name, is_visible) {}
4297
4299 return (super::do_contextualize(pc) ||
4300 pc->alter_info->alter_list.push_back(&m_alter_column));
4301 }
4302
4303 private:
4305};
4306
4309
4310 public:
4311 PT_alter_table_index_visible(const POS &pos, const char *name, bool visible)
4312 : super(pos, Alter_info::ALTER_INDEX_VISIBILITY),
4313 m_alter_index_visibility(name, visible) {}
4314
4316 return (super::do_contextualize(pc) ||
4319 }
4320
4321 private:
4323};
4324
4327
4328 public:
4329 explicit PT_alter_table_rename(const POS &pos, const Table_ident *ident)
4330 : super(pos, Alter_info::ALTER_RENAME), m_ident(ident) {}
4331
4332 bool do_contextualize(Table_ddl_parse_context *pc) override;
4333
4334 bool is_rename_table() const override { return true; }
4335
4336 private:
4337 const Table_ident *const m_ident;
4338};
4339
4342
4343 public:
4344 PT_alter_table_rename_key(const POS &pos, const char *from, const char *to)
4345 : super(pos, Alter_info::ALTER_RENAME_INDEX), m_rename_key(from, to) {}
4346
4348 return super::do_contextualize(pc) ||
4350 }
4351
4352 private:
4354};
4355
4358
4359 public:
4360 PT_alter_table_rename_column(const POS &pos, const char *from, const char *to)
4361 : super(pos, Alter_info::ALTER_CHANGE_COLUMN),
4362 m_rename_column(from, to) {}
4363
4365 return super::do_contextualize(pc) ||
4366 pc->alter_info->alter_list.push_back(&m_rename_column);
4367 }
4368
4369 private:
4371};
4372
4375
4376 public:
4378 const CHARSET_INFO *opt_collation)
4379 : super(pos, Alter_info::ALTER_OPTIONS),
4381 m_collation(opt_collation) {}
4382
4383 bool do_contextualize(Table_ddl_parse_context *pc) override;
4384
4385 private:
4388};
4389
4392
4393 public:
4394 explicit PT_alter_table_force(const POS &pos)
4395 : super(pos, Alter_info::ALTER_RECREATE) {}
4396};
4397
4400
4401 public:
4402 explicit PT_alter_table_order(const POS &pos, PT_order_list *order)
4403 : super(pos, Alter_info::ALTER_ORDER), m_order(order) {}
4404
4405 bool do_contextualize(Table_ddl_parse_context *pc) override;
4406
4407 private:
4409};
4410
4413
4414 public:
4415 explicit PT_alter_table_partition_by(const POS &pos, PT_partition *partition)
4416 : super(pos, Alter_info::ALTER_PARTITION), m_partition(partition) {}
4417
4418 bool do_contextualize(Table_ddl_parse_context *pc) override;
4419
4420 private:
4422};
4423
4426
4427 public:
4429 : super(pos, Alter_info::ALTER_REMOVE_PARTITIONING) {}
4430};
4431
4434
4435 friend class PT_alter_table_standalone_stmt; // to access make_cmd()
4436
4437 protected:
4439 Alter_info::Alter_info_flag alter_info_flag)
4440 : super(pos, alter_info_flag) {}
4441
4442 private:
4444};
4445
4446/**
4447 Node for the @SQL{ALTER TABLE ADD PARTITION} statement
4448
4449 @ingroup ptn_alter_table
4450*/
4453
4454 public:
4455 explicit PT_alter_table_add_partition(const POS &pos, bool no_write_to_binlog)
4456 : super(pos, Alter_info::ALTER_ADD_PARTITION),
4457 m_no_write_to_binlog(no_write_to_binlog) {}
4458
4459 bool do_contextualize(Table_ddl_parse_context *pc) override;
4460
4462 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4463 }
4464
4465 protected:
4467
4468 private:
4470};
4471
4472/**
4473 Node for the @SQL{ALTER TABLE ADD PARTITION (@<partition list@>)} statement
4474
4475 @ingroup ptn_alter_table
4476*/
4480
4481 public:
4483 const POS &pos, bool no_write_to_binlog,
4485 : super(pos, no_write_to_binlog), m_def_list(def_list) {}
4486
4487 bool do_contextualize(Table_ddl_parse_context *pc) override;
4488
4489 private:
4491};
4492
4493/**
4494 Node for the @SQL{ALTER TABLE ADD PARTITION PARTITIONS (@<n>@)} statement
4495
4496 @ingroup ptn_alter_table
4497*/
4501
4502 public:
4503 PT_alter_table_add_partition_num(const POS &pos, bool no_write_to_binlog,
4504 uint num_parts)
4505 : super(pos, no_write_to_binlog) {
4506 m_part_info.num_parts = num_parts;
4507 }
4508};
4509
4513
4514 public:
4516 const List<String> &partitions)
4517 : super(pos, Alter_info::ALTER_DROP_PARTITION),
4518 m_partitions(partitions) {}
4519
4520 bool do_contextualize(Table_ddl_parse_context *pc) override;
4521
4523 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4524 }
4525
4526 private:
4528};
4529
4533
4534 public:
4536 const POS &pos, Alter_info::Alter_info_flag alter_info_flag,
4537 const List<String> *opt_partition_list)
4538 : super(pos, alter_info_flag), m_opt_partition_list(opt_partition_list) {}
4539
4541 assert(pc->alter_info->partition_names.is_empty());
4542 if (m_opt_partition_list == nullptr)
4544 else
4546 return super::do_contextualize(pc);
4547 }
4548
4549 private:
4551};
4552
4556
4557 public:
4558 PT_alter_table_rebuild_partition(const POS &pos, bool no_write_to_binlog,
4559 const List<String> *opt_partition_list)
4560 : super(pos, Alter_info::ALTER_REBUILD_PARTITION, opt_partition_list),
4561 m_no_write_to_binlog(no_write_to_binlog) {}
4562
4563 bool do_contextualize(Table_ddl_parse_context *pc) override;
4564
4566 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4567 }
4568
4569 private:
4571};
4572
4576
4577 public:
4578 PT_alter_table_optimize_partition(const POS &pos, bool no_write_to_binlog,
4579 const List<String> *opt_partition_list)
4580 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4581 m_no_write_to_binlog(no_write_to_binlog) {}
4582
4583 bool do_contextualize(Table_ddl_parse_context *pc) override;
4584
4586 return new (pc->mem_root)
4588 }
4589
4590 private:
4592};
4593
4597
4598 public:
4599 PT_alter_table_analyze_partition(const POS &pos, bool no_write_to_binlog,
4600 const List<String> *opt_partition_list)
4601 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4602 m_no_write_to_binlog(no_write_to_binlog) {}
4603
4604 bool do_contextualize(Table_ddl_parse_context *pc) override;
4606 return new (pc->mem_root)
4608 }
4609
4610 private:
4612};
4613
4617
4618 public:
4620 const List<String> *opt_partition_list,
4621 uint flags, uint sql_flags)
4622 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4623 m_flags(flags),
4624 m_sql_flags(sql_flags) {}
4625
4626 bool do_contextualize(Table_ddl_parse_context *pc) override;
4627
4629 return new (pc->mem_root)
4631 }
4632
4633 private:
4636};
4637
4641
4642 public:
4643 PT_alter_table_repair_partition(const POS &pos, bool no_write_to_binlog,
4644 const List<String> *opt_partition_list,
4645 uint flags, uint sql_flags)
4646 : super(pos, Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4647 m_no_write_to_binlog(no_write_to_binlog),
4648 m_flags(flags),
4649 m_sql_flags(sql_flags) {}
4650
4651 bool do_contextualize(Table_ddl_parse_context *pc) override;
4652
4654 return new (pc->mem_root)
4656 }
4657
4658 private:
4662};
4663
4667
4668 public:
4669 PT_alter_table_coalesce_partition(const POS &pos, bool no_write_to_binlog,
4670 uint num_parts)
4671 : super(pos, Alter_info::ALTER_COALESCE_PARTITION),
4672 m_no_write_to_binlog(no_write_to_binlog),
4673 m_num_parts(num_parts) {}
4674
4675 bool do_contextualize(Table_ddl_parse_context *pc) override;
4676
4678 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4679 }
4680
4681 private:
4683 const uint m_num_parts;
4684};
4685
4689
4690 public:
4692 const POS &pos, const List<String> *opt_partition_list)
4693 : super(pos,
4694 static_cast<Alter_info::Alter_info_flag>(
4695 Alter_info::ALTER_ADMIN_PARTITION |
4696 Alter_info::ALTER_TRUNCATE_PARTITION),
4697 opt_partition_list) {}
4698
4699 bool do_contextualize(Table_ddl_parse_context *pc) override;
4700
4702 return new (pc->mem_root)
4704 }
4705};
4706
4710
4711 public:
4713 bool no_write_to_binlog)
4714 : super(pos, Alter_info::ALTER_TABLE_REORG),
4715 m_no_write_to_binlog(no_write_to_binlog) {}
4716
4717 bool do_contextualize(Table_ddl_parse_context *pc) override;
4718
4720 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4721 }
4722
4723 private:
4726};
4727
4731
4732 public:
4734 const POS &pos, bool no_write_to_binlog,
4735 const List<String> &partition_names,
4737 : super(pos, Alter_info::ALTER_REORGANIZE_PARTITION),
4738 m_no_write_to_binlog(no_write_to_binlog),
4739 m_partition_names(partition_names),
4740 m_into(into) {}
4741
4742 bool do_contextualize(Table_ddl_parse_context *pc) override;
4743
4745 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4746 }
4747
4748 private:
4753};
4754
4758
4759 public:
4761 const LEX_STRING &partition_name,
4764 : super(pos, Alter_info::ALTER_EXCHANGE_PARTITION),
4765 m_partition_name(partition_name),
4767 m_validation(validation) {}
4768
4769 bool do_contextualize(Table_ddl_parse_context *pc) override;
4770
4772 return new (pc->mem_root)
4774 }
4775
4776 private:
4780};
4781
4785
4787
4788 public:
4790 const POS &pos, const List<String> *opt_use_partition = nullptr)
4791 : super(pos, Alter_info::ALTER_SECONDARY_LOAD),
4793
4795 if (opt_use_partition != nullptr)
4797
4799 }
4800};
4801
4805
4807
4808 public:
4810 const POS &pos, const List<String> *opt_use_partition = nullptr)
4811 : super(pos, Alter_info::ALTER_SECONDARY_UNLOAD),
4813
4815 if (opt_use_partition != nullptr)
4817
4819 }
4820};
4821
4825
4826 public:
4828 const POS &pos, const List<String> *opt_partition_list)
4829 : super(pos, Alter_info::ALTER_DISCARD_TABLESPACE, opt_partition_list) {}
4830
4833 }
4834};
4835
4839
4840 public:
4842 const POS &pos, const List<String> *opt_partition_list)
4843 : super(pos, Alter_info::ALTER_IMPORT_TABLESPACE, opt_partition_list) {}
4844
4847 }
4848};
4849
4853
4854 public:
4856 : super(pos, Alter_info::ALTER_DISCARD_TABLESPACE) {}
4857
4860 }
4861};
4862
4866
4867 public:
4869 : super(pos, Alter_info::ALTER_IMPORT_TABLESPACE) {}
4870
4873 }
4874};
4875
4877 public:
4886 m_opt_actions(opt_actions),
4887 m_algo(algo),
4888 m_lock(lock),
4889 m_validation(validation) {}
4890
4891 Sql_cmd *make_cmd(THD *thd) override;
4892
4893 private:
4899
4901};
4902
4904 public:
4914 m_algo(algo),
4915 m_lock(lock),
4916 m_validation(validation) {}
4917
4918 Sql_cmd *make_cmd(THD *thd) override;
4919
4920 private:
4926
4928};
4929
4931 public:
4933 bool no_write_to_binlog,
4935 decltype(HA_CHECK_OPT::flags) flags,
4936 decltype(HA_CHECK_OPT::sql_flags) sql_flags)
4938 m_no_write_to_binlog(no_write_to_binlog),
4939 m_table_list(table_list),
4940 m_flags(flags),
4941 m_sql_flags(sql_flags) {}
4942
4943 Sql_cmd *make_cmd(THD *thd) override;
4944
4945 private:
4950};
4951
4953 public:
4955 bool no_write_to_binlog,
4958 int num_buckets, List<String> *columns, LEX_STRING data,
4959 bool auto_update)
4961 m_no_write_to_binlog(no_write_to_binlog),
4962 m_table_list(table_list),
4964 m_num_buckets(num_buckets),
4965 m_columns(columns),
4966 m_data{data},
4967 m_auto_update(auto_update) {}
4968
4969 Sql_cmd *make_cmd(THD *thd) override;
4970
4971 private:
4975 const int m_num_buckets;
4978 const bool m_auto_update;
4979};
4980
4982 public:
4985 decltype(HA_CHECK_OPT::flags) flags,
4986 decltype(HA_CHECK_OPT::sql_flags) sql_flags)
4988 m_table_list(table_list),
4989 m_flags(flags),
4990 m_sql_flags(sql_flags) {}
4991
4992 Sql_cmd *make_cmd(THD *thd) override;
4993
4994 private:
4998};
4999
5001 public:
5003 bool no_write_to_binlog,
5006 m_no_write_to_binlog(no_write_to_binlog),
5007 m_table_list(table_list) {}
5008
5009 Sql_cmd *make_cmd(THD *thd) override;
5010
5013};
5014
5016 public:
5017 PT_drop_index_stmt(const POS &pos, MEM_ROOT *mem_root, const char *index_name,
5022 m_index_name(index_name),
5023 m_table(table),
5024 m_algo(algo),
5025 m_lock(lock),
5027
5028 Sql_cmd *make_cmd(THD *thd) override;
5029
5030 private:
5031 const char *m_index_name;
5035
5037};
5038
5040 public:
5042 : Parse_tree_root(pos), m_table(table) {}
5043
5044 Sql_cmd *make_cmd(THD *thd) override;
5045
5046 private:
5048
5050};
5051
5054
5055 public:
5057 List<Index_hint> *index_hints)
5058 : super(pos), m_table(table), m_index_hints(index_hints) {}
5059
5060 bool do_contextualize(Table_ddl_parse_context *pc) override;
5061
5062 private:
5065};
5066
5067class PT_adm_partition final : public Table_ddl_node {
5069
5070 public:
5071 explicit PT_adm_partition(const POS &pos, List<String> *opt_partitions)
5072 : super(pos), m_opt_partitions(opt_partitions) {}
5073
5074 bool do_contextualize(Table_ddl_parse_context *pc) override;
5075
5076 private:
5078};
5079
5081 public:
5084 LEX_CSTRING key_cache_name)
5086 m_tbl_index_lists(tbl_index_lists),
5087 m_key_cache_name(key_cache_name) {}
5088
5089 Sql_cmd *make_cmd(THD *thd) override;
5090
5091 private:
5094};
5095
5097 public:
5100 PT_adm_partition *partitions,
5101 List<Index_hint> *opt_key_usage_list,
5102 LEX_CSTRING key_cache_name)
5104 m_table(table),
5105 m_partitions(partitions),
5106 m_opt_key_usage_list(opt_key_usage_list),
5107 m_key_cache_name(key_cache_name) {}
5108
5109 Sql_cmd *make_cmd(THD *thd) override;
5110
5111 private:
5116};
5117
5118class PT_preload_keys final : public Table_ddl_node {
5120
5121 public:
5123 List<Index_hint> *opt_cache_key_list, bool ignore_leaves)
5124 : super(pos),
5125 m_table(table),
5126 m_opt_cache_key_list(opt_cache_key_list),
5127 m_ignore_leaves(ignore_leaves) {}
5128
5129 bool do_contextualize(Table_ddl_parse_context *pc) override;
5130
5131 private:
5135};
5136
5138 public:
5141 PT_adm_partition *partitions,
5142 List<Index_hint> *opt_cache_key_list,
5143 bool ignore_leaves)
5145 m_table(table),
5146 m_partitions(partitions),
5147 m_opt_cache_key_list(opt_cache_key_list),
5148 m_ignore_leaves(ignore_leaves) {}
5149
5150 Sql_cmd *make_cmd(THD *thd) override;
5151
5152 private:
5157};
5158
5160 public:
5163 : PT_table_ddl_stmt_base(pos, mem_root), m_preload_list(preload_list) {}
5164
5165 Sql_cmd *make_cmd(THD *thd) override;
5166
5167 private:
5169};
5170
5173
5174 public:
5177 bool do_contextualize(Parse_context *pc) override;
5178 Json_table_column *get_column() override { return m_column.get(); }
5179
5180 private:
5182 const char *m_name;
5183};
5184
5187
5188 public:
5193
5194 bool do_contextualize(Parse_context *pc) override;
5195
5196 Json_table_column *get_column() override { return m_column.get(); }
5197
5198 private:
5200 const char *m_name;
5203};
5204
5206 : public PT_json_table_column {
5208
5209 public:
5211 const POS &pos, Item *path,
5213 : super(pos), m_path(path), m_nested_columns(nested_cols) {}
5214
5215 bool do_contextualize(Parse_context *pc) override;
5216
5217 Json_table_column *get_column() override { return m_column; }
5218
5219 private:
5223};
5224
5226 public Tablespace_options {
5227 THD *const thd;
5229
5231 bool show_parse_tree = false);
5232};
5233
5236
5237template <typename Option_type, Option_type Tablespace_options::*Option>
5239 : public PT_alter_tablespace_option_base /* purecov: inspected */
5240{
5242
5243 public:
5244 explicit PT_alter_tablespace_option(const POS &pos, Option_type value)
5245 : super(pos), m_value(value) {}
5246
5248 pc->*Option = m_value;
5249 return super::do_contextualize(pc);
5250 }
5251
5252 private:
5253 const Option_type m_value;
5254};
5255
5260
5264
5268
5272
5277
5282
5287
5291
5293 : public PT_alter_tablespace_option_base /* purecov: inspected */
5294{
5297
5298 public:
5300 option_type nodegroup_id)
5301 : super(pos), m_nodegroup_id(nodegroup_id) {}
5302
5304
5305 private:
5307};
5308
5310 : public PT_alter_tablespace_option_base /* purecov: inspected */
5311{
5314
5315 public:
5318 : super(pos), m_comment(comment) {}
5319
5322 return true; /* purecov: inspected */ // OOM
5323
5324 if (pc->ts_comment.str) {
5325 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "COMMENT");
5326 return true;
5327 }
5328 pc->ts_comment = m_comment;
5329 return false;
5330 }
5331
5332 private:
5334};
5335
5337 : public PT_alter_tablespace_option_base /* purecov: inspected */
5338{
5341
5342 public:
5344 option_type engine_name)
5345 : super(pos), m_engine_name(engine_name) {}
5346
5349 return true; /* purecov: inspected */ // OOM
5350
5351 if (pc->engine_name.str) {
5352 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "STORAGE ENGINE");
5353 return true;
5354 }
5356 return false;
5357 }
5358
5359 private:
5361};
5362
5364 : public PT_alter_tablespace_option_base /* purecov: inspected */
5365{
5368
5369 public:
5371 const POS &pos, option_type file_block_size)
5372 : super(pos), m_file_block_size(file_block_size) {}
5373
5376 return true; /* purecov: inspected */ // OOM
5377
5378 if (pc->file_block_size != 0) {
5379 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "FILE_BLOCK_SIZE");
5380 return true;
5381 }
5383 return false;
5384 }
5385
5386 private:
5388};
5389
5390/**
5391 Parse tree node for CREATE RESOURCE GROUP statement.
5392*/
5393
5396 const bool has_priority;
5397
5398 public:
5400 const POS &pos, const LEX_CSTRING &name, const resourcegroups::Type type,
5402 const Value_or_default<int> &opt_priority, bool enabled)
5403 : Parse_tree_root(pos),
5404 sql_cmd(name, type, cpu_list,
5405 opt_priority.is_default ? 0 : opt_priority.value, enabled),
5406 has_priority(!opt_priority.is_default) {}
5407
5408 Sql_cmd *make_cmd(THD *thd) override;
5409};
5410
5411/**
5412 Parse tree node for ALTER RESOURCE GROUP statement.
5413*/
5414
5417
5418 public:
5421 const Value_or_default<int> &opt_priority,
5422 const Value_or_default<bool> &enable, bool force)
5423 : Parse_tree_root(pos),
5424 sql_cmd(name, cpu_list,
5425 opt_priority.is_default ? 0 : opt_priority.value,
5426 enable.is_default ? false : enable.value, force,
5427 !enable.is_default) {}
5428
5429 Sql_cmd *make_cmd(THD *thd) override;
5430};
5431
5432/**
5433 Parse tree node for DROP RESOURCE GROUP statement.
5434*/
5435
5438
5439 public:
5440 PT_drop_resource_group(const POS &pos, const LEX_CSTRING &resource_group_name,
5441 bool force)
5442 : Parse_tree_root(pos), sql_cmd(resource_group_name, force) {}
5443
5444 Sql_cmd *make_cmd(THD *thd) override;
5445};
5446
5447/**
5448 Parse tree node for SET RESOURCE GROUP statement.
5449*/
5450
5453
5454 public:
5456 Mem_root_array<ulonglong> *thread_id_list)
5457 : Parse_tree_root(pos), sql_cmd(name, thread_id_list) {}
5458
5459 Sql_cmd *make_cmd(THD *thd) override;
5460};
5461
5463 public:
5465 : Parse_tree_root(pos), m_cmd(thread_id) {}
5466
5467 Sql_cmd *make_cmd(THD *thd) override;
5468
5469 private:
5471};
5472
5474 public:
5475 PT_explain(const POS &pos, Explain_format_type format, bool is_analyze,
5476 bool is_explicit_format, Parse_tree_root *explainable_stmt,
5477 std::optional<std::string_view> explain_into_variable_name,
5478 LEX_CSTRING schema_name_for_explain)
5479 : Parse_tree_root(pos),
5480 m_format(format),
5481 m_analyze(is_analyze),
5482 m_explicit_format(is_explicit_format),
5483 m_explainable_stmt(explainable_stmt),
5484 m_explain_into_variable_name(explain_into_variable_name),
5485 m_schema_name_for_explain(schema_name_for_explain) {}
5486
5487 Sql_cmd *make_cmd(THD *thd) override;
5488
5489 private:
5491 const bool m_analyze;
5494 std::optional<std::string_view> m_explain_into_variable_name;
5496};
5497
5498class PT_load_table final : public Parse_tree_root {
5499 public:
5500 PT_load_table(const POS &pos, enum_filetype filetype, thr_lock_type lock_type,
5501 bool is_local_file, enum_source_type source_type,
5502 const LEX_STRING filename, ulong file_count, bool in_key_order,
5503 On_duplicate on_duplicate, Table_ident *table,
5504 List<String> *opt_partitions, const CHARSET_INFO *opt_charset,
5505 LEX_CSTRING compression_algorithm,
5506 String *opt_xml_rows_identified_by,
5507 const Field_separators &opt_field_separators,
5508 const Line_separators &opt_line_separators,
5509 ulong opt_ignore_lines, PT_item_list *opt_fields_or_vars,
5510 PT_item_list *opt_set_fields, PT_item_list *opt_set_exprs,
5511 List<String> *opt_set_expr_strings, ulong parallel,
5512 ulonglong memory_size, bool is_bulk_operation)
5513 : Parse_tree_root(pos),
5514 m_cmd(filetype, is_local_file, source_type, filename, file_count,
5515 in_key_order, on_duplicate, table, opt_partitions, opt_charset,
5516 compression_algorithm, opt_xml_rows_identified_by,
5517 opt_field_separators, opt_line_separators, opt_ignore_lines,
5518 opt_fields_or_vars ? &opt_fields_or_vars->value : nullptr,
5519 opt_set_fields ? &opt_set_fields->value : nullptr,
5520 opt_set_exprs ? &opt_set_exprs->value : nullptr,
5521 opt_set_expr_strings, parallel, memory_size, is_bulk_operation),
5522 m_lock_type(lock_type) {
5523 assert((opt_set_fields == nullptr) ^ (opt_set_exprs != nullptr));
5524 assert(opt_set_fields == nullptr ||
5525 opt_set_fields->value.size() == opt_set_exprs->value.size());
5526 }
5527
5528 Sql_cmd *make_cmd(THD *thd) override;
5529
5530 private:
5532
5534};
5535
5536/**
5537 Top-level node for the SHUTDOWN statement
5538
5539 @ingroup ptn_stmt
5540*/
5541
5543 public:
5544 Sql_cmd *make_cmd(THD *thd) override;
5545
5546 private:
5548};
5549
5551 private:
5554
5555 public:
5556 PT_install_component(const POS &pos, THD *thd,
5559 Sql_cmd *make_cmd(THD *thd) override;
5560};
5561
5563 LEX_CSTRING);
5564
5567 LEX_CSTRING);
5568
5571 LEX_CSTRING);
5572
5575 LEX_CSTRING);
5576
5577/**
5578 Helper function to imitate \c dynamic_cast for \c PT_set_operation hierarchy.
5579
5580 Template parameter @p To is the destination type (@c PT_union, \c PT_except or
5581 \c PT_intersect). For \c PT_intersect we return nullptr if ALL due to impl.
5582 restriction: we cannot merge INTERSECT ALL.
5583
5584 @param from source item
5585 @param is_distinct true if distinct
5586 @return typecast item to the type To or NULL
5587*/
5588template <class To, PT_set_operation::Setop_type Tag>
5589To *setop_cast(PT_query_expression_body *from, bool is_distinct) {
5590 return (from->type() == Tag &&
5591 down_cast<PT_set_operation *>(from)->is_distinct() == is_distinct &&
5592 (Tag != PT_query_expression_body::INTERSECT || is_distinct))
5593 ? static_cast<To *>(from)
5594 : nullptr;
5595}
5596
5597/**
5598 Flatten set operators at parse time
5599
5600 This function flattens UNION ALL/DISTINCT, EXCEPT All/DISTINCT
5601 and INTERSECT DISTINCT (not ALL due to implementation restrictions) operators
5602 at parse time if applicable, otherwise it creates
5603 new \c PT_<setop> nodes respectively of the two input operands.
5604
5605 Template parameter @p Class is @c PT_union or @c PT_intersect
5606 Template parameter @p Tag is @c PT_query_specification::UNION or
5607 @c ::INTERSECT
5608
5609 @param mem_root MEM_ROOT
5610 @param pos parse location
5611 @param left left argument of the operator
5612 @param is_distinct true if DISTINCT
5613 @param right right argument of the operator
5614 @param is_right_in_parentheses
5615 true if right hand size is parenthesized
5616 @return resulting parse tree Item
5617*/
5618template <class Class, PT_set_operation::Setop_type Tag>
5621 bool is_distinct,
5623 bool is_right_in_parentheses) {
5624 if (left == nullptr || right == nullptr) return nullptr;
5625 Class *left_setop = setop_cast<Class, Tag>(left, is_distinct);
5626 Class *right_setop [[maybe_unused]] =
5627 setop_cast<Class, Tag>(right, is_distinct);
5628 assert(right_setop == nullptr); // doesn't happen
5629 if (left_setop != nullptr) {
5630 // X1 op X2 op Y ==> op (X1, X2, Y)
5631 left_setop->m_list.push_back(right);
5632 left_setop->set_is_rhs_in_parentheses(is_right_in_parentheses);
5633 return left_setop;
5634 } else {
5635 /* X op Y */
5636 return new (mem_root)
5637 Class(pos, left, is_distinct, right, is_right_in_parentheses);
5638 }
5639}
5640
5641#endif /* PARSE_TREE_NODES_INCLUDED */
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
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:184
Type
Definition: sql_alter.h:186
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:148
Data describing the table being created by CREATE TABLE or altered by ALTER TABLE.
Definition: sql_alter.h:205
enum_alter_table_algorithm
The different values of the ALGORITHM clause.
Definition: sql_alter.h:355
enum_alter_table_lock
The different values of the LOCK clause.
Definition: sql_alter.h:373
Mem_root_array< const Alter_drop * > drop_list
Columns, keys and constraints to be dropped.
Definition: sql_alter.h:405
Mem_root_array< const Alter_constraint_enforcement * > alter_constraint_enforcement_list
List of check constraints whose enforcement state is changed.
Definition: sql_alter.h:419
List< String > partition_names
Definition: sql_alter.h:433
enum_with_validation
Status of validation clause in ALTER TABLE statement.
Definition: sql_alter.h:391
@ ENABLE
Definition: sql_alter.h:349
@ DISABLE
Definition: sql_alter.h:349
Mem_root_array< const Alter_column * > alter_list
Definition: sql_alter.h:407
enum_enable_or_disable keys_onoff
Definition: sql_alter.h:431
ulonglong flags
Definition: sql_alter.h:429
Mem_root_array< const Alter_rename_key * > alter_rename_key_list
Definition: sql_alter.h:412
Alter_info_flag
Definition: sql_alter.h:216
@ ALTER_ADD_PARTITION
Set for ADD PARTITION.
Definition: sql_alter.h:255
@ ALTER_REORGANIZE_PARTITION
Set for REORGANIZE PARTITION ... INTO.
Definition: sql_alter.h:264
@ ALTER_ALL_PARTITION
Set for partitioning operations specifying ALL keyword.
Definition: sql_alter.h:280
@ ALTER_OPTIONS
Set for table_options.
Definition: sql_alter.h:241
Mem_root_array< const Alter_index_visibility * > alter_index_visibility_list
Indexes whose visibilities are to be changed.
Definition: sql_alter.h:415
Class which instances represent RENAME INDEX clauses in ALTER TABLE statement.
Definition: sql_alter.h:170
After parsing, a Common Table Expression is accessed through a Table_ref.
Definition: table.h:4428
Definition: key.h:43
Definition: item.h:6857
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:936
Represents a JSON container value of type "object" (ECMA), type J_OBJECT here.
Definition: json_dom.h:369
bool add_alias(const std::string &key, Json_dom *value)
Insert the value into the object.
Definition: json_dom.h:411
Column description for JSON_TABLE function.
Definition: table_function.h:236
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
Definition: sql_list.h:467
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:61
size_t size() const
Definition: mem_root_array.h:407
void init_empty_const()
Initialize empty array that we aren't going to grow.
Definition: mem_root_array.h:84
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:426
Definition: parse_tree_nodes.h:5067
List< String > * m_opt_partitions
Definition: parse_tree_nodes.h:5077
Table_ddl_node super
Definition: parse_tree_nodes.h:5068
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3413
PT_adm_partition(const POS &pos, List< String > *opt_partitions)
Definition: parse_tree_nodes.h:5071
Top-level node for the ALTER INSTANCE statement.
Definition: parse_tree_nodes.h:2227
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4610
PT_alter_instance(const POS &pos, enum alter_instance_action_enum alter_instance_action, const LEX_CSTRING &channel)
Definition: parse_tree_nodes.h:2231
Sql_cmd_alter_instance sql_cmd
Definition: parse_tree_nodes.h:2228
Parse tree node for ALTER RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5415
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4917
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:5419
resourcegroups::Sql_cmd_alter_resource_group sql_cmd
Definition: parse_tree_nodes.h:5416
Definition: parse_tree_nodes.h:4044
PT_ddl_table_option super
Definition: parse_tree_nodes.h:4045
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:4063
const Alter_info::Alter_info_flag flag
Definition: parse_tree_nodes.h:4069
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4731
PT_alter_table_action(const POS &pos, Alter_info::Alter_info_flag flag)
Definition: parse_tree_nodes.h:4048
Definition: parse_tree_nodes.h:4072
PT_alter_table_action super
Definition: parse_tree_nodes.h:4073
PT_column_def m_column_def
Definition: parse_tree_nodes.h:4089
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:4076
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4084
Definition: parse_tree_nodes.h:4092
const Mem_root_array< PT_table_element * > * m_columns
Definition: parse_tree_nodes.h:4110
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4100
PT_alter_table_action super
Definition: parse_tree_nodes.h:4093
PT_alter_table_add_columns(const POS &pos, const Mem_root_array< PT_table_element * > *columns)
Definition: parse_tree_nodes.h:4096
Definition: parse_tree_nodes.h:4113
PT_alter_table_action super
Definition: parse_tree_nodes.h:4114
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4121
PT_table_constraint_def * m_constraint
Definition: parse_tree_nodes.h:4126
PT_alter_table_add_constraint(const POS &pos, PT_table_constraint_def *constraint)
Definition: parse_tree_nodes.h:4117
Node for the ALTER TABLE ADD PARTITION (<partition list>) statement.
Definition: parse_tree_nodes.h:4478
PT_alter_table_add_partition super
Definition: parse_tree_nodes.h:4479
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3152
const Mem_root_array< PT_part_definition * > * m_def_list
Definition: parse_tree_nodes.h:4490
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:4482
Node for the ALTER TABLE ADD PARTITION PARTITIONS (<n>@) statement.
Definition: parse_tree_nodes.h:4499
PT_alter_table_add_partition_num(const POS &pos, bool no_write_to_binlog, uint num_parts)
Definition: parse_tree_nodes.h:4503
PT_alter_table_add_partition super
Definition: parse_tree_nodes.h:4500
Node for the ALTER TABLE ADD PARTITION statement.
Definition: parse_tree_nodes.h:4451
PT_alter_table_add_partition(const POS &pos, bool no_write_to_binlog)
Definition: parse_tree_nodes.h:4455
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4469
partition_info m_part_info
Definition: parse_tree_nodes.h:4466
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) final
Definition: parse_tree_nodes.h:4461
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4785
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4452
Definition: parse_tree_nodes.h:4595
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4596
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4605
PT_alter_table_analyze_partition(const POS &pos, bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4599
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4819
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4611
Definition: parse_tree_nodes.h:4129
const LEX_STRING m_old_name
Definition: parse_tree_nodes.h:4151
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:4133
const LEX_STRING m_new_name
Definition: parse_tree_nodes.h:4152
const char * m_opt_place
Definition: parse_tree_nodes.h:4154
PT_field_def_base * m_field_def
Definition: parse_tree_nodes.h:4153
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3064
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:4143
PT_alter_table_action super
Definition: parse_tree_nodes.h:4130
Definition: parse_tree_nodes.h:4615
PT_alter_table_check_partition(const POS &pos, const List< String > *opt_partition_list, uint flags, uint sql_flags)
Definition: parse_tree_nodes.h:4619
uint m_sql_flags
Definition: parse_tree_nodes.h:4635
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4826
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4628
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4616
uint m_flags
Definition: parse_tree_nodes.h:4634
Definition: parse_tree_nodes.h:4665
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4682
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4666
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4677
PT_alter_table_coalesce_partition(const POS &pos, bool no_write_to_binlog, uint num_parts)
Definition: parse_tree_nodes.h:4669
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4849
const uint m_num_parts
Definition: parse_tree_nodes.h:4683
Definition: parse_tree_nodes.h:4289
Alter_column m_alter_column
Definition: parse_tree_nodes.h:4304
PT_alter_table_action super
Definition: parse_tree_nodes.h:4290
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4298
PT_alter_table_column_visibility(const POS &pos, const char *col_name, bool is_visible)
Definition: parse_tree_nodes.h:4293
Definition: parse_tree_nodes.h:4373
PT_alter_table_action super
Definition: parse_tree_nodes.h:4374
const CHARSET_INFO *const m_charset
Definition: parse_tree_nodes.h:4386
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3120
const CHARSET_INFO *const m_collation
Definition: parse_tree_nodes.h:4387
PT_alter_table_convert_to_charset(const POS &pos, const CHARSET_INFO *charset, const CHARSET_INFO *opt_collation)
Definition: parse_tree_nodes.h:4377
Definition: parse_tree_nodes.h:4823
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4831
PT_alter_table_discard_partition_tablespace(const POS &pos, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4827
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4824
Definition: parse_tree_nodes.h:4851
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4858
PT_alter_table_discard_tablespace(const POS &pos)
Definition: parse_tree_nodes.h:4855
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4852
Definition: parse_tree_nodes.h:4197
PT_alter_table_drop_check_constraint(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4199
Definition: parse_tree_nodes.h:4176
PT_alter_table_drop_column(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4178
Definition: parse_tree_nodes.h:4205
PT_alter_table_drop_constraint(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4207
Definition: parse_tree_nodes.h:4183
PT_alter_table_drop_foreign_key(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4185
Definition: parse_tree_nodes.h:4190
PT_alter_table_drop_key(const POS &pos, const char *name)
Definition: parse_tree_nodes.h:4192
Definition: parse_tree_nodes.h:4511
const List< String > m_partitions
Definition: parse_tree_nodes.h:4527
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4796
PT_alter_table_drop_partition(const POS &pos, const List< String > &partitions)
Definition: parse_tree_nodes.h:4515
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4512
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) final
Definition: parse_tree_nodes.h:4522
Definition: parse_tree_nodes.h:4157
PT_alter_table_action super
Definition: parse_tree_nodes.h:4158
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:4161
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4167
Alter_drop m_alter_drop
Definition: parse_tree_nodes.h:4173
Definition: parse_tree_nodes.h:4255
PT_alter_table_action super
Definition: parse_tree_nodes.h:4256
PT_alter_table_enable_keys(const POS &pos, bool enable)
Definition: parse_tree_nodes.h:4259
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4262
bool m_enable
Definition: parse_tree_nodes.h:4269
Definition: parse_tree_nodes.h:4243
PT_alter_table_enforce_check_constraint(const POS &pos, const char *name, bool is_enforced)
Definition: parse_tree_nodes.h:4245
Definition: parse_tree_nodes.h:4212
PT_alter_table_action super
Definition: parse_tree_nodes.h:4213
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4232
Alter_constraint_enforcement m_constraint_enforcement
Definition: parse_tree_nodes.h:4239
PT_alter_table_enforce_constraint(const POS &pos, const char *name, bool is_enforced)
Definition: parse_tree_nodes.h:4224
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:4216
Definition: parse_tree_nodes.h:4756
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:4760
Table_ident * m_table_name
Definition: parse_tree_nodes.h:4778
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:4779
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4771
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3187
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4757
const LEX_STRING m_partition_name
Definition: parse_tree_nodes.h:4777
Definition: parse_tree_nodes.h:4390
PT_alter_table_force(const POS &pos)
Definition: parse_tree_nodes.h:4394
PT_alter_table_action super
Definition: parse_tree_nodes.h:4391
Definition: parse_tree_nodes.h:4837
PT_alter_table_import_partition_tablespace(const POS &pos, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4841
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4845
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4838
Definition: parse_tree_nodes.h:4864
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4865
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4871
PT_alter_table_import_tablespace(const POS &pos)
Definition: parse_tree_nodes.h:4868
Definition: parse_tree_nodes.h:4307
PT_alter_table_action super
Definition: parse_tree_nodes.h:4308
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4315
Alter_index_visibility m_alter_index_visibility
Definition: parse_tree_nodes.h:4322
PT_alter_table_index_visible(const POS &pos, const char *name, bool visible)
Definition: parse_tree_nodes.h:4311
Definition: parse_tree_nodes.h:4574
PT_alter_table_optimize_partition(const POS &pos, bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4578
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4585
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4575
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4591
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4812
Definition: parse_tree_nodes.h:4398
PT_alter_table_action super
Definition: parse_tree_nodes.h:4399
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4771
PT_alter_table_order(const POS &pos, PT_order_list *order)
Definition: parse_tree_nodes.h:4402
PT_order_list *const m_order
Definition: parse_tree_nodes.h:4408
Definition: parse_tree_nodes.h:4411
PT_alter_table_action super
Definition: parse_tree_nodes.h:4412
PT_partition *const m_partition
Definition: parse_tree_nodes.h:4421
PT_alter_table_partition_by(const POS &pos, PT_partition *partition)
Definition: parse_tree_nodes.h:4415
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4777
Definition: parse_tree_nodes.h:4531
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:4535
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4540
const List< String > * m_opt_partition_list
Definition: parse_tree_nodes.h:4550
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4532
Definition: parse_tree_nodes.h:4554
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4565
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4805
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4555
PT_alter_table_rebuild_partition(const POS &pos, bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4558
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4570
Definition: parse_tree_nodes.h:4424
PT_alter_table_action super
Definition: parse_tree_nodes.h:4425
PT_alter_table_remove_partitioning(const POS &pos)
Definition: parse_tree_nodes.h:4428
Definition: parse_tree_nodes.h:4356
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4364
PT_alter_table_action super
Definition: parse_tree_nodes.h:4357
PT_alter_table_rename_column(const POS &pos, const char *from, const char *to)
Definition: parse_tree_nodes.h:4360
Alter_column m_rename_column
Definition: parse_tree_nodes.h:4370
Definition: parse_tree_nodes.h:4340
PT_alter_table_rename_key(const POS &pos, const char *from, const char *to)
Definition: parse_tree_nodes.h:4344
Alter_rename_key m_rename_key
Definition: parse_tree_nodes.h:4353
PT_alter_table_action super
Definition: parse_tree_nodes.h:4341
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4347
Definition: parse_tree_nodes.h:4325
PT_alter_table_rename(const POS &pos, const Table_ident *ident)
Definition: parse_tree_nodes.h:4329
const Table_ident *const m_ident
Definition: parse_tree_nodes.h:4337
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3094
bool is_rename_table() const override
Definition: parse_tree_nodes.h:4334
PT_alter_table_action super
Definition: parse_tree_nodes.h:4326
Definition: parse_tree_nodes.h:4729
const Mem_root_array< PT_part_definition * > * m_into
Definition: parse_tree_nodes.h:4751
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3166
partition_info m_partition_info
Definition: parse_tree_nodes.h:4752
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:4733
const List< String > m_partition_names
Definition: parse_tree_nodes.h:4750
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4730
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4749
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4744
Definition: parse_tree_nodes.h:4708
partition_info m_partition_info
Definition: parse_tree_nodes.h:4725
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4719
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4724
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4709
PT_alter_table_reorganize_partition(const POS &pos, bool no_write_to_binlog)
Definition: parse_tree_nodes.h:4712
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4864
Definition: parse_tree_nodes.h:4639
uint m_flags
Definition: parse_tree_nodes.h:4660
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4640
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4659
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4836
uint m_sql_flags
Definition: parse_tree_nodes.h:4661
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:4643
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4653
Definition: parse_tree_nodes.h:4783
PT_alter_table_secondary_load(const POS &pos, const List< String > *opt_use_partition=nullptr)
Definition: parse_tree_nodes.h:4789
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4794
const List< String > * opt_use_partition
Definition: parse_tree_nodes.h:4786
Definition: parse_tree_nodes.h:4803
PT_alter_table_secondary_unload(const POS &pos, const List< String > *opt_use_partition=nullptr)
Definition: parse_tree_nodes.h:4809
const List< String > * opt_use_partition
Definition: parse_tree_nodes.h:4806
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4814
Definition: parse_tree_nodes.h:4272
Item * m_expr
Definition: parse_tree_nodes.h:4286
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4737
const char * m_name
Definition: parse_tree_nodes.h:4285
PT_alter_table_action super
Definition: parse_tree_nodes.h:4273
PT_alter_table_set_default(const POS &pos, const char *col_name, Item *opt_default_expr)
Definition: parse_tree_nodes.h:4276
Definition: parse_tree_nodes.h:4432
PT_alter_table_action super
Definition: parse_tree_nodes.h:4433
PT_alter_table_standalone_action(const POS &pos, Alter_info::Alter_info_flag alter_info_flag)
Definition: parse_tree_nodes.h:4438
virtual Sql_cmd * make_cmd(Table_ddl_parse_context *pc)=0
Definition: parse_tree_nodes.h:4903
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3282
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:4923
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:4924
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:4905
Table_ident *const m_table_name
Definition: parse_tree_nodes.h:4921
PT_alter_table_standalone_action *const m_action
Definition: parse_tree_nodes.h:4922
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:4925
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:4927
Definition: parse_tree_nodes.h:4876
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:4897
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:4898
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3244
Mem_root_array< PT_ddl_table_option * > *const m_opt_actions
Definition: parse_tree_nodes.h:4895
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:4900
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:4896
Table_ident *const m_table_name
Definition: parse_tree_nodes.h:4894
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:4878
Definition: parse_tree_nodes.h:4687
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4688
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4858
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4701
PT_alter_table_truncate_partition(const POS &pos, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4691
Definition: parse_tree_nodes.h:5311
const option_type m_comment
Definition: parse_tree_nodes.h:5333
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5320
PT_alter_tablespace_option_comment(const POS &pos, option_type comment)
Definition: parse_tree_nodes.h:5316
decltype(Tablespace_options::ts_comment) option_type
Definition: parse_tree_nodes.h:5313
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5312
Definition: parse_tree_nodes.h:5338
PT_alter_tablespace_option_engine(const POS &pos, option_type engine_name)
Definition: parse_tree_nodes.h:5343
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5347
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5339
decltype(Tablespace_options::engine_name) option_type
Definition: parse_tree_nodes.h:5340
const option_type m_engine_name
Definition: parse_tree_nodes.h:5360
Definition: parse_tree_nodes.h:5365
PT_alter_tablespace_option_file_block_size(const POS &pos, option_type file_block_size)
Definition: parse_tree_nodes.h:5370
const option_type m_file_block_size
Definition: parse_tree_nodes.h:5387
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5374
decltype(Tablespace_options::file_block_size) option_type
Definition: parse_tree_nodes.h:5367
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5366
Definition: parse_tree_nodes.h:5294
const option_type m_nodegroup_id
Definition: parse_tree_nodes.h:5306
PT_alter_tablespace_option_nodegroup(const POS &pos, option_type nodegroup_id)
Definition: parse_tree_nodes.h:5299
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.cc:4886
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5295
decltype(Tablespace_options::nodegroup_id) option_type
Definition: parse_tree_nodes.h:5296
Definition: parse_tree_nodes.h:5240
const Option_type m_value
Definition: parse_tree_nodes.h:5253
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5241
bool do_contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5247
PT_alter_tablespace_option(const POS &pos, Option_type value)
Definition: parse_tree_nodes.h:5244
Definition: parse_tree_nodes.h:3271
Sql_cmd_alter_user_default_role sql_cmd
Definition: parse_tree_nodes.h:3272
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4698
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:3275
Definition: parse_tree_nodes.h:4952
const Sql_cmd_analyze_table::Histogram_command m_command
Definition: parse_tree_nodes.h:4974
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:4954
const int m_num_buckets
Definition: parse_tree_nodes.h:4975
const LEX_STRING m_data
Definition: parse_tree_nodes.h:4977
const bool m_auto_update
Definition: parse_tree_nodes.h:4978
const Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:4973
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3315
List< String > * m_columns
Definition: parse_tree_nodes.h:4976
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4972
Definition: parse_tree_nodes.h:5052
List< Index_hint > * m_index_hints
Definition: parse_tree_nodes.h:5064
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3404
Table_ddl_node super
Definition: parse_tree_nodes.h:5053
PT_assign_to_keycache(const POS &pos, Table_ident *table, List< Index_hint > *index_hints)
Definition: parse_tree_nodes.h:5056
Table_ident * m_table
Definition: parse_tree_nodes.h:5063
A template-free base class for index options that we can predeclare in sql_lex.h.
Definition: parse_tree_nodes.h:2243
PT_base_index_option(const POS &pos)
Definition: parse_tree_nodes.h:2245
A template for options that set HA_CREATE_INFO::table_options and also records if the option was expl...
Definition: parse_tree_nodes.h:2787
PT_create_table_option super
Definition: parse_tree_nodes.h:2788
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2796
const bool value
Definition: parse_tree_nodes.h:2790
PT_bool_create_table_option(const POS &pos, bool value)
Definition: parse_tree_nodes.h:2793
Parse tree node for a single of a window extent's borders, cf.
Definition: parse_tree_nodes.h:1377
Item * build_addop(Item_cache *order_expr, bool prec, bool asc, const Window *window)
Definition: parse_tree_nodes.cc:3489
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:1392
PT_border(const POS &pos, enum_window_border_type type)
< For unbounded border
Definition: parse_tree_nodes.h:1386
Item * m_value
only relevant iff m_border_type == WBT_VALUE_*
Definition: parse_tree_nodes.h:1379
Item ** border_ptr()
Need such low-level access so that fix_fields updates the right pointer.
Definition: parse_tree_nodes.h:1410
interval_type m_int_type
Definition: parse_tree_nodes.h:1383
PT_border(const POS &pos, enum_window_border_type type, Item *value, interval_type int_type)
Definition: parse_tree_nodes.h:1399
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:1381
const bool m_date_time
Definition: parse_tree_nodes.h:1382
Item * border() const
Definition: parse_tree_nodes.h:1408
Parse tree node for one or both of a window extent's borders, cf.
Definition: parse_tree_nodes.h:1429
PT_borders(const POS &pos, PT_border *start, PT_border *end)
Constructor.
Definition: parse_tree_nodes.h:1441
PT_border * m_borders[2]
Definition: parse_tree_nodes.h:1430
Definition: parse_tree_nodes.h:5096
List< Index_hint > * m_opt_key_usage_list
Definition: parse_tree_nodes.h:5114
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:5098
Table_ident * m_table
Definition: parse_tree_nodes.h:5112
PT_adm_partition * m_partitions
Definition: parse_tree_nodes.h:5113
const LEX_CSTRING m_key_cache_name
Definition: parse_tree_nodes.h:5115
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3438
Definition: parse_tree_nodes.h:5080
const LEX_CSTRING m_key_cache_name
Definition: parse_tree_nodes.h:5093
Mem_root_array< PT_assign_to_keycache * > * m_tbl_index_lists
Definition: parse_tree_nodes.h:5092
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:5082
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3424
Definition: parse_tree_nodes.h:2124
PT_item_list * opt_expr_list
Definition: parse_tree_nodes.h:2126
sp_name * proc_name
Definition: parse_tree_nodes.h:2125
PT_call(const POS &pos, sp_name *proc_name_arg, PT_item_list *opt_expr_list_arg)
Definition: parse_tree_nodes.h:2129
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1208
Definition: parse_tree_nodes.h:2996
void set_column_name(const LEX_STRING &name)
Definition: parse_tree_nodes.h:3008
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2997
PT_check_constraint(const POS &pos, LEX_STRING &name, Item *expr, bool is_enforced)
Definition: parse_tree_nodes.h:3001
Sql_check_constraint_spec cc_spec
Definition: parse_tree_nodes.h:2998
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4615
Definition: parse_tree_nodes.h:4981
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:4983
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:4995
decltype(HA_CHECK_OPT::flags) m_flags
Definition: parse_tree_nodes.h:4996
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3337
decltype(HA_CHECK_OPT::sql_flags) m_sql_flags
Definition: parse_tree_nodes.h:4997
Base class for all column attributes in CREATE/ALTER TABLE
Definition: parse_tree_column_attrs.h:85
Definition: parse_tree_nodes.h:3013
PT_table_element super
Definition: parse_tree_nodes.h:3014
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:3024
const LEX_STRING field_ident
Definition: parse_tree_nodes.h:3016
PT_field_def_base * field_def
Definition: parse_tree_nodes.h:3017
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2307
const char * opt_place
Definition: parse_tree_nodes.h:3021
PT_table_constraint_def * opt_column_constraint
Definition: parse_tree_nodes.h:3019
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:2065
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:2056
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:2038
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:2107
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
Definition: parse_tree_nodes.h:2428
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:2430
keytype m_keytype
Definition: parse_tree_nodes.h:2450
Index_options m_options
Definition: parse_tree_nodes.h:2455
Table_ident * m_table_ident
Definition: parse_tree_nodes.h:2453
LEX_STRING m_name
Definition: parse_tree_nodes.h:2451
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:2456
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2454
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:2457
PT_base_index_option * m_type
Definition: parse_tree_nodes.h:2452
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1873
Parse tree node for CREATE RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5394
resourcegroups::Sql_cmd_create_resource_group sql_cmd
Definition: parse_tree_nodes.h:5395
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:5399
const bool has_priority
Definition: parse_tree_nodes.h:5396
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4898
Definition: parse_tree_nodes.h:3117
PT_create_role(const POS &pos, bool if_not_exists, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:3121
Sql_cmd_create_role sql_cmd
Definition: parse_tree_nodes.h:3118
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4627
Top-level node for the CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM statement.
Definition: parse_tree_nodes.h:2155
bool contains_control_char(char *str, size_t length)
Check if a UTF-8 string contains control characters.
Definition: parse_tree_nodes.h:2181
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:2189
const Sql_cmd_srs_attributes m_attributes
All attributes except SRID.
Definition: parse_tree_nodes.h:2168
unsigned long long m_srid
SRID of the SRS to create.
Definition: parse_tree_nodes.h:2166
bool m_or_replace
Whether OR REPLACE is specified.
Definition: parse_tree_nodes.h:2159
Sql_cmd_create_srs sql_cmd
The SQL command object.
Definition: parse_tree_nodes.h:2157
bool m_if_not_exists
Whether IF NOT EXISTS is specified.
Definition: parse_tree_nodes.h:2161
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4458
Node for the STATS_AUTO_RECALC [=] <0|1|DEFAULT>) table option.
Definition: parse_tree_nodes.h:2885
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2164
const Ternary_option value
Definition: parse_tree_nodes.h:2888
PT_create_stats_auto_recalc_option(const POS &pos, Ternary_option value)
Definition: parse_tree_nodes.h:2900
PT_create_table_option super
Definition: parse_tree_nodes.h:2886
Node for the STATS_SAMPLE_PAGES [=] <integer>|DEFAULT table option.
Definition: parse_tree_nodes.h:2911
const value_t value
Definition: parse_tree_nodes.h:2915
PT_create_stats_stable_pages(const POS &pos, value_t value)
Constructor for implicit number of pages.
Definition: parse_tree_nodes.h:2924
PT_create_table_option super
Definition: parse_tree_nodes.h:2912
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2185
decltype(HA_CREATE_INFO::stats_sample_pages) value_t
Definition: parse_tree_nodes.h:2913
PT_create_stats_stable_pages(const POS &pos)
Constructor for the DEFAULT number of pages.
Definition: parse_tree_nodes.h:2931
Definition: parse_tree_nodes.h:2950
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2959
const ha_storage_media value
Definition: parse_tree_nodes.h:2953
PT_create_storage_option(const POS &pos, ha_storage_media value)
Definition: parse_tree_nodes.h:2956
PT_create_table_option super
Definition: parse_tree_nodes.h:2951
Definition: parse_tree_nodes.h:2966
const CHARSET_INFO * value
Definition: parse_tree_nodes.h:2969
PT_create_table_default_charset(const POS &pos, const CHARSET_INFO *value)
Definition: parse_tree_nodes.h:2972
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2244
PT_create_table_option super
Definition: parse_tree_nodes.h:2967
Definition: parse_tree_nodes.h:2981
PT_create_table_default_collation(const POS &pos, const CHARSET_INFO *value)
Definition: parse_tree_nodes.h:2987
const CHARSET_INFO * value
Definition: parse_tree_nodes.h:2984
PT_create_table_option super
Definition: parse_tree_nodes.h:2982
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2265
Node for the ENGINE [=] <identifier>|<string> table option.
Definition: parse_tree_nodes.h:2841
const LEX_CSTRING engine
Definition: parse_tree_nodes.h:2844
PT_create_table_engine_option(const POS &pos, const LEX_CSTRING &engine)
Definition: parse_tree_nodes.h:2851
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2145
PT_create_table_option super
Definition: parse_tree_nodes.h:2842
Base class for CREATE TABLE option nodes.
Definition: parse_tree_nodes.h:2557
PT_ddl_table_option super
Definition: parse_tree_nodes.h:2558
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2566
~PT_create_table_option() override=0
PT_create_table_option(const POS &pos)
Definition: parse_tree_nodes.h:2561
Node for the SECONDARY_ENGINE [=] <identifier>|<string>|NULL table option.
Definition: parse_tree_nodes.h:2864
PT_create_table_secondary_engine_option(const POS &pos, const LEX_CSTRING &secondary_engine)
Definition: parse_tree_nodes.h:2870
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2155
const LEX_CSTRING m_secondary_engine
Definition: parse_tree_nodes.h:2877
PT_create_table_secondary_engine_option(const POS &pos)
Definition: parse_tree_nodes.h:2868
Top-level node for the CREATE TABLE statement.
Definition: parse_tree_nodes.h:3042
On_duplicate on_duplicate
Definition: parse_tree_nodes.h:3049
PT_partition * opt_partitioning
Definition: parse_tree_nodes.h:3048
const Mem_root_array< PT_table_element * > * opt_table_element_list
Definition: parse_tree_nodes.h:3046
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2337
bool is_temporary
Definition: parse_tree_nodes.h:3043
const Mem_root_array< PT_create_table_option * > * opt_create_table_options
Definition: parse_tree_nodes.h:3047
PT_query_expression_body * opt_query_expression
Definition: parse_tree_nodes.h:3050
bool only_if_not_exists
Definition: parse_tree_nodes.h:3044
PT_create_table_stmt(const POS &pos, MEM_ROOT *mem_root, bool is_temporary, 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)
Definition: parse_tree_nodes.h:3075
Table_ident * table_name
Definition: parse_tree_nodes.h:3045
Table_ident * opt_like_clause
Definition: parse_tree_nodes.h:3051
PT_create_table_stmt(const POS &pos, MEM_ROOT *mem_root, bool is_temporary, bool only_if_not_exists, Table_ident *table_name, Table_ident *opt_like_clause)
Definition: parse_tree_nodes.h:3100
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:3053
Definition: parse_tree_nodes.h:2937
const Mem_root_array< Table_ident * > * tables
Definition: parse_tree_nodes.h:2940
PT_create_union_option(const POS &pos, const Mem_root_array< Table_ident * > *tables)
Definition: parse_tree_nodes.h:2943
PT_create_table_option super
Definition: parse_tree_nodes.h:2938
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2194
Definition: parse_tree_nodes.h:636
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3964
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:2540
PT_ddl_table_option(const POS &pos)
Definition: parse_tree_nodes.h:2542
~PT_ddl_table_option() override=0
virtual bool is_rename_table() const
Definition: parse_tree_nodes.h:2547
Top-level node for the DELETE statement.
Definition: parse_tree_nodes.h:1925
bool add_table(Parse_context *pc, Table_ident *table)
Definition: parse_tree_nodes.cc:897
bool is_multitable() const
Definition: parse_tree_nodes.h:1986
Item * opt_where_clause
Definition: parse_tree_nodes.h:1937
Mem_root_array_YY< Table_ident * > table_list
Definition: parse_tree_nodes.h:1934
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:1944
SQL_I_List< Table_ref > delete_tables
Definition: parse_tree_nodes.h:1940
Item * opt_delete_limit_clause
Definition: parse_tree_nodes.h:1939
Mem_root_array_YY< PT_table_reference * > join_table_list
Definition: parse_tree_nodes.h:1936
Table_ident * table_ident
Definition: parse_tree_nodes.h:1932
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:1965
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:1929
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:912
const int opt_delete_options
Definition: parse_tree_nodes.h:1931
Parse_tree_root super
Definition: parse_tree_nodes.h:1926
PT_order * opt_order_clause
Definition: parse_tree_nodes.h:1938
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1930
const char *const opt_table_alias
Definition: parse_tree_nodes.h:1933
List< String > * opt_use_partition
Definition: parse_tree_nodes.h:1935
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:1452
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1407
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:1395
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:5015
Alter_drop m_alter_drop
Definition: parse_tree_nodes.h:5036
Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:5033
const char * m_index_name
Definition: parse_tree_nodes.h:5031
Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:5034
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:5017
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3373
Table_ident * m_table
Definition: parse_tree_nodes.h:5032
Parse tree node for DROP RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5436
PT_drop_resource_group(const POS &pos, const LEX_CSTRING &resource_group_name, bool force)
Definition: parse_tree_nodes.h:5440
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4931
resourcegroups::Sql_cmd_drop_resource_group sql_cmd
Definition: parse_tree_nodes.h:5437
Definition: parse_tree_nodes.h:3128
Sql_cmd_drop_role sql_cmd
Definition: parse_tree_nodes.h:3129
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4632
PT_drop_role(const POS &pos, bool ignore_errors, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:3132
Top-level node for the DROP SPATIAL REFERENCE SYSTEM statement.
Definition: parse_tree_nodes.h:2206
Sql_cmd_drop_srs sql_cmd
The SQL command object.
Definition: parse_tree_nodes.h:2208
PT_drop_srs(const POS &pos, unsigned long long srid, bool if_exists)
Definition: parse_tree_nodes.h:2216
unsigned long long m_srid
SRID of the SRS to drop.
Definition: parse_tree_nodes.h:2213
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4594
Definition: parse_tree_nodes.h:3231
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:4668
LEX_STRING ident
Definition: parse_tree_nodes.h:3232
PT_dynamic_privilege(const POS &pos, const POS &errpos, const LEX_STRING &ident)
Definition: parse_tree_nodes.h:3235
Definition: parse_tree_nodes.h:1855
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1861
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1813
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:1798
Parse tree node for a window frame's exclusions, cf.
Definition: parse_tree_nodes.h:1452
enum_window_frame_exclusion m_exclusion
Definition: parse_tree_nodes.h:1453
PT_exclusion(const POS &pos, enum_window_frame_exclusion e)
Definition: parse_tree_nodes.h:1456
Definition: parse_tree_nodes.h:5462
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3629
PT_explain_for_connection(const POS &pos, my_thread_id thread_id)
Definition: parse_tree_nodes.h:5464
Sql_cmd_explain_other_thread m_cmd
Definition: parse_tree_nodes.h:5470
Definition: parse_tree_nodes.h:5473
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:5475
const bool m_analyze
Definition: parse_tree_nodes.h:5491
LEX_CSTRING m_schema_name_for_explain
Definition: parse_tree_nodes.h:5495
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3648
const bool m_explicit_format
Definition: parse_tree_nodes.h:5492
std::optional< std::string_view > m_explain_into_variable_name
Definition: parse_tree_nodes.h:5494
Parse_tree_root *const m_explainable_stmt
Definition: parse_tree_nodes.h:5493
const Explain_format_type m_format
Definition: parse_tree_nodes.h:5490
Definition: parse_tree_nodes.h:1615
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:1619
Base class for both generated and regular column definitions.
Definition: parse_tree_column_attrs.h:903
Definition: parse_tree_nodes.h:2501
List< Key_part_spec > * m_ref_list
Definition: parse_tree_nodes.h:2529
fk_option m_fk_delete_opt
Definition: parse_tree_nodes.h:2532
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:2505
Table_ident * m_referenced_table
Definition: parse_tree_nodes.h:2528
fk_match_opt m_fk_match_option
Definition: parse_tree_nodes.h:2530
fk_option m_fk_update_opt
Definition: parse_tree_nodes.h:2531
const LEX_STRING m_key_name
Definition: parse_tree_nodes.h:2526
const LEX_STRING m_constraint_name
Definition: parse_tree_nodes.h:2525
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2502
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2527
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:1910
Parse tree node for a window's frame, cf.
Definition: parse_tree_nodes.h:1465
PT_border * m_to
Definition: parse_tree_nodes.h:1470
PT_frame(const POS &pos, enum_window_frame_unit unit, PT_borders *from_to, PT_exclusion *exclusion)
Definition: parse_tree_nodes.h:1477
bool m_originally_absent
If true, this is an artificial frame, not specified by the user.
Definition: parse_tree_nodes.h:1475
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:1467
PT_border * m_from
Definition: parse_tree_nodes.h:1469
PT_exclusion * m_exclusion
Definition: parse_tree_nodes.h:1472
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:3242
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4672
const List< LEX_USER > * users
Definition: parse_tree_nodes.h:3244
const bool with_admin_option
Definition: parse_tree_nodes.h:3245
const Mem_root_array< PT_role_or_privilege * > * roles
Definition: parse_tree_nodes.h:3243
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:3248
Definition: parse_tree_nodes.h:707
olap_type olap
Definition: parse_tree_nodes.h:711
Parse_tree_node super
Definition: parse_tree_nodes.h:708
PT_group(const POS &pos, PT_order_list *group_list_arg, olap_type olap_arg)
Definition: parse_tree_nodes.h:721
PT_order_list * group_list
Definition: parse_tree_nodes.h:710
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.h:714
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:266
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:2371
PT_index_option(const POS &pos, Option_type option_value)
Definition: parse_tree_nodes.h:2375
Option_type m_option_value
Definition: parse_tree_nodes.h:2384
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2378
Definition: parse_tree_nodes.h:2475
Index_options m_options
Definition: parse_tree_nodes.h:2498
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:2479
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2476
keytype m_keytype
Definition: parse_tree_nodes.h:2494
PT_base_index_option * m_type
Definition: parse_tree_nodes.h:2496
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2497
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:1898
const LEX_STRING m_name
Definition: parse_tree_nodes.h:2495
Definition: parse_tree_nodes.h:2036
virtual mem_root_deque< List_item * > & get_many_values()
Definition: parse_tree_nodes.h:2052
bool push_back(mem_root_deque< Item * > *x)
Definition: parse_tree_nodes.h:2047
PT_insert_values_list(const POS &pos, MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:2042
Parse_tree_node super
Definition: parse_tree_nodes.h:2037
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1031
mem_root_deque< List_item * > many_values
Definition: parse_tree_nodes.h:2039
Top-level node for the INSERT statement.
Definition: parse_tree_nodes.h:2063
PT_item_list *const opt_on_duplicate_column_list
Definition: parse_tree_nodes.h:2077
PT_item_list *const column_list
Definition: parse_tree_nodes.h:2072
PT_item_list *const opt_on_duplicate_value_list
Definition: parse_tree_nodes.h:2078
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:2067
bool has_query_block() const
Definition: parse_tree_nodes.h:2121
const bool is_replace
Definition: parse_tree_nodes.h:2066
PT_query_expression_body * insert_query_expression
Definition: parse_tree_nodes.h:2074
Create_col_name_list *const opt_values_column_list
Definition: parse_tree_nodes.h:2076
Parse_tree_root super
Definition: parse_tree_nodes.h:2064
Table_ident *const table_ident
Definition: parse_tree_nodes.h:2070
PT_insert_values_list * row_value_list
Definition: parse_tree_nodes.h:2073
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1042
const char *const opt_values_table_alias
Definition: parse_tree_nodes.h:2075
List< String > *const opt_use_partition
Definition: parse_tree_nodes.h:2071
const bool ignore
Definition: parse_tree_nodes.h:2069
const thr_lock_type lock_option
Definition: parse_tree_nodes.h:2068
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:2081
Definition: parse_tree_nodes.h:5550
List< PT_install_component_set_element > * m_set_elements
Definition: parse_tree_nodes.h:5553
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:5140
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:5161
Mem_root_array_YY< LEX_STRING > m_urns
Definition: parse_tree_nodes.h:5552
Definition: parse_tree_nodes.h:1864
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1870
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:1798
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1818
Definition: parse_tree_nodes.h:1310
sql_exchange m_exchange
Definition: parse_tree_nodes.h:1320
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4262
PT_into_destination super
Definition: parse_tree_nodes.h:1311
PT_into_destination_dumpfile(const POS &pos, const LEX_STRING &file_name_arg)
Definition: parse_tree_nodes.h:1314
Definition: parse_tree_nodes.h:1290
PT_into_destination_outfile(const POS &pos, const LEX_STRING &file_name_arg, const CHARSET_INFO *charset_arg, const Field_separators &field_term_arg, const Line_separators &line_term_arg)
Definition: parse_tree_nodes.h:1294
PT_into_destination super
Definition: parse_tree_nodes.h:1291
sql_exchange m_exchange
Definition: parse_tree_nodes.h:1307
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4253
Definition: parse_tree_nodes.h:1280
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4238
PT_into_destination(const POS &pos)
Definition: parse_tree_nodes.h:1284
Parse_tree_node super
Definition: parse_tree_nodes.h:1281
Definition: parse_tree_nodes.h:1162
PT_transaction_characteristic super
Definition: parse_tree_nodes.h:1163
PT_isolation_level(const POS &pos, enum_tx_isolation level)
Definition: parse_tree_nodes.h:1166
Wrapper class for an Item list head, used to allocate Item lists in the parser in a context-independe...
Definition: parse_tree_helpers.h:105
mem_root_deque< Item * > value
Definition: parse_tree_helpers.h:113
uint elements() const
Definition: parse_tree_helpers.h:124
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:3970
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:4009
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3998
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:3920
bool contextualize_tabs(Parse_context *pc)
Definition: parse_tree_nodes.cc:166
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:3931
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:5171
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:5178
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3530
const char * m_name
Definition: parse_tree_nodes.h:5182
PT_json_table_column super
Definition: parse_tree_nodes.h:5172
unique_ptr_destroy_only< Json_table_column > m_column
Definition: parse_tree_nodes.h:5181
PT_json_table_column_for_ordinality(const POS &pos, LEX_STRING name)
Definition: parse_tree_nodes.cc:3523
Definition: parse_tree_nodes.h:5206
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:5217
Item * m_path
Definition: parse_tree_nodes.h:5220
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:5210
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3609
PT_json_table_column super
Definition: parse_tree_nodes.h:5207
Json_table_column * m_column
Definition: parse_tree_nodes.h:5222
const Mem_root_array< PT_json_table_column * > * m_nested_columns
Definition: parse_tree_nodes.h:5221
Definition: parse_tree_nodes.h:5185
~PT_json_table_column_with_path() override
const CHARSET_INFO * m_collation
Definition: parse_tree_nodes.h:5202
unique_ptr_destroy_only< Json_table_column > m_column
Definition: parse_tree_nodes.h:5199
const char * m_name
Definition: parse_tree_nodes.h:5200
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:3540
PT_json_table_column super
Definition: parse_tree_nodes.h:5186
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:5196
PT_type * m_type
Definition: parse_tree_nodes.h:5201
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3568
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:2255
bool has_expression() const
Definition: parse_tree_nodes.h:2321
LEX_CSTRING m_column_name
The name of the column that this key part indexes.
Definition: parse_tree_nodes.h:2353
Parse_tree_node super
Definition: parse_tree_nodes.h:2256
bool is_explicit() const
Definition: parse_tree_nodes.h:2314
Item * get_expression() const
Get the indexed expression.
Definition: parse_tree_nodes.h:2298
LEX_CSTRING get_column_name() const
Get the column that this key part points to.
Definition: parse_tree_nodes.h:2330
enum_order get_order() const
Definition: parse_tree_nodes.h:2308
enum_order m_order
The direction of the index.
Definition: parse_tree_nodes.h:2350
bool do_contextualize(Parse_context *pc) override
Contextualize this key part specification.
Definition: parse_tree_nodes.cc:708
int get_prefix_length() const
Definition: parse_tree_nodes.h:2340
PT_key_part_specification(const POS &pos, Item *expression, enum_order order)
Constructor for a functional key part.
Definition: parse_tree_nodes.cc:694
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:2360
Item * m_expression
The indexed expression in case this is a functional key part.
Definition: parse_tree_nodes.h:2347
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:3853
PT_limit_clause(const POS &pos, const Limit_options &limit_options_arg)
Definition: parse_tree_nodes.h:441
Definition: parse_tree_nodes.h:5137
List< Index_hint > * m_opt_cache_key_list
Definition: parse_tree_nodes.h:5155
bool m_ignore_leaves
Definition: parse_tree_nodes.h:5156
PT_adm_partition * m_partitions
Definition: parse_tree_nodes.h:5154
Table_ident * m_table
Definition: parse_tree_nodes.h:5153
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3456
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:5139
Definition: parse_tree_nodes.h:5159
Mem_root_array< PT_preload_keys * > * m_preload_list
Definition: parse_tree_nodes.h:5168
PT_load_index_stmt(const POS &pos, MEM_ROOT *mem_root, Mem_root_array< PT_preload_keys * > *preload_list)
Definition: parse_tree_nodes.h:5161
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3474
Definition: parse_tree_nodes.h:5498
const thr_lock_type m_lock_type
Definition: parse_tree_nodes.h:5533
Sql_cmd_load_table m_cmd
Definition: parse_tree_nodes.h:5531
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:5500
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3780
Definition: parse_tree_nodes.h:801
PT_locking_clause_list(const POS &pos, MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:803
Mem_root_array_YY< PT_locking_clause * > m_locking_clauses
Definition: parse_tree_nodes.h:819
bool push_back(PT_locking_clause *locking_clause)
Definition: parse_tree_nodes.h:808
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:812
Definition: parse_tree_nodes.h:738
Lock_descriptor get_lock_descriptor() const
Definition: parse_tree_nodes.h:753
virtual bool set_lock_for_tables(Parse_context *pc)=0
Locked_row_action action() const
Definition: parse_tree_nodes.h:750
Locked_row_action m_locked_row_action
Definition: parse_tree_nodes.h:769
PT_locking_clause(const POS &pos, Lock_strength strength, Locked_row_action action)
Definition: parse_tree_nodes.h:740
Lock_strength m_lock_strength
Definition: parse_tree_nodes.h:768
bool do_contextualize(Parse_context *pc) final
Definition: parse_tree_nodes.cc:2271
Definition: parse_tree_nodes.h:1732
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1761
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1755
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1765
PT_locking_clause_list *const m_locking_clauses
Definition: parse_tree_nodes.h:1771
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1748
PT_locking(const POS &pos, PT_query_expression_body *qe, PT_locking_clause_list *locking_clauses)
Definition: parse_tree_nodes.h:1736
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1752
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1742
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:1757
PT_query_expression_body *const m_query_expression
Definition: parse_tree_nodes.h:1770
Definition: parse_tree_nodes.h:5000
bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:5011
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3358
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:5012
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:5002
Definition: parse_tree_nodes.h:1086
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:1094
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4123
Parse_tree_node super
Definition: parse_tree_nodes.h:1087
POS value_pos
Definition: parse_tree_nodes.h:1091
Parse_tree_node * value
Definition: parse_tree_nodes.h:1090
POS delimiter_pos
Definition: parse_tree_nodes.h:1089
Definition: parse_tree_nodes.h:1105
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:1111
PT_option_value_list_head * head
Definition: parse_tree_nodes.h:1108
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1116
PT_option_value_list_head super
Definition: parse_tree_nodes.h:1106
Definition: parse_tree_nodes.h:970
const CHARSET_INFO * opt_charset
Definition: parse_tree_nodes.h:973
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:971
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:199
PT_option_value_no_option_type_charset(const POS &pos, const CHARSET_INFO *opt_charset_arg)
Definition: parse_tree_nodes.h:976
Definition: parse_tree_nodes.h:984
PT_option_value_no_option_type_names(const POS &pos, const POS &error_pos)
Definition: parse_tree_nodes.h:990
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:217
POS m_error_pos
Definition: parse_tree_nodes.h:987
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:985
Definition: parse_tree_nodes.h:1046
POS expr_pos
Definition: parse_tree_nodes.h:1054
bool retain_current_password
Definition: parse_tree_nodes.h:1052
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:1057
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:606
LEX_USER * user
Definition: parse_tree_nodes.h:1049
const char * password
Definition: parse_tree_nodes.h:1050
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1047
bool random_password_generator
Definition: parse_tree_nodes.h:1053
const char * current_password
Definition: parse_tree_nodes.h:1051
Definition: parse_tree_nodes.h:1019
bool random_password_generator
Definition: parse_tree_nodes.h:1025
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:1029
const char * current_password
Definition: parse_tree_nodes.h:1023
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1020
POS expr_pos
Definition: parse_tree_nodes.h:1026
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:652
bool retain_current_password
Definition: parse_tree_nodes.h:1024
const char * password
Definition: parse_tree_nodes.h:1022
Definition: parse_tree_nodes.h:930
PT_option_value_no_option_type_user_var(const POS &pos, const LEX_STRING &name_arg, Item *expr_arg)
Definition: parse_tree_nodes.h:937
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4082
LEX_STRING name
Definition: parse_tree_nodes.h:933
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:931
Item * expr
Definition: parse_tree_nodes.h:934
Definition: parse_tree_nodes.h:899
PT_option_value_no_option_type(const POS &pos)
Definition: parse_tree_nodes.h:901
Definition: parse_tree_nodes.h:1072
enum_var_type type
Definition: parse_tree_nodes.h:1075
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4118
Parse_tree_node super
Definition: parse_tree_nodes.h:1073
PT_set_scoped_system_variable * value
Definition: parse_tree_nodes.h:1076
PT_option_value_type(const POS &pos, enum_var_type type_arg, PT_set_scoped_system_variable *value_arg)
Definition: parse_tree_nodes.h:1079
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:328
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:727
Parse_tree_node super
Definition: parse_tree_nodes.h:728
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:311
PT_order(const POS &pos, PT_order_list *order_list_arg)
Definition: parse_tree_nodes.h:732
PT_order_list * order_list
Definition: parse_tree_nodes.h:731
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:5118
List< Index_hint > * m_opt_cache_key_list
Definition: parse_tree_nodes.h:5133
Table_ddl_node super
Definition: parse_tree_nodes.h:5119
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4872
PT_preload_keys(const POS &pos, Table_ident *table, List< Index_hint > *opt_cache_key_list, bool ignore_leaves)
Definition: parse_tree_nodes.h:5122
Table_ident * m_table
Definition: parse_tree_nodes.h:5132
bool m_ignore_leaves
Definition: parse_tree_nodes.h:5134
Definition: parse_tree_nodes.h:772
PT_query_block_locking_clause(const POS &pos, Lock_strength strength, Locked_row_action action=Locked_row_action::WAIT)
Definition: parse_tree_nodes.h:774
bool set_lock_for_tables(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2293
Definition: parse_tree_nodes.h:822
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:826
Setop_type
Definition: parse_tree_nodes.h:825
@ UNION
Definition: parse_tree_nodes.h:825
@ EXCEPT
Definition: parse_tree_nodes.h:825
@ NONE
Definition: parse_tree_nodes.h:825
@ INTERSECT
Definition: parse_tree_nodes.h:825
virtual PT_insert_values_list * get_row_value_list() const =0
PT_query_expression_body(const POS &pos)
Definition: parse_tree_nodes.h:824
virtual bool has_into_clause() const =0
virtual bool has_trailing_into_clause() const =0
Definition: parse_tree_nodes.h:1626
PT_order * m_order
Definition: parse_tree_nodes.h:1723
PT_limit_clause * m_limit
Definition: parse_tree_nodes.h:1724
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1646
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4291
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:1628
PT_query_expression_body * m_body
Definition: parse_tree_nodes.h:1722
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1648
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1649
PT_query_expression(const POS &pos, PT_query_expression_body *body)
Definition: parse_tree_nodes.h:1641
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:1329
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:1654
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1706
PT_query_expression(const POS &pos, PT_query_expression_body *body, PT_order *order, PT_limit_clause *limit)
Definition: parse_tree_nodes.h:1637
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:1725
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1702
Definition: parse_tree_nodes.h:1488
PT_query_primary(const POS &pos)
Definition: parse_tree_nodes.h:1490
Definition: parse_tree_nodes.h:1493
bool is_implicit_from_clause() const
Definition: parse_tree_nodes.h:1586
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1226
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:1299
PT_into_destination * opt_into1
Definition: parse_tree_nodes.h:1499
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:1509
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1496
PT_query_specification(const POS &pos, const Query_options &options_arg, PT_item_list *item_list_arg)
Definition: parse_tree_nodes.h:1550
Item * opt_having_clause
Definition: parse_tree_nodes.h:1504
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1580
PT_window_list * opt_window_clause
Definition: parse_tree_nodes.h:1505
const bool m_is_from_clause_implicit
Definition: parse_tree_nodes.h:1500
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1575
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1567
PT_item_list * item_list
Definition: parse_tree_nodes.h:1498
Mem_root_array_YY< PT_table_reference * > from_clause
Definition: parse_tree_nodes.h:1501
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1579
Query_options options
Definition: parse_tree_nodes.h:1497
PT_group * opt_group_clause
Definition: parse_tree_nodes.h:1503
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:1577
Item * opt_qualify_clause
Definition: parse_tree_nodes.h:1506
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1568
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:1532
Item * opt_where_clause
Definition: parse_tree_nodes.h:1502
PT_query_primary super
Definition: parse_tree_nodes.h:1494
Definition: parse_tree_nodes.h:4930
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:4947
bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4946
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:4932
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3297
decltype(HA_CHECK_OPT::sql_flags) m_sql_flags
Definition: parse_tree_nodes.h:4949
decltype(HA_CHECK_OPT::flags) m_flags
Definition: parse_tree_nodes.h:4948
Top-level node for the SHUTDOWN statement.
Definition: parse_tree_nodes.h:5542
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4951
Sql_cmd_restart_server sql_cmd
Definition: parse_tree_nodes.h:5547
Definition: parse_tree_nodes.h:3259
const Mem_root_array< PT_role_or_privilege * > * roles
Definition: parse_tree_nodes.h:3260
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4686
const List< LEX_USER > * users
Definition: parse_tree_nodes.h:3261
PT_revoke_roles(const POS &pos, Mem_root_array< PT_role_or_privilege * > *roles, const List< LEX_USER > *users)
Definition: parse_tree_nodes.h:3264
Definition: parse_tree_nodes.h:3195
LEX_STRING role
Definition: parse_tree_nodes.h:3196
LEX_STRING host
Definition: parse_tree_nodes.h:3197
PT_role_at_host(const POS &pos, const POS &errpos, const LEX_STRING &role, const LEX_STRING &host)
Definition: parse_tree_nodes.h:3200
LEX_USER * get_user(THD *thd) override
Definition: parse_tree_nodes.cc:4652
Definition: parse_tree_nodes.h:3207
LEX_STRING ident
Definition: parse_tree_nodes.h:3208
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:4660
LEX_USER * get_user(THD *thd) override
Definition: parse_tree_nodes.cc:4656
PT_role_or_dynamic_privilege(const POS &pos, const POS &errpos, const LEX_STRING &ident)
Definition: parse_tree_nodes.h:3211
Definition: parse_tree_nodes.h:3184
virtual LEX_USER * get_user(THD *thd)
Definition: parse_tree_nodes.cc:4642
virtual Privilege * get_privilege(THD *thd)
Definition: parse_tree_nodes.cc:4647
POS m_errpos
Definition: parse_tree_nodes.h:3186
PT_role_or_privilege(const POS &pos, const POS &errpos)
Definition: parse_tree_nodes.h:3189
Definition: parse_tree_nodes.h:420
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3847
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:1337
sp_head * sp
Definition: parse_tree_nodes.h:1347
PT_select_sp_var(const POS &pos, const LEX_STRING &name_arg)
Definition: parse_tree_nodes.h:1351
uint offset
Definition: parse_tree_nodes.h:1340
uint get_offset() const override
Definition: parse_tree_nodes.h:1355
PT_select_var super
Definition: parse_tree_nodes.h:1338
bool is_local() const override
Definition: parse_tree_nodes.h:1354
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:712
Definition: parse_tree_nodes.h:1873
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:761
PT_query_expression_body * m_qe
Definition: parse_tree_nodes.h:1915
const bool m_has_trailing_locking_clauses
Definition: parse_tree_nodes.h:1917
PT_into_destination * m_into
Definition: parse_tree_nodes.h:1916
std::string get_printable_parse_tree(THD *thd) override
Definition: parse_tree_nodes.cc:732
Parse_tree_root super
Definition: parse_tree_nodes.h:1874
PT_select_stmt(const POS &pos, enum_sql_command sql_command, PT_query_expression_body *qe)
Definition: parse_tree_nodes.h:1882
enum_sql_command m_sql_command
Definition: parse_tree_nodes.h:1914
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:1901
Definition: parse_tree_nodes.h:1360
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4271
List< PT_select_var > value
Definition: parse_tree_nodes.h:1366
PT_into_destination super
Definition: parse_tree_nodes.h:1361
bool push_back(PT_select_var *var)
Definition: parse_tree_nodes.h:1370
PT_select_var_list(const POS &pos)
Definition: parse_tree_nodes.h:1364
Definition: parse_tree_nodes.h:1323
const LEX_STRING name
Definition: parse_tree_nodes.h:1325
virtual bool is_local() const
Definition: parse_tree_nodes.h:1330
virtual uint get_offset() const
Definition: parse_tree_nodes.h:1331
PT_select_var(const POS &pos, const LEX_STRING &name_arg)
Definition: parse_tree_nodes.h:1327
Definition: parse_tree_nodes.h:997
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:998
const CHARSET_INFO * opt_charset
Definition: parse_tree_nodes.h:1000
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:233
PT_set_names(const POS &pos, const CHARSET_INFO *opt_charset_arg, const CHARSET_INFO *opt_collation_arg)
Definition: parse_tree_nodes.h:1004
const CHARSET_INFO * opt_collation
Definition: parse_tree_nodes.h:1001
Definition: parse_tree_nodes.h:1794
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1818
bool m_is_distinct
Definition: parse_tree_nodes.h:1836
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:1823
bool is_distinct() const
Definition: parse_tree_nodes.h:1827
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:1629
PT_into_destination * m_into
Definition: parse_tree_nodes.h:1837
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1826
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:1798
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1812
void set_is_rhs_in_parentheses(bool v)
Definition: parse_tree_nodes.h:1830
bool m_is_rhs_in_parentheses
Definition: parse_tree_nodes.h:1838
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1810
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.h:1839
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1825
List< PT_query_expression_body > m_list
Definition: parse_tree_nodes.h:1829
bool contextualize_setop(Parse_context *pc, Query_term_type setop_type, Surrounding_context context)
Definition: parse_tree_nodes.cc:1763
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:1502
Parse tree node for SET RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5451
PT_set_resource_group(const POS &pos, const LEX_CSTRING &name, Mem_root_array< ulonglong > *thread_id_list)
Definition: parse_tree_nodes.h:5455
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4941
resourcegroups::Sql_cmd_set_resource_group sql_cmd
Definition: parse_tree_nodes.h:5452
Definition: parse_tree_nodes.h:3139
PT_set_role(const POS &pos, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:3148
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4637
PT_set_role(const POS &pos, role_enum role_type, const List< LEX_USER > *opt_except_roles=nullptr)
Definition: parse_tree_nodes.h:3143
Sql_cmd_set_role sql_cmd
Definition: parse_tree_nodes.h:3140
Definition: parse_tree_nodes.h:877
Parse_tree_node super
Definition: parse_tree_nodes.h:878
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:895
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:881
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4040
const POS m_varpos
Definition: parse_tree_nodes.h:893
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:894
Item * m_opt_expr
Definition: parse_tree_nodes.h:896
Definition: parse_tree_nodes.h:945
const enum_var_type m_scope
Definition: parse_tree_nodes.h:962
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:946
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:964
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:965
Item * m_opt_expr
Definition: parse_tree_nodes.h:966
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4095
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:949
const POS m_name_pos
Definition: parse_tree_nodes.h:963
Definition: parse_tree_nodes.h:905
Item * m_opt_expr
Definition: parse_tree_nodes.h:926
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:909
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:906
const POS m_expr_pos
Definition: parse_tree_nodes.h:925
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:923
const POS m_varpos
Definition: parse_tree_nodes.h:922
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:524
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:924
Definition: parse_tree_nodes.h:1266
Parse_tree_node super
Definition: parse_tree_nodes.h:1267
POS set_pos
Definition: parse_tree_nodes.h:1269
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4221
PT_start_option_value_list * list
Definition: parse_tree_nodes.h:1270
PT_set(const POS &pos, const POS &set_pos_arg, PT_start_option_value_list *list_arg)
Definition: parse_tree_nodes.h:1273
Base class for Parse tree nodes of SHOW statements.
Definition: parse_tree_nodes.h:3286
PT_show_base(const POS &pos, enum_sql_command sql_command)
Definition: parse_tree_nodes.h:3288
enum_sql_command m_sql_command
SQL command.
Definition: parse_tree_nodes.h:3292
Parse tree node for SHOW BINARY LOG STATUS statement.
Definition: parse_tree_nodes.h:3743
PT_show_binary_log_status(const POS &pos)
Definition: parse_tree_nodes.h:3745
Sql_cmd_show_binary_log_status m_sql_cmd
Definition: parse_tree_nodes.h:3751
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2833
Parse tree node for SHOW BINLOG EVENTS statement.
Definition: parse_tree_nodes.h:3360
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3372
Sql_cmd_show_binlog_events m_sql_cmd
Definition: parse_tree_nodes.h:3374
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:3362
const LEX_STRING m_opt_log_file_name
Definition: parse_tree_nodes.h:3371
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2567
Parse tree node for SHOW BINLOGS statement.
Definition: parse_tree_nodes.h:3379
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2579
PT_show_binlogs(const POS &pos)
Definition: parse_tree_nodes.h:3381
Sql_cmd_show_binlogs m_sql_cmd
Definition: parse_tree_nodes.h:3386
Parse tree node for SHOW CHARACTER SET statement.
Definition: parse_tree_nodes.h:3391
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2586
PT_show_charsets(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3393
Sql_cmd_show_charsets m_sql_cmd
Definition: parse_tree_nodes.h:3399
Parse tree node for SHOW COLLATIONS statement.
Definition: parse_tree_nodes.h:3404
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2599
PT_show_collations(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3406
Sql_cmd_show_collations m_sql_cmd
Definition: parse_tree_nodes.h:3412
Base class for Parse tree nodes of SHOW COUNT(*) { WARNINGS | ERRORS } statements.
Definition: parse_tree_nodes.h:3418
Sql_cmd * make_cmd_generic(THD *thd, LEX_CSTRING diagnostic_variable_name)
Definition: parse_tree_nodes.cc:2612
PT_show_count_base(const POS &pos)
Definition: parse_tree_nodes.h:3420
Parse tree node for SHOW COUNT(*) ERRORS.
Definition: parse_tree_nodes.h:3429
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.h:3433
PT_show_count_errors(const POS &pos)
Definition: parse_tree_nodes.h:3431
Parse tree node for SHOW COUNT(*) WARNINGS.
Definition: parse_tree_nodes.h:3440
PT_show_count_warnings(const POS &pos)
Definition: parse_tree_nodes.h:3442
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.h:3444
Parse tree node for SHOW CREATE DATABASE statement.
Definition: parse_tree_nodes.h:3451
const LEX_STRING m_name
Definition: parse_tree_nodes.h:3463
PT_show_create_database(const POS &pos, bool if_not_exists, const LEX_STRING &name)
Definition: parse_tree_nodes.h:3453
Sql_cmd_show_create_database m_sql_cmd
Definition: parse_tree_nodes.h:3465
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2644
const bool m_if_not_exists
Definition: parse_tree_nodes.h:3462
Parse tree node for SHOW CREATE EVENT statement.
Definition: parse_tree_nodes.h:3470
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2657
sp_name *const m_spname
Definition: parse_tree_nodes.h:3478
PT_show_create_event(const POS &pos, sp_name *event_name)
Definition: parse_tree_nodes.h:3472
Sql_cmd_show_create_event m_sql_cmd
Definition: parse_tree_nodes.h:3480
Parse tree node for SHOW CREATE FUNCTION statement.
Definition: parse_tree_nodes.h:3485
Sql_cmd_show_create_function m_sql_cmd
Definition: parse_tree_nodes.h:3495
PT_show_create_function(const POS &pos, sp_name *function_name)
Definition: parse_tree_nodes.h:3487
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2666
sp_name *const m_spname
Definition: parse_tree_nodes.h:3493
Parse tree node for SHOW CREATE PROCEDURE statement.
Definition: parse_tree_nodes.h:3500
Sql_cmd_show_create_procedure m_sql_cmd
Definition: parse_tree_nodes.h:3510
sp_name *const m_spname
Definition: parse_tree_nodes.h:3508
PT_show_create_procedure(const POS &pos, sp_name *procedure_name)
Definition: parse_tree_nodes.h:3502
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2675
Parse tree node for SHOW CREATE TABLE and VIEW statements.
Definition: parse_tree_nodes.h:3515
Sql_cmd_show_create_table m_sql_cmd
Definition: parse_tree_nodes.h:3523
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2684
PT_show_create_table(const POS &pos, Table_ident *table_ident)
Definition: parse_tree_nodes.h:3517
Parse tree node for SHOW CREATE TRIGGER statement.
Definition: parse_tree_nodes.h:3528
PT_show_create_trigger(const POS &pos, sp_name *trigger_name)
Definition: parse_tree_nodes.h:3530
Sql_cmd_show_create_trigger m_sql_cmd
Definition: parse_tree_nodes.h:3538
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2703
sp_name *const m_spname
Definition: parse_tree_nodes.h:3536
Parse tree node for SHOW CREATE USER statement.
Definition: parse_tree_nodes.h:3543
Sql_cmd_show_create_user m_sql_cmd
Definition: parse_tree_nodes.h:3553
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2712
PT_show_create_user(const POS &pos, LEX_USER *user)
Definition: parse_tree_nodes.h:3545
LEX_USER *const m_user
Definition: parse_tree_nodes.h:3551
Parse tree node for SHOW CREATE VIEW statement.
Definition: parse_tree_nodes.h:3558
PT_show_create_view(const POS &pos, Table_ident *table_ident)
Definition: parse_tree_nodes.h:3560
Sql_cmd_show_create_table m_sql_cmd
Definition: parse_tree_nodes.h:3566
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2696
Parse tree node for SHOW DATABASES statement.
Definition: parse_tree_nodes.h:3571
Sql_cmd_show_databases m_sql_cmd
Definition: parse_tree_nodes.h:3579
PT_show_databases(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3573
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2721
Parse tree node for SHOW ENGINE statements.
Definition: parse_tree_nodes.h:3584
PT_show_engine_base(const POS &pos, enum enum_sql_command sql_command, const LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3586
LEX_STRING m_engine
Definition: parse_tree_nodes.h:3592
bool m_all
Definition: parse_tree_nodes.h:3593
Parse tree node for SHOW ENGINE LOGS statement.
Definition: parse_tree_nodes.h:3598
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2734
PT_show_engine_logs(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3600
Sql_cmd_show_engine_logs m_sql_cmd
Definition: parse_tree_nodes.h:3606
Parse tree node for SHOW ENGINE MUTEX statement.
Definition: parse_tree_nodes.h:3611
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2748
Sql_cmd_show_engine_mutex m_sql_cmd
Definition: parse_tree_nodes.h:3619
PT_show_engine_mutex(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3613
Parse tree node for SHOW ENGINE STATUS statement.
Definition: parse_tree_nodes.h:3624
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2762
PT_show_engine_status(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3626
Sql_cmd_show_engine_status m_sql_cmd
Definition: parse_tree_nodes.h:3632
Parse tree node for SHOW ENGINES statement.
Definition: parse_tree_nodes.h:3637
PT_show_engines(const POS &pos)
Definition: parse_tree_nodes.h:3639
Sql_cmd_show_engines m_sql_cmd
Definition: parse_tree_nodes.h:3645
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2776
Parse tree node for SHOW ERRORS statement.
Definition: parse_tree_nodes.h:3650
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3659
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2785
Sql_cmd_show_errors m_sql_cmd
Definition: parse_tree_nodes.h:3661
PT_show_errors(const POS &pos, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:3652
Parse tree node for SHOW EVENTS statement.
Definition: parse_tree_nodes.h:3666
Sql_cmd_show_events m_sql_cmd
Definition: parse_tree_nodes.h:3675
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2819
PT_show_events(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3668
Parse tree node for SHOW COLUMNS statement.
Definition: parse_tree_nodes.h:3680
Sql_cmd_show_columns m_sql_cmd
Definition: parse_tree_nodes.h:3694
Show_cmd_type m_show_cmd_type
Definition: parse_tree_nodes.h:3693
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:3684
PT_show_table_base super
Definition: parse_tree_nodes.h:3681
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2797
Base class for Parse tree nodes of SHOW statements with LIKE/WHERE parameter.
Definition: parse_tree_nodes.h:3297
Item * m_where
Definition: parse_tree_nodes.h:3306
PT_show_filter_base(const POS &pos, enum_sql_command sql_command, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3299
LEX_STRING m_wild
Wild or where clause used in the statement.
Definition: parse_tree_nodes.h:3305
Parse tree node for SHOW FUNCTION CODE statement.
Definition: parse_tree_nodes.h:3699
PT_show_function_code(const POS &pos, const sp_name *function_name)
Definition: parse_tree_nodes.h:3701
Parse tree node for SHOW GRANTS statement.
Definition: parse_tree_nodes.h:3707
Sql_cmd_show_grants sql_cmd
Definition: parse_tree_nodes.h:3719
PT_show_grants(const POS &pos, const LEX_USER *opt_for_user, const List< LEX_USER > *opt_using_users)
Definition: parse_tree_nodes.h:3709
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4703
Parse tree node for SHOW INDEX statement.
Definition: parse_tree_nodes.h:3724
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2811
PT_show_keys(const POS &pos, bool extended_show, Table_ident *table, Item *where)
Definition: parse_tree_nodes.h:3726
Sql_cmd_show_keys m_sql_cmd
Definition: parse_tree_nodes.h:3738
bool m_extended_show
Definition: parse_tree_nodes.h:3737
PT_show_table_base super
Definition: parse_tree_nodes.h:3734
Parse tree node for SHOW OPEN TABLES statement.
Definition: parse_tree_nodes.h:3756
PT_show_open_tables(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3758
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2840
Sql_cmd_show_open_tables m_sql_cmd
Definition: parse_tree_nodes.h:3766
Parse tree node for SHOW PARSE_TREE statement.
Definition: parse_tree_nodes.h:3796
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4708
Parse_tree_root *const m_parse_tree_stmt
Definition: parse_tree_nodes.h:3805
Sql_cmd_show_parse_tree m_sql_cmd
Definition: parse_tree_nodes.h:3806
PT_show_parse_tree(const POS &pos, Parse_tree_root *parse_tree_stmt)
Definition: parse_tree_nodes.h:3798
Parse tree node for SHOW PLUGINS statement.
Definition: parse_tree_nodes.h:3771
Sql_cmd_show_plugins m_sql_cmd
Definition: parse_tree_nodes.h:3778
PT_show_plugins(const POS &pos)
Definition: parse_tree_nodes.h:3773
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2858
Parse tree node for SHOW PRIVILEGES statement.
Definition: parse_tree_nodes.h:3783
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2867
PT_show_privileges(const POS &pos)
Definition: parse_tree_nodes.h:3785
Sql_cmd_show_privileges m_sql_cmd
Definition: parse_tree_nodes.h:3791
Parse tree node for SHOW FUNCTION CODE statement.
Definition: parse_tree_nodes.h:3811
PT_show_procedure_code(const POS &pos, const sp_name *procedure_name)
Definition: parse_tree_nodes.h:3813
Parse tree node for SHOW PROCESSLIST statement.
Definition: parse_tree_nodes.h:3819
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2874
Sql_cmd_show_processlist m_sql_cmd
Definition: parse_tree_nodes.h:3827
PT_show_processlist(const POS &pos, bool verbose)
Definition: parse_tree_nodes.h:3821
Parse tree node for SHOW PROFILE statement.
Definition: parse_tree_nodes.h:3832
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2897
uint m_opt_profile_options
Definition: parse_tree_nodes.h:3845
Sql_cmd_show_profile m_sql_cmd
Definition: parse_tree_nodes.h:3849
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:3834
my_thread_id m_opt_query_id
Definition: parse_tree_nodes.h:3846
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3847
Parse tree node for SHOW PROFILES statement.
Definition: parse_tree_nodes.h:3854
PT_show_profiles(const POS &pos)
Definition: parse_tree_nodes.h:3856
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2912
Sql_cmd_show_profiles m_sql_cmd
Definition: parse_tree_nodes.h:3861
Parse tree node for SHOW RELAYLOG EVENTS statement.
Definition: parse_tree_nodes.h:3866
Sql_cmd_show_relaylog_events m_sql_cmd
Definition: parse_tree_nodes.h:3884
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:3868
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3881
const LEX_STRING m_opt_log_file_name
Definition: parse_tree_nodes.h:3880
const LEX_CSTRING m_opt_channel_name
Definition: parse_tree_nodes.h:3882
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2919
Parse tree node for SHOW REPLICA STATUS statement.
Definition: parse_tree_nodes.h:3901
Sql_cmd_show_replica_status m_sql_cmd
Definition: parse_tree_nodes.h:3912
const LEX_CSTRING m_opt_channel_name
Definition: parse_tree_nodes.h:3910
PT_show_replica_status(const POS &pos, LEX_CSTRING opt_channel_name={})
Definition: parse_tree_nodes.h:3903
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2939
Parse tree node for SHOW REPLICAS statement.
Definition: parse_tree_nodes.h:3889
Sql_cmd_show_replicas m_sql_cmd
Definition: parse_tree_nodes.h:3896
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2932
PT_show_replicas(const POS &pos)
Definition: parse_tree_nodes.h:3891
Parse tree node for SHOW FUNCTION/PROCEDURE CODE statements.
Definition: parse_tree_nodes.h:3346
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2890
Sql_cmd_show_routine_code m_sql_cmd
Definition: parse_tree_nodes.h:3355
PT_show_routine_code(const POS &pos, enum_sql_command sql_command, const sp_name *routine_name)
Definition: parse_tree_nodes.h:3348
Base class for Parse tree nodes of SHOW statements with schema parameter.
Definition: parse_tree_nodes.h:3311
char * m_opt_db
Optional schema name in FROM/IN clause.
Definition: parse_tree_nodes.h:3322
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:3313
Item * m_where
Definition: parse_tree_nodes.h:3325
LEX_STRING m_wild
Wild or where clause used in the statement.
Definition: parse_tree_nodes.h:3324
Parse tree node for SHOW STATUS FUNCTION statement.
Definition: parse_tree_nodes.h:3936
Sql_cmd_show_status_func m_sql_cmd
Definition: parse_tree_nodes.h:3944
PT_show_status_func(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3938
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2964
Parse tree node for SHOW STATUS PROCEDURE statement.
Definition: parse_tree_nodes.h:3949
PT_show_status_proc(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3951
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2977
Sql_cmd_show_status_proc m_sql_cmd
Definition: parse_tree_nodes.h:3957
Parse tree node for SHOW STATUS statement.
Definition: parse_tree_nodes.h:3917
enum_var_type m_var_type
Definition: parse_tree_nodes.h:3931
Sql_cmd_show_status m_sql_cmd
Definition: parse_tree_nodes.h:3929
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2948
PT_show_status(const POS &pos, enum_var_type var_type, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3919
Base class for Parse tree nodes of SHOW COLUMNS/SHOW INDEX statements.
Definition: parse_tree_nodes.h:3330
bool make_table_base_cmd(THD *thd, bool *temporary)
Definition: parse_tree_nodes.cc:2483
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:3332
Table_ident * m_table_ident
Table used in the statement.
Definition: parse_tree_nodes.h:3341
Parse tree node for SHOW TABLE STATUS statement.
Definition: parse_tree_nodes.h:3962
Sql_cmd_show_table_status m_sql_cmd
Definition: parse_tree_nodes.h:3972
PT_show_table_status(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3964
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2990
Parse tree node for SHOW TABLES statement.
Definition: parse_tree_nodes.h:3977
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3005
Show_cmd_type m_show_cmd_type
Definition: parse_tree_nodes.h:3989
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:3979
Sql_cmd_show_tables m_sql_cmd
Definition: parse_tree_nodes.h:3987
Parse tree node for SHOW TRIGGERS statement.
Definition: parse_tree_nodes.h:3994
PT_show_triggers(const POS &pos, bool full, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3996
bool m_full
Definition: parse_tree_nodes.h:4006
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3021
Sql_cmd_show_triggers m_sql_cmd
Definition: parse_tree_nodes.h:4004
Parse tree node for SHOW VARIABLES statement.
Definition: parse_tree_nodes.h:4011
enum_var_type m_var_type
Definition: parse_tree_nodes.h:4025
Sql_cmd_show_variables m_sql_cmd
Definition: parse_tree_nodes.h:4023
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3036
PT_show_variables(const POS &pos, enum_var_type var_type, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:4013
Parse tree node for SHOW WARNINGS statement.
Definition: parse_tree_nodes.h:4030
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:4039
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3052
Sql_cmd_show_warnings m_sql_cmd
Definition: parse_tree_nodes.h:4041
PT_show_warnings(const POS &pos, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:4032
Top-level node for the SHUTDOWN statement.
Definition: parse_tree_nodes.h:2143
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.h:2147
Sql_cmd_shutdown sql_cmd
Definition: parse_tree_nodes.h:2144
Definition: parse_tree_nodes.h:1214
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:1222
POS head_pos
Definition: parse_tree_nodes.h:1218
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4190
PT_start_option_value_list_following_option_type super
Definition: parse_tree_nodes.h:1215
PT_option_value_list_head * opt_tail
Definition: parse_tree_nodes.h:1219
PT_set_scoped_system_variable * head
Definition: parse_tree_nodes.h:1217
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4204
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:1241
PT_transaction_characteristics * characteristics
Definition: parse_tree_nodes.h:1237
PT_start_option_value_list_following_option_type super
Definition: parse_tree_nodes.h:1235
POS characteristics_pos
Definition: parse_tree_nodes.h:1238
Definition: parse_tree_nodes.h:1207
PT_start_option_value_list_following_option_type(const POS &pos)
Definition: parse_tree_nodes.h:1209
Definition: parse_tree_nodes.h:1123
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1124
POS head_pos
Definition: parse_tree_nodes.h:1127
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:1131
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4144
PT_option_value_list_head * tail
Definition: parse_tree_nodes.h:1128
PT_option_value_no_option_type * head
Definition: parse_tree_nodes.h:1126
Definition: parse_tree_nodes.h:1189
PT_transaction_characteristics * characteristics
Definition: parse_tree_nodes.h:1192
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1190
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4175
POS end_pos
Definition: parse_tree_nodes.h:1193
PT_start_option_value_list_transaction(const POS &pos, PT_transaction_characteristics *characteristics_arg, const POS &end_pos_arg)
Definition: parse_tree_nodes.h:1196
Definition: parse_tree_nodes.h:1251
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1252
PT_start_option_value_list_following_option_type * list
Definition: parse_tree_nodes.h:1255
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4216
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:1258
enum_var_type type
Definition: parse_tree_nodes.h:1254
Definition: parse_tree_nodes.h:1013
PT_start_option_value_list(const POS &pos)
Definition: parse_tree_nodes.h:1015
Definition: parse_tree_nodes.h:3219
PT_static_privilege(const POS &pos, const POS &errpos, uint grant, const Mem_root_array< LEX_CSTRING > *columns=nullptr)
Definition: parse_tree_nodes.h:3224
const Mem_root_array< LEX_CSTRING > * columns
Definition: parse_tree_nodes.h:3221
const uint grant
Definition: parse_tree_nodes.h:3220
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:4664
Definition: parse_tree_nodes.h:1774
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4411
Parse_tree_node super
Definition: parse_tree_nodes.h:1775
PT_query_expression_body * qe
Definition: parse_tree_nodes.h:1777
bool m_is_derived_table
Definition: parse_tree_nodes.h:1781
Query_block * value()
Definition: parse_tree_nodes.h:1791
Query_block * query_block
Definition: parse_tree_nodes.h:1778
PT_subquery(const POS &pos, PT_query_expression_body *query_expression)
Definition: parse_tree_nodes.h:1783
Definition: parse_tree_nodes.h:2470
PT_table_constraint_def(const POS &pos)
Definition: parse_tree_nodes.h:2472
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:2465
PT_table_element(const POS &pos)
Definition: parse_tree_nodes.h:2467
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:1356
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:1466
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:3873
void add_json_info(Json_object *obj) override
Add all the node-specific json fields.
Definition: parse_tree_nodes.cc:3900
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:782
Table_ident_list m_tables
Definition: parse_tree_nodes.h:798
bool raise_error(THD *thd, const Table_ident *name, int error)
Definition: parse_tree_nodes.cc:4027
bool set_lock_for_tables(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2462
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:786
Mem_root_array_YY< Table_ident * > Table_ident_list
Definition: parse_tree_nodes.h:784
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:3911
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:161
Definition: parse_tree_nodes.h:1589
PT_insert_values_list *const row_value_list
Definition: parse_tree_nodes.h:1592
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1604
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1601
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1610
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:1606
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1602
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1308
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1608
PT_query_primary super
Definition: parse_tree_nodes.h:1590
PT_table_value_constructor(const POS &pos, PT_insert_values_list *row_value_list_arg)
Definition: parse_tree_nodes.h:1595
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:2719
PT_create_table_option super
Definition: parse_tree_nodes.h:2720
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2728
const Ternary_option value
Definition: parse_tree_nodes.h:2722
PT_ternary_create_table_option(const POS &pos, Ternary_option value)
Definition: parse_tree_nodes.h:2725
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:2581
PT_traceable_create_table_option(const POS &pos, Option_type value)
Definition: parse_tree_nodes.h:2587
const Option_type value
Definition: parse_tree_nodes.h:2584
PT_create_table_option super
Definition: parse_tree_nodes.h:2582
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2590
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:2393
bool do_contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2398
Option_type m_option_value
Definition: parse_tree_nodes.h:2405
PT_traceable_index_option(const POS &pos, Option_type option_value)
Definition: parse_tree_nodes.h:2395
Definition: parse_tree_nodes.h:1154
PT_transaction_characteristic super
Definition: parse_tree_nodes.h:1155
PT_transaction_access_mode(const POS &pos, bool is_read_only)
Definition: parse_tree_nodes.h:1158
Definition: parse_tree_nodes.h:1140
int32 value
Definition: parse_tree_nodes.h:1144
Parse_tree_node super
Definition: parse_tree_nodes.h:1141
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4156
PT_transaction_characteristic(const POS &pos, const char *name_arg, int32 value_arg)
Definition: parse_tree_nodes.h:1147
const char * name
Definition: parse_tree_nodes.h:1143
Definition: parse_tree_nodes.h:1170
PT_transaction_characteristic * opt_tail
Definition: parse_tree_nodes.h:1174
PT_transaction_characteristics(const POS &pos, PT_transaction_characteristic *head_arg, PT_transaction_characteristic *opt_tail_arg)
Definition: parse_tree_nodes.h:1177
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1182
PT_transaction_characteristic * head
Definition: parse_tree_nodes.h:1173
Parse_tree_node super
Definition: parse_tree_nodes.h:1171
Definition: parse_tree_nodes.h:5039
PT_truncate_table_stmt(const POS &pos, Table_ident *table)
Definition: parse_tree_nodes.h:5041
Sql_cmd_truncate_table m_cmd_truncate_table
Definition: parse_tree_nodes.h:5049
Table_ident * m_table
Definition: parse_tree_nodes.h:5047
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3392
Base class for all column type nodes.
Definition: parse_tree_column_attrs.h:556
Definition: parse_tree_nodes.h:1846
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1808
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1852
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:1798
Top-level node for the UPDATE statement.
Definition: parse_tree_nodes.h:1999
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:2002
Item * opt_limit_clause
Definition: parse_tree_nodes.h:2011
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:2014
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:976
Mem_root_array_YY< PT_table_reference * > join_table_list
Definition: parse_tree_nodes.h:2006
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:2003
bool opt_ignore
Definition: parse_tree_nodes.h:2005
PT_item_list * value_list
Definition: parse_tree_nodes.h:2008
thr_lock_type opt_low_priority
Definition: parse_tree_nodes.h:2004
PT_item_list * column_list
Definition: parse_tree_nodes.h:2007
Parse_tree_root super
Definition: parse_tree_nodes.h:2000
PT_order * opt_order_clause
Definition: parse_tree_nodes.h:2010
Item * opt_where_clause
Definition: parse_tree_nodes.h:2009
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:2088
bool do_contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2077
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:2026
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:319
bool is_contextualized() const
Definition: parse_tree_node_base.h:309
void error(Context *pc, const POS &pos) const
syntax_error() function replacement for deferred reporting of syntax errors
Definition: parse_tree_node_base.h:344
virtual bool do_contextualize(Context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_node_base.h:283
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:1163
bool clear_correlated_query_blocks()
Empties all correlated query blocks defined within the query expression; that is, correlated CTEs def...
Definition: sql_union.cc:1628
Common base class for n-ary set operations, including unary.
Definition: query_term.h:402
Simple intrusive linked list.
Definition: sql_list.h:47
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
LEX_STRING column_name
Name of the column if check clause is defined at the column level.
Definition: sql_check_constraint.h:83
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
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:617
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
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:628
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:641
Sql_cmd_set_role represents the SET ROLE ... statement.
Definition: sql_admin.h:260
Represents SHOW BINARY LOG STATUS statement.
Definition: sql_show.h:442
Following are all subclasses of class Sql_cmd_show, in alphabetical order.
Definition: sql_show.h:236
Represents SHOW BINARY LOGS statement.
Definition: sql_show.h:251
Represents SHOW CHARACTER SET statement.
Definition: sql_show.h:260
Represents SHOW COLLATION statement.
Definition: sql_show.h:267
Represents SHOW COLUMNS statement.
Definition: sql_show.h:274
Represents SHOW CREATE DATABASE statement.
Definition: sql_show.h:281
Represents SHOW CREATE EVENT statement.
Definition: sql_show.h:290
Represents SHOW CREATE FUNCTION statement.
Definition: sql_show.h:299
Represents SHOW CREATE PROCEDURE statement.
Definition: sql_show.h:309
Represents SHOW CREATE TABLE/VIEW statement.
Definition: sql_show.h:319
Represents SHOW CREATE TRIGGER statement.
Definition: sql_show.h:335
Represents SHOW CREATE USER statement.
Definition: sql_show.h:345
Represents SHOW DATABASES statement.
Definition: sql_show.h:354
Represents SHOW ENGINE LOGS statement.
Definition: sql_show.h:362
Represents SHOW ENGINE MUTEX statement.
Definition: sql_show.h:371
Represents SHOW ENGINE STATUS statement.
Definition: sql_show.h:380
Represents SHOW STORAGE ENGINES statement.
Definition: sql_show.h:390
Represents SHOW ERRORS statement.
Definition: sql_show.h:397
Represents SHOW EVENTS statement.
Definition: sql_show.h:407
Represents SHOW GRANTS statement.
Definition: sql_show.h:417
Represents the SHOW INDEX statement.
Definition: sql_show.h:435
Represents SHOW OPEN TABLES statement.
Definition: sql_show.h:452
Represents SHOW PARSE_TREE statement.
Definition: sql_show.h:494
Represents SHOW PLUGINS statement.
Definition: sql_show.h:459
Represents SHOW PRIVILEGES statement.
Definition: sql_show.h:466
Represents SHOW PROCESSLIST statement.
Definition: sql_show.h:474
Represents SHOW PROFILE statement.
Definition: sql_show.h:501
Represents SHOW PROFILES statement.
Definition: sql_show.h:508
Represents SHOW RELAYLOG EVENTS statement.
Definition: sql_show.h:516
Represents SHOW REPLICA STATUS statement.
Definition: sql_show.h:540
Represents SHOW REPLICAS statement.
Definition: sql_show.h:531
Represents SHOW FUNCTION CODE and SHOW PROCEDURE CODE statements.
Definition: sql_show.h:220
Represents SHOW STATUS FUNCTION statement.
Definition: sql_show.h:558
Represents SHOW STATUS PROCEDURE statement.
Definition: sql_show.h:565
Represents SHOW STATUS statement.
Definition: sql_show.h:550
Represents SHOW TABLE STATUS statement.
Definition: sql_show.h:572
Represents SHOW TABLES statement.
Definition: sql_show.h:580
Represents SHOW TRIGGERS statement.
Definition: sql_show.h:587
Represents SHOW VARIABLES statement.
Definition: sql_show.h:594
Represents SHOW WARNINGS statement.
Definition: sql_show.h:601
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:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: sql_lex.h:296
Definition: table.h:2864
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:111
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:383
Definition: sp_head.h:123
Used to hold information about file and file structure in exchange via non-DB file (....
Definition: sql_exchange.h:79
Field_separators field
Definition: sql_exchange.h:81
const CHARSET_INFO * cs
Definition: sql_exchange.h:87
Line_separators line
Definition: sql_exchange.h:82
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:216
bool make_subquery_node(THD *thd, PT_subquery **node)
Definition: sql_parse.cc:5729
bool lookup(Table_ref *tl, PT_common_table_expr **found)
Looks up a table reference into the list of CTEs.
Definition: sql_parse.cc:5830
bool match_table_ref(Table_ref *tl, bool in_self, bool *found)
Definition: sql_parse.cc:5911
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:2625
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:2763
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:2670
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:2819
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:2652
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:2661
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:2780
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:2834
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:2643
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:2607
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:2616
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:2634
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:46
#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:477
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:720
#define HA_OPTION_NO_PACK_KEYS
PACK_KEYS=0 option was specified.
Definition: my_base.h:663
#define HA_OPTION_CHECKSUM
CHECKSUM=1 option was specified.
Definition: my_base.h:648
#define HA_OPTION_NO_CHECKSUM
CHECKSUM=0 option was specified.
Definition: my_base.h:715
#define HA_OPTION_DELAY_KEY_WRITE
DELAY_KEY_WRITE=1 option was specified.
Definition: my_base.h:656
ha_key_alg
Definition: my_base.h:98
#define HA_OPTION_STATS_PERSISTENT
STATS_PERSISTENT=1 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:688
ha_storage_media
Definition: my_base.h:116
#define HA_OPTION_PACK_KEYS
PACK_KEYS=1 option was specified.
Definition: my_base.h:616
#define HA_OPTION_NO_STATS_PERSISTENT
STATS_PERSISTENT=0 has been specified in CREATE/ALTER TABLE.
Definition: my_base.h:695
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_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_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_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:63
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:455
@ INTERVAL_LAST
Definition: my_time.h:476
static bool column_names
Definition: mysql.cc:173
char * user
Definition: mysqladmin.cc:66
static bool ignore_errors
Definition: mysqlcheck.cc:62
static uint verbose
Definition: mysqlcheck.cc:66
static char * path
Definition: mysqldump.cc:149
static char * where
Definition: mysqldump.cc:152
static longlong opt_ignore_lines
Definition: mysqlimport.cc:85
static Secondary_engine * secondary_engine
Definition: mysqltest.cc:256
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:1086
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
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
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
static std::string lower(std::string_view str)
Definition: config_parser.cc:65
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:31
EXPLAIN <command>.
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:5131
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:2674
#define TYPE_AND_REF(x)
Definition: parse_tree_nodes.h:2598
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:2711
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:2683
PT_index_option< ulong, &KEY_CREATE_INFO::block_size > PT_block_size
Definition: parse_tree_nodes.h:2409
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:4985
PT_index_option< LEX_CSTRING, &KEY_CREATE_INFO::comment > PT_index_comment
Definition: parse_tree_nodes.h:2411
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:2695
Mem_root_array_YY< PT_base_index_option * > Index_options
Definition: parse_tree_nodes.h:2408
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:2691
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:5111
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:5589
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:2687
PT_index_option< LEX_CSTRING, &KEY_CREATE_INFO::parser_name > PT_fulltext_index_parser_name
Definition: parse_tree_nodes.h:2413
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:5052
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:5006
Parse_tree_node_tmpl< Alter_tablespace_parse_context > PT_alter_tablespace_option_base
Definition: parse_tree_nodes.h:5235
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:2426
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:2709
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:5619
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:5082
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:2699
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:5029
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:2704
PT_index_option< bool, &KEY_CREATE_INFO::is_visible > PT_index_visibility
Definition: parse_tree_nodes.h:2414
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:2679
On_duplicate
Definition: parser_yystype.h:243
Locked_row_action
We will static_cast this one to thr_lock_type.
Definition: parser_yystype.h:214
Lock_strength
Definition: parser_yystype.h:211
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:226
@ JTT_LEFT
Definition: parser_yystype.h:230
@ JTT_STRAIGHT_INNER
Definition: parser_yystype.h:233
@ JTT_NATURAL_LEFT
Definition: parser_yystype.h:235
@ JTT_NATURAL
Definition: parser_yystype.h:229
@ JTT_NATURAL_INNER
Definition: parser_yystype.h:234
@ JTT_NATURAL_RIGHT
Definition: parser_yystype.h:236
@ JTT_STRAIGHT
Definition: parser_yystype.h:228
@ JTT_RIGHT
Definition: parser_yystype.h:231
@ JTT_INNER
Definition: parser_yystype.h:227
Show_cmd_type
Definition: parser_yystype.h:261
Ternary_option
Definition: parser_yystype.h:241
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:89
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:91
@ OPT_GLOBAL
Definition: set_var.h:94
@ OPT_SESSION
Definition: set_var.h:93
#define HA_CREATE_USED_COMPRESS
COMPRESSION="zlib|lz4|none" used during table create.
Definition: handler.h:769
#define HA_CREATE_USED_CONNECTION
Definition: handler.h:736
#define HA_CREATE_USED_INSERT_METHOD
Definition: handler.h:721
#define HA_CREATE_USED_PACK_KEYS
Definition: handler.h:725
#define HA_CREATE_USED_DATADIR
Definition: handler.h:728
#define HA_CREATE_USED_KEY_BLOCK_SIZE
Definition: handler.h:737
#define HA_CREATE_USED_INDEXDIR
Definition: handler.h:729
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:811
#define HA_CREATE_USED_TABLESPACE
This is set whenever a 'TABLESPACE=...' phrase is used on CREATE TABLE.
Definition: handler.h:766
enum_tx_isolation
Definition: handler.h:3186
#define HA_CREATE_USED_ROW_FORMAT
Definition: handler.h:733
#define HA_CREATE_USED_ENCRYPT
ENCRYPTION="Y" used during table create.
Definition: handler.h:772
#define HA_CREATE_USED_DELAY_KEY_WRITE
Definition: handler.h:732
#define HA_CREATE_USED_MIN_ROWS
Definition: handler.h:722
#define HA_CREATE_USED_PASSWORD
Definition: handler.h:735
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:795
#define HA_CREATE_USED_COMMENT
Definition: handler.h:734
#define HA_CREATE_USED_MAX_ROWS
Definition: handler.h:723
#define HA_CREATE_USED_CHECKSUM
Definition: handler.h:731
#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:747
#define HA_CREATE_USED_AVG_ROW_LENGTH
Definition: handler.h:724
#define HA_CREATE_USED_AUTO
Definition: handler.h:718
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:142
enum_filetype
Definition: sql_exchange.h:32
enum_source_type
Definition: sql_exchange.h:30
case opt name
Definition: sslopt-case.h:29
#define STRING_WITH_LEN(X)
Definition: string_with_len.h:29
Definition: parse_tree_nodes.h:5226
Alter_tablespace_parse_context(THD *thd, bool show_parse_tree=false)
Definition: parse_tree_nodes.cc:4882
THD *const thd
Definition: parse_tree_nodes.h:5227
MEM_ROOT *const mem_root
Definition: parse_tree_nodes.h:5228
Definition: m_ctype.h:423
Definition: parse_tree_nodes.h:3176
const LEX_STRING ident
Definition: parse_tree_nodes.h:3177
Dynamic_privilege(const LEX_STRING &ident, const Mem_root_array< LEX_CSTRING > *columns_arg)
Definition: parse_tree_nodes.h:3179
Helper for the sql_exchange class.
Definition: sql_exchange.h:53
void merge_field_separators(const Field_separators &s)
Definition: sql_exchange.h:63
uint sql_flags
Definition: handler.h:3793
uint flags
Definition: handler.h:3792
Struct to hold information about the table that should be created.
Definition: handler.h:3202
ulonglong auto_increment_value
Definition: handler.h:3241
bool m_transactional_ddl
Definition: handler.h:3279
enum row_type row_type
Row type of the table definition.
Definition: handler.h:3262
LEX_STRING compress
Algorithm (and possible options) to be used for InnoDB's transparent page compression.
Definition: handler.h:3218
LEX_STRING encrypt_type
This attribute is used for InnoDB's transparent page encryption.
Definition: handler.h:3226
ulong avg_row_length
Definition: handler.h:3243
const char * data_file_name
Definition: handler.h:3236
ulonglong m_implicit_tablespace_autoextend_size
Definition: handler.h:3284
ulong table_options
Definition: handler.h:3242
uint stats_sample_pages
Definition: handler.h:3248
uint merge_insert_method
Definition: handler.h:3265
LEX_STRING connect_string
Definition: handler.h:3206
const char * tablespace
Definition: handler.h:3208
ulonglong max_rows
Definition: handler.h:3239
const char * password
Definition: handler.h:3207
ha_storage_media storage_media
Definition: handler.h:3266
LEX_STRING comment
Definition: handler.h:3209
const char * index_file_name
Definition: handler.h:3237
std::uint32_t key_block_size
Definition: handler.h:3247
ulonglong min_rows
Definition: handler.h:3240
uint64_t used_fields
Definition: handler.h:3244
Definition: table.h:2731
Definition: parser_yystype.h:189
bool is_offset_first
Definition: parser_yystype.h:195
Helper for the sql_exchange class.
Definition: sql_exchange.h:38
void merge_line_separators(const Line_separators &s)
Definition: sql_exchange.h:43
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
Bison "location" class.
Definition: parse_location.h:43
Definition: table.h:286
const char * used_alias
Tells whether this ORDER element was referenced with an alias or with an expression in the query,...
Definition: table.h:324
Item * item_initial
The initial ordering expression.
Definition: table.h:303
ORDER * next
Definition: table.h:290
enum_order direction
Definition: table.h:315
table_map used
Definition: table.h:336
Definition: parse_tree_node_base.h:403
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:420
THD *const thd
Current thread handler.
Definition: parse_tree_node_base.h:421
MEM_ROOT * mem_root
Current MEM_ROOT.
Definition: parse_tree_node_base.h:422
This class is used for representing both static and dynamic privileges on global as well as table and...
Definition: parse_tree_nodes.h:3158
const Mem_root_array< LEX_CSTRING > * columns
Definition: parse_tree_nodes.h:3162
Privilege(privilege_type type, const Mem_root_array< LEX_CSTRING > *columns)
Definition: parse_tree_nodes.h:3164
privilege_type
Definition: parse_tree_nodes.h:3159
@ STATIC
Definition: parse_tree_nodes.h:3159
@ DYNAMIC
Definition: parse_tree_nodes.h:3159
privilege_type type
Definition: parse_tree_nodes.h:3161
Info on properties that can be set with '–disable_X' and '–disable_X' commands.
Definition: mysqltest.cc:277
Definition: parse_tree_node_base.h:115
Definition: parser_yystype.h:198
Definition: sql_cmd_srs.h:41
Definition: parse_tree_nodes.h:3169
const uint grant
Definition: parse_tree_nodes.h:3170
Static_privilege(uint grant, const Mem_root_array< LEX_CSTRING > *columns_arg)
Definition: parse_tree_nodes.h:3172
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:153
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:323
Definition: task.h:427
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
command
Definition: version_token.cc:280
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