MySQL 8.0.42
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
parse_tree_nodes.h
Go to the documentation of this file.
1/* Copyright (c) 2013, 2025, 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 <cctype> // std::isspace
31#include <cstddef>
32#include <memory>
33
34#include "lex_string.h"
35#include "my_alloc.h"
36#include "my_base.h"
37#include "my_bit.h" // is_single_bit
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/window_lex.h"
74#include "thr_lock.h"
75
76class Item;
77class Item_cache;
81class PT_hint_list;
84class PT_partition;
85class PT_subquery;
86class PT_type;
87class PT_window_list;
88class Sql_cmd;
89class String;
90class THD;
91class Window;
92class sp_head;
93class sp_name;
94struct CHARSET_INFO;
95
96/**
97 @defgroup ptn Parse tree nodes
98 @ingroup Parser
99*/
100/**
101 @defgroup ptn_stmt Nodes representing SQL statements
102 @ingroup ptn
103*/
104/**
105 @defgroup ptn_create_table CREATE TABLE statement
106 @ingroup ptn_stmt
107*/
108/**
109 @defgroup ptn_alter_table ALTER TABLE statement
110 @ingroup ptn_stmt
111*/
112/**
113 @defgroup ptn_create_table_stuff Clauses of CREATE TABLE statement
114 @ingroup ptn_create_table
115*/
116/**
117 @defgroup ptn_partitioning CREATE/ALTER TABLE partitioning-related stuff
118 @ingroup ptn_create_table ptn_alter_table
119*/
120/**
121 @defgroup ptn_part_options Partition options in CREATE/ALTER TABLE
122 @ingroup ptn_partitioning
123*/
124/**
125 @defgroup ptn_create_or_alter_table_options Table options of CREATE/ALTER
126 TABLE
127 @anchor ptn_create_or_alter_table_options
128 @ingroup ptn_create_table ptn_alter_table
129*/
130/**
131 @defgroup ptn_col_types Column types in CREATE/ALTER TABLE
132 @ingroup ptn_create_table ptn_alter_table
133*/
134/**
135 @defgroup ptn_col_attrs Column attributes in CREATE/ALTER TABLE
136 @ingroup ptn_create_table ptn_alter_table
137*/
138/**
139 @defgroup ptn_not_gcol_attr Non-generated column attributes in CREATE/ALTER
140 TABLE
141 @ingroup ptn_col_attrs ptn_alter_table
142*/
143
144/**
145 Calls contextualize() on every node in the array.
146*/
147template <class Node_type, class Parse_context_type>
149 Parse_context_type *pc) {
150 for (Node_type *i : nodes)
151 if (i->contextualize(pc)) return true;
152 return false;
153}
154
155/**
156 Base class for all top-level nodes of SQL statements
157
158 @ingroup ptn_stmt
159*/
162 void operator=(const Parse_tree_root &) = delete;
163
164 protected:
165 virtual ~Parse_tree_root() = default;
166 Parse_tree_root() = default;
167
168 public:
169 virtual Sql_cmd *make_cmd(THD *thd) = 0;
170};
171
173 public:
176
177 ~PT_table_ddl_stmt_base() override = 0; // force abstract class
178
179 protected:
181};
182
184
185/**
186 Parse context for the table DDL (ALTER TABLE and CREATE TABLE) nodes.
187
188 For internal use in the contextualization code.
189*/
191 Table_ddl_parse_context(THD *thd_arg, Query_block *select_arg,
196};
197
198/**
199 Base class for all table DDL (ALTER TABLE and CREATE TABLE) nodes.
200*/
202
203class PT_order_expr : public Parse_tree_node, public ORDER {
205
206 public:
208 item_initial = item_arg;
210 }
211
212 bool contextualize(Parse_context *pc) override;
213};
214
217
218 public:
220
221 public:
222 bool contextualize(Parse_context *pc) override {
223 if (super::contextualize(pc)) return true;
224 for (ORDER *o = value.first; o != nullptr; o = o->next) {
225 if (static_cast<PT_order_expr *>(o)->contextualize(pc)) return true;
226 }
227 return false;
228 }
229
231 order->used_alias = false;
232 order->used = 0;
233 value.link_in_list(order, &order->next);
234 }
235};
236
239
240 public:
241 bool contextualize(Parse_context *pc) override {
242 return super::contextualize(pc);
243 }
244};
245
246/**
247 Represents an element of the WITH list:
248 WITH [...], [...] SELECT ...,
249 ^ or ^
250 i.e. a Common Table Expression (CTE, or Query Name in SQL99 terms).
251*/
254
255 public:
256 explicit PT_common_table_expr(const LEX_STRING &name,
257 const LEX_STRING &subq_text,
258 uint subq_text_offset, PT_subquery *sn,
261
262 /// The name after AS
263 const LEX_STRING &name() const { return m_name; }
264 /**
265 @param thd Thread handler
266 @param[out] node PT_subquery
267 @returns a PT_subquery to attach to a table reference for this CTE
268 */
269 bool make_subquery_node(THD *thd, PT_subquery **node);
270 /**
271 @param tl Table reference to match
272 @param in_self If this is a recursive reference
273 @param[out] found Is set to true/false if matches or not
274 @returns true if error
275 */
276 bool match_table_ref(Table_ref *tl, bool in_self, bool *found);
277 /**
278 @returns true if 'other' is the same instance as 'this'
279 */
280 bool is(const Common_table_expr *other) const {
281 return other == &m_postparse;
282 }
283 void print(const THD *thd, String *str, enum_query_type query_type);
284
285 private:
287 /// Raw text of query expression (including parentheses)
289 /**
290 Offset in bytes of m_subq_text in original statement which had the WITH
291 clause.
292 */
294 /// Parsed version of subq_text
296 /// List of explicitly specified column names; if empty, no list.
298 /**
299 A Table_ref representing a CTE needs access to the WITH list
300 element it derives from. However, in order to:
301 - limit the members which Table_ref can access
302 - avoid including this header file everywhere Table_ref needs to
303 access these members, these members are relocated into a separate inferior
304 object whose declaration is in table.h, like that of Table_ref. It's
305 the "postparse" part. Table_ref accesses this inferior object only.
306 */
308
310};
311
312/**
313 Represents the WITH list.
314 WITH [...], [...] SELECT ...,
315 ^^^^^^^^^^^^
316*/
319
320 public:
321 /// @param mem_root where interior objects are allocated
325 return m_elements;
326 }
327
328 private:
330};
331
332/**
333 Represents the WITH clause:
334 WITH [...], [...] SELECT ...,
335 ^^^^^^^^^^^^^^^^^
336*/
339
340 public:
343
344 bool contextualize(Parse_context *pc) override;
345
346 /**
347 Looks up a table reference into the list of CTEs.
348 @param tl Table reference to look up
349 @param[out] found Is set to true/false if found or not
350 @returns true if error
351 */
352 bool lookup(Table_ref *tl, PT_common_table_expr **found);
353 /**
354 Call this to record in the WITH clause that we are contextualizing the
355 CTE definition inserted in table reference 'tl'.
356 @returns information which the caller must provide to
357 leave_parsing_definition().
358 */
360 auto old = m_most_inner_in_parsing;
362 return old;
363 }
366 }
367 void print(const THD *thd, String *str, enum_query_type query_type);
368
369 private:
370 /// All CTEs of this clause
371 const PT_with_list *const m_list;
372 /// True if the user has specified the RECURSIVE keyword.
373 const bool m_recursive;
374 /**
375 The innermost CTE reference which we're parsing at the
376 moment. Used to detect forward references, loops and recursiveness.
377 */
379
381};
382
385
386 public:
387 bool contextualize(Parse_context *pc) override;
388};
389
392
394
395 public:
396 PT_limit_clause(const Limit_options &limit_options_arg)
397 : limit_options(limit_options_arg) {}
398
399 bool contextualize(Parse_context *pc) override;
401};
402
403class PT_cross_join;
404class PT_joined_table;
405
407 public:
409
410 /**
411 Lets us build a parse tree top-down, which is necessary due to the
412 context-dependent nature of the join syntax. This function adds
413 the @<table_ref@> cross join as the left-most leaf in this join tree
414 rooted at this node.
415
416 @todo: comment on non-join PT_table_reference objects
417
418 @param cj This @<table ref@> will be added if it represents a cross join.
419
420 @return The new top-level join.
421 */
423};
424
427
430 const char *const opt_table_alias;
432
433 public:
435 List<String> *opt_use_partition_arg,
436 const LEX_CSTRING &opt_table_alias_arg,
437 List<Index_hint> *opt_key_definition_arg)
438 : table_ident(table_ident_arg),
439 opt_use_partition(opt_use_partition_arg),
440 opt_table_alias(opt_table_alias_arg.str),
441 opt_key_definition(opt_key_definition_arg) {}
442
443 bool contextualize(Parse_context *pc) override;
444};
445
447 public:
449};
450
453
454 public:
457 const LEX_STRING &table_alias)
458 : m_expr(expr),
459 m_path(path),
460 m_nested_columns(nested_cols),
461 m_table_alias(table_alias) {}
462
463 bool contextualize(Parse_context *pc) override;
464
465 private:
470};
471
474
476
477 public:
481
482 bool contextualize(Parse_context *pc) override;
483};
484
487
488 public:
489 PT_derived_table(bool lateral, PT_subquery *subquery,
490 const LEX_CSTRING &table_alias,
492
493 bool contextualize(Parse_context *pc) override;
494
495 private:
498 const char *const m_table_alias;
499 /// List of explicitly specified column names; if empty, no list.
501};
502
505
506 public:
508 : m_joined_table(joined_table) {}
509
510 bool contextualize(Parse_context *pc) override;
511
512 private:
514};
515
518
519 protected:
524
527
528 public:
529 PT_joined_table(PT_table_reference *tab1_node_arg, const POS &join_pos_arg,
531 : m_left_pt_table(tab1_node_arg),
532 m_join_pos(join_pos_arg),
533 m_type(type),
534 m_right_pt_table(tab2_node_arg) {
535 static_assert(is_single_bit(JTT_INNER), "not a single bit");
536 static_assert(is_single_bit(JTT_STRAIGHT), "not a single bit");
537 static_assert(is_single_bit(JTT_NATURAL), "not a single bit");
538 static_assert(is_single_bit(JTT_LEFT), "not a single bit");
539 static_assert(is_single_bit(JTT_RIGHT), "not a single bit");
540
541 assert(type == JTT_INNER || type == JTT_STRAIGHT_INNER ||
544 }
545
546 /**
547 Adds the cross join to this join operation. The cross join is nested as
548 the table reference on the left-hand side.
549 */
552 return this;
553 }
554
555 /// Adds the table reference as the right-hand side of this join.
557 assert(m_right_pt_table == nullptr);
558 m_right_pt_table = table;
559 }
560
561 bool contextualize(Parse_context *pc) override;
562
563 /// This class is being inherited, it should thus be abstract.
564 ~PT_joined_table() override = 0;
565
566 protected:
568};
569
570inline PT_joined_table::~PT_joined_table() = default;
571
574
575 public:
576 PT_cross_join(PT_table_reference *tab1_node_arg, const POS &join_pos_arg,
577 PT_joined_table_type Type_arg,
578 PT_table_reference *tab2_node_arg)
579 : PT_joined_table(tab1_node_arg, join_pos_arg, Type_arg, tab2_node_arg) {}
580
581 bool contextualize(Parse_context *pc) override;
582};
583
587
588 public:
589 PT_joined_table_on(PT_table_reference *tab1_node_arg, const POS &join_pos_arg,
591 PT_table_reference *tab2_node_arg, Item *on_arg)
592 : super(tab1_node_arg, join_pos_arg, type, tab2_node_arg), on(on_arg) {}
593
594 bool contextualize(Parse_context *pc) override;
595};
596
600
601 public:
603 const POS &join_pos_arg, PT_joined_table_type type,
604 PT_table_reference *tab2_node_arg,
605 List<String> *using_fields_arg)
606 : super(tab1_node_arg, join_pos_arg, type, tab2_node_arg),
607 using_fields(using_fields_arg) {}
608
609 /// A PT_joined_table_using without a list of columns denotes a natural join.
611 const POS &join_pos_arg, PT_joined_table_type type,
612 PT_table_reference *tab2_node_arg)
613 : PT_joined_table_using(tab1_node_arg, join_pos_arg, type, tab2_node_arg,
614 nullptr) {}
615
616 bool contextualize(Parse_context *pc) override;
617};
618
619class PT_group : public Parse_tree_node {
621
624
625 public:
626 PT_group(PT_order_list *group_list_arg, olap_type olap_arg)
627 : group_list(group_list_arg), olap(olap_arg) {}
628
629 bool contextualize(Parse_context *pc) override;
630};
631
632class PT_order : public Parse_tree_node {
634
635 public:
637 explicit PT_order(PT_order_list *order_list_arg)
638 : order_list(order_list_arg) {}
639
640 bool contextualize(Parse_context *pc) override;
641};
642
644 public:
647
648 bool contextualize(Parse_context *pc) final;
649
650 virtual bool set_lock_for_tables(Parse_context *pc) = 0;
651
653
654 protected:
656 thr_lock_type lock_type = TL_IGNORE;
657 switch (m_lock_strength) {
659 lock_type = TL_WRITE;
660 break;
662 lock_type = TL_READ_WITH_SHARED_LOCKS;
663 break;
664 }
665
666 return {lock_type, static_cast<thr_locked_row_action>(action())};
667 }
668
669 private:
672};
673
675 public:
677 Lock_strength strength,
679 : PT_locking_clause(strength, action) {}
680
681 bool set_lock_for_tables(Parse_context *pc) override;
682};
683
685 public:
687
691 : PT_locking_clause(strength, action), m_tables(tables) {}
692
693 bool set_lock_for_tables(Parse_context *pc) override;
694
695 private:
696 /// @todo Move this function to Table_ident?
697 void print_table_ident(const THD *thd, const Table_ident *ident, String *s);
698
699 bool raise_error(THD *thd, const Table_ident *name, int error);
700
701 bool raise_error(int error);
702
704};
705
707 public:
710 }
711
712 bool push_back(PT_locking_clause *locking_clause) {
713 return m_locking_clauses.push_back(locking_clause);
714 }
715
716 bool contextualize(Parse_context *pc) override {
717 for (auto locking_clause : m_locking_clauses)
718 if (locking_clause->contextualize(pc)) return true;
719 return false;
720 }
721
722 private:
724};
725
727 public:
729 virtual Setop_type type() const { return NONE; }
730 virtual bool is_set_operation() const = 0;
731
732 /**
733 True if this query expression can absorb an extraneous order by/limit
734 clause. The `ORDER BY`/`LIMIT` syntax is mostly consistestent, i.e. a
735 trailing clause may not refer to the tables in the `<query primary>`, with
736 one glaring exception:
737
738 (...( SELECT ... )...) ORDER BY ...
739
740 If the nested query expression doesn't contain `ORDER BY`, the statement
741 is interpreted as if the `ORDER BY` was absorbed by the innermost query
742 expression, i.e.:
743
744 (...( SELECT ... ORDER BY ... )...)
745
746 There is no rewriting of the parse tree nor AST happening here, the
747 transformation is done by the contextualizer (see
748 PT_query_expression::contextualize_order_and_limit), which interprets the
749 parse tree, and builds the AST according to this interpretation. This
750 interpretation is governed by the following rule: An `ORDER BY` can be
751 absorbed if none the nested query expressions contains an `ORDER BY` *or*
752 `LIMIT`. The rule is complex, so here are some examples for illustration:
753
754 In these cases the `ORDER BY` *is* absorbed:
755
756 ( SELECT * FROM t1 ) ORDER BY t1.a;
757 (( SELECT * FROM t1 )) ORDER BY t1.a;
758
759 In these cases the ORDER BY is *not* absorbed:
760
761 ( SELECT * FROM t1 ORDER BY 1 ) ORDER BY t1.a;
762 (( SELECT * FROM t1 ) ORDER BY 1 ) ORDER BY t1.a;
763 ( SELECT * FROM t1 LIMIT 1 ) ORDER BY t1.a;
764 (( SELECT * FROM t1 ) LIMIT 1 ) ORDER BY t1.a;
765
766 The same happens with `LIMIT`, obviously, but the optimizer is freeer to
767 choose when to apply the limit, and there are name no resolution issues
768 involved.
769
770 @param order True if the outer query block has the ORDER BY clause.
771 @param limit True if the outer query block has the LIMIT clause.
772 */
773 virtual bool can_absorb_order_and_limit(bool order, bool limit) const = 0;
774 virtual bool has_into_clause() const = 0;
775 virtual bool has_trailing_into_clause() const = 0;
776
777 virtual bool is_table_value_constructor() const = 0;
779};
780
783
784 public:
785 PT_set_scoped_system_variable(const POS &pos, const LEX_CSTRING &opt_prefix,
786 const LEX_CSTRING &name, Item *opt_expr)
787 : m_pos{pos},
788 m_opt_prefix{opt_prefix},
789 m_name{name},
790 m_opt_expr{opt_expr} {}
791
792 bool contextualize(Parse_context *pc) override;
793
794 private:
795 const POS m_pos;
799};
800
802
805
806 public:
807 PT_set_variable(const POS &pos, const LEX_CSTRING &opt_prefix,
808 const LEX_CSTRING &name, const POS &expr_pos, Item *opt_expr)
809 : m_pos{pos},
810 m_opt_prefix{opt_prefix},
811 m_name{name},
812 m_expr_pos{expr_pos},
813 m_opt_expr{opt_expr} {}
814
815 bool contextualize(Parse_context *pc) override;
816
817 private:
818 const POS m_pos;
823};
824
828
831
832 public:
834 Item *expr_arg)
835 : name(name_arg), expr(expr_arg) {}
836
837 bool contextualize(Parse_context *pc) override;
838};
839
842
843 public:
845 const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name,
846 Item *opt_expr)
847 : m_scope{scope},
848 m_name_pos{name_pos},
849 m_opt_prefix{opt_prefix},
850 m_name{name},
851 m_opt_expr{opt_expr} {}
852
853 bool contextualize(Parse_context *pc) override;
854
855 private:
861};
862
866
868
869 public:
871 : opt_charset(opt_charset_arg) {}
872
873 bool contextualize(Parse_context *pc) override;
874};
875
879
881
882 public:
884
885 bool contextualize(Parse_context *pc) override;
886};
887
890
893
894 public:
895 PT_set_names(const CHARSET_INFO *opt_charset_arg,
896 const CHARSET_INFO *opt_collation_arg)
897 : opt_charset(opt_charset_arg), opt_collation(opt_collation_arg) {}
898
899 bool contextualize(Parse_context *pc) override;
900};
901
903
907
908 const char *password;
909 const char *current_password;
913
914 public:
916 const char *current_password_arg,
917 bool retain_current,
918 bool random_password,
919 const POS &expr_pos_arg)
920 : password(password_arg),
921 current_password(current_password_arg),
922 retain_current_password(retain_current),
923 random_password_generator(random_password),
924 expr_pos(expr_pos_arg) {}
925
926 bool contextualize(Parse_context *pc) override;
927};
928
932
934 const char *password;
935 const char *current_password;
939
940 public:
942 const char *password_arg,
943 const char *current_password_arg,
944 bool retain_current,
945 bool random_pass,
946 const POS &expr_pos_arg)
947 : user(user_arg),
948 password(password_arg),
949 current_password(current_password_arg),
950 retain_current_password(retain_current),
951 random_password_generator(random_pass),
952 expr_pos(expr_pos_arg) {}
953
954 bool contextualize(Parse_context *pc) override;
955};
956
959
962
963 public:
966 : type(type_arg), value(value_arg) {}
967
968 bool contextualize(Parse_context *pc) override;
969};
970
973
977
978 public:
979 PT_option_value_list_head(const POS &delimiter_pos_arg,
980 Parse_tree_node *value_arg,
981 const POS &value_pos_arg)
982 : delimiter_pos(delimiter_pos_arg),
983 value(value_arg),
984 value_pos(value_pos_arg) {}
985
986 bool contextualize(Parse_context *pc) override;
987};
988
991
993
994 public:
996 const POS &delimiter_pos_arg, Parse_tree_node *tail,
997 const POS &tail_pos)
998 : super(delimiter_pos_arg, tail, tail_pos), head(head_arg) {}
999
1000 bool contextualize(Parse_context *pc) override {
1001 uchar dummy;
1002 if (check_stack_overrun(pc->thd, STACK_MIN_SIZE, &dummy)) return true;
1003 return head->contextualize(pc) || super::contextualize(pc);
1004 }
1005};
1006
1009
1013
1014 public:
1016 const POS &head_pos_arg,
1017 PT_option_value_list_head *tail_arg)
1018 : head(head_arg), head_pos(head_pos_arg), tail(tail_arg) {}
1019
1020 bool contextualize(Parse_context *pc) override;
1021};
1022
1025
1026 const char *name;
1028
1029 public:
1030 PT_transaction_characteristic(const char *name_arg, int32 value_arg)
1031 : name(name_arg), value(value_arg) {}
1032
1033 bool contextualize(Parse_context *pc) override;
1034};
1035
1038
1039 public:
1040 explicit PT_transaction_access_mode(bool is_read_only)
1041 : super("transaction_read_only", (int32)is_read_only) {}
1042};
1043
1046
1047 public:
1049 : super("transaction_isolation", (int32)level) {}
1050};
1051
1054
1057
1058 public:
1060 PT_transaction_characteristic *opt_tail_arg)
1061 : head(head_arg), opt_tail(opt_tail_arg) {}
1062
1063 bool contextualize(Parse_context *pc) override {
1064 return (super::contextualize(pc) || head->contextualize(pc) ||
1065 (opt_tail != nullptr && opt_tail->contextualize(pc)));
1066 }
1067};
1068
1072
1075
1076 public:
1078 PT_transaction_characteristics *characteristics_arg,
1079 const POS &end_pos_arg)
1080 : characteristics(characteristics_arg), end_pos(end_pos_arg) {}
1081
1082 bool contextualize(Parse_context *pc) override;
1083};
1084
1086 : public Parse_tree_node {};
1087
1091
1095
1096 public:
1098 PT_set_scoped_system_variable *head_arg, const POS &head_pos_arg,
1099 PT_option_value_list_head *opt_tail_arg)
1100 : head(head_arg), head_pos(head_pos_arg), opt_tail(opt_tail_arg) {}
1101
1102 bool contextualize(Parse_context *pc) override;
1103};
1104
1108
1111
1112 public:
1114 PT_transaction_characteristics *characteristics_arg,
1115 const POS &characteristics_pos_arg)
1116 : characteristics(characteristics_arg),
1117 characteristics_pos(characteristics_pos_arg) {}
1118
1119 bool contextualize(Parse_context *pc) override;
1120};
1121
1124
1127
1128 public:
1130 enum_var_type type_arg,
1132 : type(type_arg), list(list_arg) {}
1133
1134 bool contextualize(Parse_context *pc) override;
1135};
1136
1137class PT_set : public Parse_tree_node {
1139
1142
1143 public:
1144 PT_set(const POS &set_pos_arg, PT_start_option_value_list *list_arg)
1145 : set_pos(set_pos_arg), list(list_arg) {}
1146
1147 bool contextualize(Parse_context *pc) override;
1148};
1149
1153
1154 protected:
1155 PT_into_destination(const POS &pos) : m_pos(pos) {}
1156
1157 public:
1158 bool contextualize(Parse_context *pc) override;
1159};
1160
1163
1164 public:
1165 PT_into_destination_outfile(const POS &pos, const LEX_STRING &file_name_arg,
1166 const CHARSET_INFO *charset_arg,
1167 const Field_separators &field_term_arg,
1168 const Line_separators &line_term_arg)
1169 : PT_into_destination(pos), m_exchange(file_name_arg.str, false) {
1170 m_exchange.cs = charset_arg;
1171 m_exchange.field.merge_field_separators(field_term_arg);
1172 m_exchange.line.merge_line_separators(line_term_arg);
1173 }
1174
1175 bool contextualize(Parse_context *pc) override;
1176
1177 private:
1179};
1180
1183
1184 public:
1185 PT_into_destination_dumpfile(const POS &pos, const LEX_STRING &file_name_arg)
1186 : PT_into_destination(pos), m_exchange(file_name_arg.str, true) {}
1187
1188 bool contextualize(Parse_context *pc) override;
1189
1190 private:
1192};
1193
1195 public:
1197
1198 explicit PT_select_var(const LEX_STRING &name_arg) : name(name_arg) {}
1199
1200 virtual bool is_local() const { return false; }
1201 virtual uint get_offset() const {
1202 assert(0);
1203 return 0;
1204 }
1205};
1206
1209
1211
1212#ifndef NDEBUG
1213 /*
1214 Routine to which this Item_splocal belongs. Used for checking if correct
1215 runtime context is used for variable handling.
1216 */
1218#endif
1219
1220 public:
1221 PT_select_sp_var(const LEX_STRING &name_arg) : super(name_arg) {}
1222
1223 bool is_local() const override { return true; }
1224 uint get_offset() const override { return offset; }
1225
1226 bool contextualize(Parse_context *pc) override;
1227};
1228
1231
1232 public:
1233 explicit PT_select_var_list(const POS &pos) : PT_into_destination(pos) {}
1234
1236
1237 bool contextualize(Parse_context *pc) override;
1238
1239 bool push_back(PT_select_var *var) { return value.push_back(var); }
1240};
1241
1242/**
1243 Parse tree node for a single of a window extent's borders,
1244 cf. <window frame extent> in SQL 2003.
1245*/
1247 friend class Window;
1248 Item *m_value{nullptr}; ///< only relevant iff m_border_type == WBT_VALUE_*
1249 public:
1251 const bool m_date_time;
1253
1254 ///< For unbounded border
1256 : m_border_type(type), m_date_time(false) {
1258 }
1259
1260 ///< For bounded non-temporal border, e.g. 2 PRECEDING: 'value' is 2.
1262 : m_value(value), m_border_type(type), m_date_time(false) {}
1263
1264 ///< For bounded INTERVAL 2 DAYS, 'value' is 2, int_type is DAYS.
1266 : m_value(value),
1268 m_date_time(true),
1269 m_int_type(int_type) {}
1270
1271 ///< @returns the '2' in '2 PRECEDING' or 'INTERVAL 2 DAYS PRECEDING'
1272 Item *border() const { return m_value; }
1273 /// Need such low-level access so that fix_fields updates the right pointer
1274 Item **border_ptr() { return &m_value; }
1275
1276 /**
1277 @returns Addition operator for computation of frames, nullptr if error.
1278 @param order_expr Expression to add to/subtract from
1279 @param prec true if PRECEDING
1280 @param asc true if ASC
1281 @param window only used for error generation
1282 */
1283 Item *build_addop(Item_cache *order_expr, bool prec, bool asc,
1284 const Window *window);
1285};
1286
1287/**
1288 Parse tree node for one or both of a window extent's borders, cf.
1289 <window frame extent> in SQL 2003.
1290*/
1293 friend class PT_frame;
1294
1295 public:
1296 /**
1297 Constructor.
1298
1299 Frames of the form "frame_start no_frame_end" are translated during
1300 parsing to "BETWEEN frame_start AND CURRENT ROW". So both 'start' and
1301 'end' are non-nullptr.
1302 */
1304 m_borders[0] = start;
1305 m_borders[1] = end;
1306 }
1307};
1308
1309/**
1310 Parse tree node for a window frame's exclusions, cf. the
1311 <window frame exclusion> clause in SQL 2003.
1312*/
1315
1316 public:
1318 // enum_window_frame_exclusion exclusion() { return m_exclusion; }
1319};
1320
1321/**
1322 Parse tree node for a window's frame, cf. the <window frame clause>
1323 in SQL 2003.
1324*/
1326 public:
1328
1331
1333
1334 /// If true, this is an artificial frame, not specified by the user
1336
1338 PT_exclusion *exclusion)
1339 : m_query_expression(unit),
1340 m_from(from_to->m_borders[0]),
1341 m_to(from_to->m_borders[1]),
1342 m_exclusion(exclusion) {}
1343};
1344
1346
1349
1360
1361 public:
1363 PT_hint_list *opt_hints_arg, const Query_options &options_arg,
1364 PT_item_list *item_list_arg, PT_into_destination *opt_into1_arg,
1365 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg,
1366 Item *opt_where_clause_arg, PT_group *opt_group_clause_arg,
1367 Item *opt_having_clause_arg, PT_window_list *opt_window_clause_arg,
1368 bool implicit_from_clause)
1369 : opt_hints(opt_hints_arg),
1370 options(options_arg),
1371 item_list(item_list_arg),
1372 opt_into1(opt_into1_arg),
1373 m_is_from_clause_implicit{implicit_from_clause},
1374 from_clause(from_clause_arg),
1375 opt_where_clause(opt_where_clause_arg),
1376 opt_group_clause(opt_group_clause_arg),
1377 opt_having_clause(opt_having_clause_arg),
1378 opt_window_clause(opt_window_clause_arg) {
1379 assert(implicit_from_clause ? from_clause.empty() : true);
1380 }
1381
1383 const Query_options &options_arg, PT_item_list *item_list_arg,
1384 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg,
1385 Item *opt_where_clause_arg)
1386 : opt_hints(nullptr),
1387 options(options_arg),
1388 item_list(item_list_arg),
1391 from_clause(from_clause_arg),
1392 opt_where_clause(opt_where_clause_arg),
1396
1398 PT_item_list *item_list_arg)
1399 : opt_hints(nullptr),
1400 options(options_arg),
1401 item_list(item_list_arg),
1404 from_clause{},
1409
1410 bool contextualize(Parse_context *pc) override;
1411
1412 bool has_into_clause() const override { return opt_into1 != nullptr; }
1413 bool has_trailing_into_clause() const override {
1415 opt_where_clause == nullptr && opt_group_clause == nullptr &&
1416 opt_having_clause == nullptr && opt_window_clause == nullptr);
1417 }
1418
1419 bool is_set_operation() const override { return false; }
1420
1421 bool can_absorb_order_and_limit(bool, bool) const override { return true; }
1422
1423 bool is_table_value_constructor() const override { return false; }
1424 PT_insert_values_list *get_row_value_list() const override { return nullptr; }
1425
1426 private:
1428};
1429
1432
1434
1435 public:
1437 : row_value_list(row_value_list_arg) {}
1438
1439 bool contextualize(Parse_context *pc) override;
1440
1441 bool has_into_clause() const override { return false; }
1442 bool has_trailing_into_clause() const override { return false; }
1443
1444 bool is_set_operation() const override { return false; }
1445
1446 bool can_absorb_order_and_limit(bool, bool) const override { return true; }
1447
1448 bool is_table_value_constructor() const override { return true; }
1449
1451 return row_value_list;
1452 }
1453};
1454
1457
1458 public:
1460 const Query_options &options_arg, PT_item_list *item_list_arg,
1461 const Mem_root_array_YY<PT_table_reference *> &from_clause_arg)
1462 : super(options_arg, item_list_arg, from_clause_arg, nullptr) {}
1463};
1464
1466 public:
1468 PT_query_expression_body *body, PT_order *order,
1469 PT_limit_clause *limit)
1470 : m_body(body),
1471 m_order(order),
1472 m_limit(limit),
1473 m_with_clause(with_clause) {}
1474
1476 PT_limit_clause *limit)
1477 : PT_query_expression(nullptr, body, order, limit) {}
1478
1481
1482 bool contextualize(Parse_context *pc) override;
1483
1484 bool is_set_operation() const override { return m_body->is_set_operation(); }
1485
1486 bool has_into_clause() const override { return m_body->has_into_clause(); }
1487 bool has_trailing_into_clause() const override {
1488 return (m_body->has_trailing_into_clause() && m_order == nullptr &&
1489 m_limit == nullptr);
1490 }
1491
1496 return false;
1497 }
1498
1499 bool can_absorb_order_and_limit(bool order, bool limit) const override {
1500 if (m_body->is_set_operation()) {
1501 return false;
1502 }
1503 if (m_order == nullptr && m_limit == nullptr) {
1504 /*
1505 It is safe to push ORDER and/or LIMIT down in:
1506
1507 (SELECT ...<no order or limit clauses>) ORDER BY ... LIMIT ...;
1508 (SELECT ...<no order or limit clauses>) ORDER BY ...;
1509 (SELECT ...<no order or limit clauses>) LIMIT ...;
1510 */
1511 return true;
1512 }
1513 if (m_limit != nullptr && !order && limit) {
1514 /*
1515 In MySQL, it is ok(*) to push LIMIT down in:
1516
1517 (SELECT ... [ORDER BY ...] LIMIT a) LIMIT b;
1518
1519 *) MySQL doesn't follow the standard when overwriting `LIMIT a` with
1520 `LIMIT b` if a < b. Moreover, the result of:
1521
1522 (SELECT ... ORDER BY order1 LIMIT a) ORDER BY order1 LIMIT b; (1)
1523
1524 can diverge from:
1525
1526 (SELECT ... ORDER BY order1 LIMIT a) LIMIT b; (2)
1527
1528 since the example (1) never overwrites `LIMIT a` with `LIMIT b`,
1529 while the example (2) does overwrite.
1530
1531 TODO: add a warning, deprecate and replace this behavior with the
1532 standard one.
1533 */
1534 return true;
1535 }
1536 if (m_order != nullptr && m_limit == nullptr && !order && limit) {
1537 /*
1538 Allow pushdown of LIMIT into body with ORDER BY, e.g
1539
1540 (SELECT ... ORDER BY order1) LIMIT a;
1541 */
1542 return true;
1543 }
1544 return false;
1545 }
1546
1547 bool is_table_value_constructor() const override {
1549 }
1550
1552 return m_body->get_row_value_list();
1553 }
1554
1555 private:
1556 /**
1557 Contextualizes the order and limit clauses, re-interpreting them according
1558 to the rules. If the `<query expression body>` can absorb the clauses,
1559 they are simply contextualized into the current Query_block. If not, we
1560 have to create the "fake" Query_block unless there is one already
1561 (Query_expression::new_set_operation_query() is known to do this.)
1562
1563 @see PT_query_expression::can_absorb_order_and_limit()
1564 */
1566
1571};
1572
1573/*
1574 After the removal of the `... <locking_clause> <into_clause>` syntax
1575 PT_locking will disappear.
1576*/
1579
1580 public:
1582 PT_locking_clause_list *locking_clauses)
1583 : m_query_expression{qe}, m_locking_clauses{locking_clauses} {}
1584
1585 bool contextualize(Parse_context *pc) override {
1588 }
1589
1590 bool is_set_operation() const override {
1592 }
1593
1594 bool has_into_clause() const override {
1596 }
1597 bool has_trailing_into_clause() const override { return false; }
1598
1599 bool can_absorb_order_and_limit(bool order, bool limit) const override {
1600 return m_query_expression->can_absorb_order_and_limit(order, limit);
1601 }
1602
1603 bool is_table_value_constructor() const override {
1605 }
1606
1609 }
1610
1611 private:
1614};
1615
1618
1622
1623 public:
1625
1627 : qe(query_expression),
1628 pos(p),
1630 m_is_derived_table(false) {}
1631
1632 bool contextualize(Parse_context *pc) override;
1633
1635};
1636
1639
1640 public:
1643 bool is_rhs_in_parentheses = false)
1645 m_is_rhs_in_parentheses{is_rhs_in_parentheses} {
1646 m_list.push_back(lhs);
1647 m_list.push_back(rhs);
1648 }
1649
1651 QueryLevel &ql);
1652 bool is_set_operation() const override { return true; }
1653
1654 bool has_into_clause() const override {
1655 return std::any_of(m_list.cbegin(), m_list.cend(),
1656 [](const PT_query_expression_body &body) {
1657 return body.has_into_clause();
1658 });
1659 }
1660 bool has_trailing_into_clause() const override {
1661 return !m_is_rhs_in_parentheses &&
1662 m_list[m_list.elements - 1]->has_trailing_into_clause();
1663 }
1664
1665 bool can_absorb_order_and_limit(bool, bool) const override { return false; }
1666
1667 bool is_table_value_constructor() const override { return false; }
1668 PT_insert_values_list *get_row_value_list() const override { return nullptr; }
1669 bool is_distinct() const { return m_is_distinct; }
1670
1673
1674 protected:
1676 Surrounding_context context);
1681};
1682
1685
1686 public:
1688 bool contextualize(Parse_context *pc) override;
1689 enum Setop_type type() const override { return UNION; }
1690};
1691
1694
1695 public:
1697 bool contextualize(Parse_context *pc) override;
1698 enum Setop_type type() const override { return EXCEPT; }
1699};
1700
1703
1704 public:
1706 bool contextualize(Parse_context *pc) override;
1707 enum Setop_type type() const override { return INTERSECT; }
1708};
1709
1712
1713 public:
1714 /**
1715 @param qe The query expression.
1716 @param sql_command The type of SQL command.
1717 */
1719 : m_sql_command(sql_command),
1720 m_qe(qe),
1721 m_into(nullptr),
1723
1724 /**
1725 Creates a SELECT command. Only SELECT commands can have into.
1726
1727 @param qe The query expression.
1728 @param into The own INTO destination.
1729 @param has_trailing_locking_clauses True if there are locking clauses (like
1730 `FOR UPDATE`) at the end of the
1731 statement.
1732 */
1734 PT_into_destination *into = nullptr,
1735 bool has_trailing_locking_clauses = false)
1737 m_qe{qe},
1738 m_into{into},
1739 m_has_trailing_locking_clauses{has_trailing_locking_clauses} {}
1740
1741 Sql_cmd *make_cmd(THD *thd) override;
1742
1743 private:
1748};
1749
1750/**
1751 Top-level node for the DELETE statement
1752
1753 @ingroup ptn_stmt
1754*/
1755class PT_delete final : public Parse_tree_root {
1756 private:
1761 const char *const opt_table_alias;
1769
1770 public:
1771 // single-table DELETE node constructor:
1772 PT_delete(PT_with_clause *with_clause_arg, PT_hint_list *opt_hints_arg,
1773 int opt_delete_options_arg, Table_ident *table_ident_arg,
1774 const LEX_CSTRING &opt_table_alias_arg,
1775 List<String> *opt_use_partition_arg, Item *opt_where_clause_arg,
1776 PT_order *opt_order_clause_arg, Item *opt_delete_limit_clause_arg)
1777 : m_with_clause(with_clause_arg),
1778 opt_hints(opt_hints_arg),
1779 opt_delete_options(opt_delete_options_arg),
1780 table_ident(table_ident_arg),
1781 opt_table_alias(opt_table_alias_arg.str),
1782 opt_use_partition(opt_use_partition_arg),
1783 opt_where_clause(opt_where_clause_arg),
1784 opt_order_clause(opt_order_clause_arg),
1785 opt_delete_limit_clause(opt_delete_limit_clause_arg) {
1787 join_table_list.init_empty_const();
1788 }
1789
1790 // multi-table DELETE node constructor:
1791 PT_delete(PT_with_clause *with_clause_arg, PT_hint_list *opt_hints_arg,
1792 int opt_delete_options_arg,
1793 const Mem_root_array_YY<Table_ident *> &table_list_arg,
1794 const Mem_root_array_YY<PT_table_reference *> &join_table_list_arg,
1795 Item *opt_where_clause_arg)
1796 : m_with_clause(with_clause_arg),
1797 opt_hints(opt_hints_arg),
1798 opt_delete_options(opt_delete_options_arg),
1801 table_list(table_list_arg),
1803 join_table_list(join_table_list_arg),
1804 opt_where_clause(opt_where_clause_arg),
1807
1808 Sql_cmd *make_cmd(THD *thd) override;
1809
1810 private:
1811 bool is_multitable() const {
1812 assert((table_ident != nullptr) ^ (table_list.size() > 0));
1813 return table_ident == nullptr;
1814 }
1815
1816 bool add_table(Parse_context *pc, Table_ident *table);
1817};
1818
1819/**
1820 Top-level node for the UPDATE statement
1821
1822 @ingroup ptn_stmt
1823*/
1835
1836 public:
1837 PT_update(PT_with_clause *with_clause_arg, PT_hint_list *opt_hints_arg,
1838 thr_lock_type opt_low_priority_arg, bool opt_ignore_arg,
1839 const Mem_root_array_YY<PT_table_reference *> &join_table_list_arg,
1840 PT_item_list *column_list_arg, PT_item_list *value_list_arg,
1841 Item *opt_where_clause_arg, PT_order *opt_order_clause_arg,
1842 Item *opt_limit_clause_arg)
1843 : m_with_clause(with_clause_arg),
1844 opt_hints(opt_hints_arg),
1845 opt_low_priority(opt_low_priority_arg),
1846 opt_ignore(opt_ignore_arg),
1847 join_table_list(join_table_list_arg),
1848 column_list(column_list_arg),
1849 value_list(value_list_arg),
1850 opt_where_clause(opt_where_clause_arg),
1851 opt_order_clause(opt_order_clause_arg),
1852 opt_limit_clause(opt_limit_clause_arg) {}
1853
1854 Sql_cmd *make_cmd(THD *thd) override;
1855};
1856
1859
1861
1862 public:
1864
1865 bool contextualize(Parse_context *pc) override;
1866
1868 many_values.push_back(x);
1869 return false;
1870 }
1871
1873 assert(is_contextualized());
1874 return many_values;
1875 }
1876};
1877
1878/**
1879 Top-level node for the INSERT statement
1880
1881 @ingroup ptn_stmt
1882*/
1883class PT_insert final : public Parse_tree_root {
1884 const bool is_replace;
1887 const bool ignore;
1893 const char *const opt_values_table_alias;
1897
1898 public:
1899 PT_insert(bool is_replace_arg, PT_hint_list *opt_hints_arg,
1900 thr_lock_type lock_option_arg, bool ignore_arg,
1901 Table_ident *table_ident_arg, List<String> *opt_use_partition_arg,
1902 PT_item_list *column_list_arg,
1903 PT_insert_values_list *row_value_list_arg,
1904 PT_query_expression_body *insert_query_expression_arg,
1905 const LEX_CSTRING &opt_values_table_alias_arg,
1906 Create_col_name_list *opt_values_column_list_arg,
1907 PT_item_list *opt_on_duplicate_column_list_arg,
1908 PT_item_list *opt_on_duplicate_value_list_arg)
1909 : is_replace(is_replace_arg),
1910 opt_hints(opt_hints_arg),
1911 lock_option(lock_option_arg),
1912 ignore(ignore_arg),
1913 table_ident(table_ident_arg),
1914 opt_use_partition(opt_use_partition_arg),
1915 column_list(column_list_arg),
1916 row_value_list(row_value_list_arg),
1917 insert_query_expression(insert_query_expression_arg),
1918 opt_values_table_alias(opt_values_table_alias_arg.str),
1919 opt_values_column_list(opt_values_column_list_arg),
1920 opt_on_duplicate_column_list(opt_on_duplicate_column_list_arg),
1921 opt_on_duplicate_value_list(opt_on_duplicate_value_list_arg) {
1922 // REPLACE statement can't have IGNORE flag:
1923 assert(!is_replace || !ignore);
1924 // REPLACE statement can't have ON DUPLICATE KEY UPDATE clause:
1925 assert(!is_replace || opt_on_duplicate_column_list == nullptr);
1926 // INSERT/REPLACE ... SELECT can't have VALUES clause:
1927 assert((row_value_list != nullptr) ^ (insert_query_expression != nullptr));
1928 // ON DUPLICATE KEY UPDATE: column and value arrays must have same sizes:
1929 assert((opt_on_duplicate_column_list == nullptr &&
1930 opt_on_duplicate_value_list == nullptr) ||
1933 }
1934
1935 Sql_cmd *make_cmd(THD *thd) override;
1936
1937 private:
1938 bool has_query_block() const { return insert_query_expression != nullptr; }
1939};
1940
1941class PT_call final : public Parse_tree_root {
1944
1945 public:
1946 PT_call(sp_name *proc_name_arg, PT_item_list *opt_expr_list_arg)
1947 : proc_name(proc_name_arg), opt_expr_list(opt_expr_list_arg) {}
1948
1949 Sql_cmd *make_cmd(THD *thd) override;
1950};
1951
1952/**
1953 Top-level node for the SHUTDOWN statement
1954
1955 @ingroup ptn_stmt
1956*/
1957class PT_shutdown final : public Parse_tree_root {
1959
1960 public:
1961 Sql_cmd *make_cmd(THD *) override { return &sql_cmd; }
1962};
1963
1964/**
1965 Top-level node for the CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM statement.
1966
1967 @ingroup ptn_stmt
1968*/
1969class PT_create_srs final : public Parse_tree_root {
1970 /// The SQL command object.
1972 /// Whether OR REPLACE is specified.
1974 /// Whether IF NOT EXISTS is specified.
1976 /// SRID of the SRS to create.
1977 ///
1978 /// The range is larger than that of gis::srid_t, so it must be
1979 /// verified to be less than the uint32 maximum value.
1980 unsigned long long m_srid;
1981 /// All attributes except SRID.
1983
1984 /// Check if a UTF-8 string contains control characters.
1985 ///
1986 /// @note This function only checks single byte control characters (U+0000 to
1987 /// U+001F, and U+007F). There are some control characters at U+0080 to U+00A0
1988 /// that are not detected by this function.
1989 ///
1990 /// @param str The string.
1991 /// @param length Length of the string.
1992 ///
1993 /// @retval false The string contains no control characters.
1994 /// @retval true The string contains at least one control character.
1995 bool contains_control_char(char *str, size_t length) {
1996 for (size_t pos = 0; pos < length; pos++) {
1997 if (std::iscntrl(str[pos])) return true;
1998 }
1999 return false;
2000 }
2001
2002 public:
2003 PT_create_srs(unsigned long long srid,
2004 const Sql_cmd_srs_attributes &attributes, bool or_replace,
2005 bool if_not_exists)
2006 : m_or_replace(or_replace),
2007 m_if_not_exists(if_not_exists),
2008 m_srid(srid),
2009 m_attributes(attributes) {}
2010
2011 Sql_cmd *make_cmd(THD *thd) override;
2012};
2013
2014/**
2015 Top-level node for the DROP SPATIAL REFERENCE SYSTEM statement.
2016
2017 @ingroup ptn_stmt
2018*/
2019class PT_drop_srs final : public Parse_tree_root {
2020 /// The SQL command object.
2022 /// SRID of the SRS to drop.
2023 ///
2024 /// The range is larger than that of gis::srid_t, so it must be
2025 /// verified to be less than the uint32 maximum value.
2026 unsigned long long m_srid;
2027
2028 public:
2029 PT_drop_srs(unsigned long long srid, bool if_exists)
2030 : sql_cmd(srid, if_exists), m_srid(srid) {}
2031
2032 Sql_cmd *make_cmd(THD *thd) override;
2033};
2034
2035/**
2036 Top-level node for the ALTER INSTANCE statement
2037
2038 @ingroup ptn_stmt
2039*/
2042
2043 public:
2045 enum alter_instance_action_enum alter_instance_action,
2046 const LEX_CSTRING &channel)
2047 : sql_cmd(alter_instance_action, channel) {}
2048
2049 Sql_cmd *make_cmd(THD *thd) override;
2050};
2051
2052/**
2053 A template-free base class for index options that we can predeclare in
2054 sql_lex.h
2055*/
2057
2058/**
2059 A key part specification.
2060
2061 This can either be a "normal" key part (a key part that points to a column),
2062 or this can be a functional key part (a key part that points to an
2063 expression).
2064*/
2067
2068 public:
2069 /**
2070 Constructor for a functional key part.
2071
2072 @param expression The expression to index.
2073 @param order The direction of the index.
2074 */
2075 PT_key_part_specification(Item *expression, enum_order order);
2076
2077 /**
2078 Constructor for a "normal" key part. That is a key part that points to a
2079 column and not an expression.
2080
2081 @param column_name The column name that this key part points to.
2082 @param order The direction of the index.
2083 @param prefix_length How many bytes or characters this key part should
2084 index, or zero if it should index the entire column.
2085 */
2086 PT_key_part_specification(const LEX_CSTRING &column_name, enum_order order,
2087 int prefix_length);
2088
2089 /**
2090 Contextualize this key part specification. This will also call itemize on
2091 the indexed expression if this is a functional key part.
2092
2093 @param pc The parse context
2094
2095 @retval true on error
2096 @retval false on success
2097 */
2098 bool contextualize(Parse_context *pc) override;
2099
2100 /**
2101 Get the indexed expression. The caller must ensure that has_expression()
2102 returns true before calling this.
2103
2104 @returns The indexed expression
2105 */
2107 assert(has_expression());
2108 return m_expression;
2109 }
2110
2111 /**
2112 @returns The direction of the index: ORDER_ASC, ORDER_DESC or
2113 ORDER_NOT_RELEVANT in case the user didn't explicitly specify a
2114 direction.
2115 */
2116 enum_order get_order() const { return m_order; }
2117
2118 /**
2119 @retval true if the user explicitly specified a direction (asc/desc).
2120 @retval false if the user didn't explicitly specify a direction.
2121 */
2122 bool is_explicit() const { return get_order() != ORDER_NOT_RELEVANT; }
2123
2124 /**
2125 @retval true if the key part contains an expression (and thus is a
2126 functional key part).
2127 @retval false if the key part doesn't contain an expression.
2128 */
2129 bool has_expression() const { return m_expression != nullptr; }
2130
2131 /**
2132 Get the column that this key part points to. This is only valid if this
2133 key part isn't a functional index. The caller must thus check the return
2134 value of has_expression() before calling this function.
2135
2136 @returns The column that this key part points to.
2137 */
2139 assert(!has_expression());
2140 return m_column_name;
2141 }
2142
2143 /**
2144 @returns The number of bytes that this key part should index. If the column
2145 this key part points to is a non-binary column, this is the number
2146 of characters. Returns zero if the entire column should be indexed.
2147 */
2148 int get_prefix_length() const { return m_prefix_length; }
2149
2150 private:
2151 /**
2152 The indexed expression in case this is a functional key part. Only valid if
2153 has_expression() returns true.
2154 */
2156
2157 /// The direction of the index.
2159
2160 /// The name of the column that this key part indexes.
2162
2163 /**
2164 If this is greater than zero, it represents how many bytes of the column
2165 that is indexed. Note that for non-binary columns (VARCHAR, TEXT etc), this
2166 is the number of characters.
2167 */
2169};
2170
2171/**
2172 A template for options that set a single `<alter option>` value in
2173 thd->lex->key_create_info.
2174
2175 @tparam Option_type The data type of the option.
2176 @tparam Property Pointer-to-member for the option of KEY_CREATE_INFO.
2177*/
2178template <typename Option_type, Option_type KEY_CREATE_INFO::*Property>
2180 public:
2181 /// @param option_value The value of the option.
2182 PT_index_option(Option_type option_value) : m_option_value(option_value) {}
2183
2186 return false;
2187 }
2188
2189 private:
2190 Option_type m_option_value;
2191};
2192
2193/**
2194 A template for options that set a single property in a KEY_CREATE_INFO, and
2195 also records if the option was explicitly set.
2196*/
2197template <typename Option_type, Option_type KEY_CREATE_INFO::*Property,
2198 bool KEY_CREATE_INFO::*Property_is_explicit>
2200 public:
2201 PT_traceable_index_option(Option_type option_value)
2202 : m_option_value(option_value) {}
2203
2206 pc->key_create_info->*Property_is_explicit = true;
2207 return false;
2208 }
2209
2210 private:
2211 Option_type m_option_value;
2212};
2213
2221
2222/**
2223 The data structure (B-tree, Hash, etc) used for an index is called
2224 'index_type' in the manual. Internally, this is stored in
2225 KEY_CREATE_INFO::algorithm, while what the manual calls 'algorithm' is
2226 stored in partition_info::key_algorithm. In an `<create_index_stmt>`
2227 it's ignored. The terminology is somewhat confusing, but we stick to the
2228 manual in the parser.
2229*/
2233
2235 public:
2237 const LEX_STRING &name_arg, PT_base_index_option *type,
2238 Table_ident *table_ident,
2244 m_keytype(type_par),
2245 m_name(name_arg),
2246 m_type(type),
2247 m_table_ident(table_ident),
2248 m_columns(cols),
2250 m_algo(algo),
2251 m_lock(lock) {}
2252
2253 Sql_cmd *make_cmd(THD *thd) override;
2254
2255 private:
2264};
2265
2266/**
2267 Base class for column/constraint definitions in CREATE %TABLE
2268
2269 @ingroup ptn_create_table_stuff
2270*/
2272
2274
2277
2278 public:
2283 : m_keytype(type_par),
2284 m_name(name_arg),
2285 m_type(type),
2286 m_columns(cols),
2287 m_options(options) {}
2288
2289 bool contextualize(Table_ddl_parse_context *pc) override;
2290
2291 private:
2297};
2298
2301
2302 public:
2304 const LEX_STRING &key_name,
2306 Table_ident *referenced_table,
2307 List<Key_part_spec> *ref_list,
2308 fk_match_opt fk_match_option,
2309 fk_option fk_update_opt, fk_option fk_delete_opt)
2310 : m_constraint_name(constraint_name),
2311 m_key_name(key_name),
2312 m_columns(columns),
2313 m_referenced_table(referenced_table),
2314 m_ref_list(ref_list),
2315 m_fk_match_option(fk_match_option),
2316 m_fk_update_opt(fk_update_opt),
2317 m_fk_delete_opt(fk_delete_opt) {}
2318
2319 bool contextualize(Table_ddl_parse_context *pc) override;
2320
2321 private:
2330};
2331
2332/**
2333 Common base class for CREATE TABLE and ALTER TABLE option nodes
2334
2335 @ingroup ptn_create_or_alter_table_options
2336*/
2338 public:
2339 ~PT_ddl_table_option() override = 0; // Force abstract class declaration
2340
2341 virtual bool is_rename_table() const { return false; }
2342};
2343
2345
2346/**
2347 Base class for CREATE TABLE option nodes
2348
2349 @ingroup ptn_create_or_alter_table_options
2350*/
2353
2354 public:
2355 ~PT_create_table_option() override = 0; // Force abstract class declaration
2356
2358 if (super::contextualize(pc)) return true;
2360 return false;
2361 }
2362};
2363
2365
2366/**
2367 A template for options that set a single property in HA_CREATE_INFO, and
2368 also records if the option was explicitly set.
2369*/
2370template <typename Option_type, Option_type HA_CREATE_INFO::*Property,
2371 uint64_t Property_flag>
2374
2375 const Option_type value;
2376
2377 public:
2379
2381 if (super::contextualize(pc)) return true;
2382 pc->create_info->*Property = value;
2383 pc->create_info->used_fields |= Property_flag;
2384 return false;
2385 }
2386};
2387
2388#define TYPE_AND_REF(x) decltype(x), &x
2389
2390/**
2391 Node for the @SQL{MAX_ROWS [=] @B{@<integer@>}} table option
2392
2393 @ingroup ptn_create_or_alter_table_options
2394*/
2398
2399/**
2400 Node for the @SQL{MIN_ROWS [=] @B{@<integer@>}} table option
2401
2402 @ingroup ptn_create_or_alter_table_options
2403*/
2407
2408/**
2409 Node for the @SQL{AVG_ROW_LENGTH_ROWS [=] @B{@<integer@>}} table option
2410
2411 @ingroup ptn_create_or_alter_table_options
2412*/
2416
2417/**
2418 Node for the @SQL{PASSWORD [=] @B{@<string@>}} table option
2419
2420 @ingroup ptn_create_or_alter_table_options
2421*/
2425
2426/**
2427 Node for the @SQL{COMMENT [=] @B{@<string@>}} table option
2428
2429 @ingroup ptn_create_or_alter_table_options
2430*/
2434
2435/**
2436 Node for the @SQL{COMPRESSION [=] @B{@<string@>}} table option
2437
2438 @ingroup ptn_create_or_alter_table_options
2439*/
2443
2444/**
2445 Node for the @SQL{ENGRYPTION [=] @B{@<string@>}} table option
2446
2447 @ingroup ptn_create_or_alter_table_options
2448*/
2452
2453/**
2454 Node for the @SQL{AUTO_INCREMENT [=] @B{@<integer@>}} table option
2455
2456 @ingroup ptn_create_or_alter_table_options
2457*/
2461
2465
2470
2474
2478
2482
2486
2490
2495
2500
2502
2503/**
2504 A template for options that set HA_CREATE_INFO::table_options and
2505 also records if the option was explicitly set.
2506*/
2507template <ulong Property_flag, table_options_t Default, table_options_t Yes,
2508 table_options_t No>
2511
2513
2514 public:
2516 : value(value) {}
2517
2519 if (super::contextualize(pc)) return true;
2520 pc->create_info->table_options &= ~(Yes | No);
2521 switch (value) {
2522 case Ternary_option::ON:
2523 pc->create_info->table_options |= Yes;
2524 break;
2526 pc->create_info->table_options |= No;
2527 break;
2529 break;
2530 default:
2531 assert(false);
2532 }
2533 pc->create_info->used_fields |= Property_flag;
2534 return false;
2535 }
2536};
2537
2538/**
2539 Node for the @SQL{PACK_KEYS [=] @B{1|0|DEFAULT}} table option
2540
2541 @ingroup ptn_create_or_alter_table_options
2542
2543 PACK_KEYS | Constructor parameter
2544 ----------|----------------------
2545 1 | Ternary_option::ON
2546 0 | Ternary_option::OFF
2547 DEFAULT | Ternary_option::DEFAULT
2548*/
2550 0, // DEFAULT
2551 HA_OPTION_PACK_KEYS, // ON
2554
2555/**
2556 Node for the @SQL{STATS_PERSISTENT [=] @B{1|0|DEFAULT}} table option
2557
2558 @ingroup ptn_create_or_alter_table_options
2559
2560 STATS_PERSISTENT | Constructor parameter
2561 -----------------|----------------------
2562 1 | Ternary_option::ON
2563 0 | Ternary_option::OFF
2564 DEFAULT | Ternary_option::DEFAULT
2565*/
2567 0, // DEFAULT
2571
2572/**
2573 A template for options that set HA_CREATE_INFO::table_options and
2574 also records if the option was explicitly set.
2575*/
2576template <ulong Property_flag, table_options_t Yes, table_options_t No>
2579
2580 const bool value;
2581
2582 public:
2584
2586 if (super::contextualize(pc)) return true;
2587 pc->create_info->table_options &= ~(Yes | No);
2588 pc->create_info->table_options |= value ? Yes : No;
2589 pc->create_info->used_fields |= Property_flag;
2590 return false;
2591 }
2592};
2593
2594/**
2595 Node for the @SQL{CHECKSUM|TABLE_CHECKSUM [=] @B{0|@<not 0@>}} table option
2596
2597 @ingroup ptn_create_or_alter_table_options
2598
2599 TABLE_CHECKSUM | Constructor parameter
2600 ---------------|----------------------
2601 0 | false
2602 not 0 | true
2603*/
2605 HA_OPTION_CHECKSUM, // ON
2607 >
2609
2610/**
2611 Node for the @SQL{DELAY_KEY_WRITE [=] @B{0|@<not 0@>}} table option
2612
2613 @ingroup ptn_create_or_alter_table_options
2614
2615 TABLE_CHECKSUM | Constructor parameter
2616 ---------------|----------------------
2617 0 | false
2618 not 0 | true
2619*/
2624
2625/**
2626 Node for the @SQL{ENGINE [=] @B{@<identifier@>|@<string@>}} table option
2627
2628 @ingroup ptn_create_or_alter_table_options
2629*/
2632
2634
2635 public:
2636 /**
2637 @param engine Storage engine name.
2638 */
2640 : engine(engine) {}
2641
2642 bool contextualize(Table_ddl_parse_context *pc) override;
2643};
2644
2645/**
2646 Node for the @SQL{SECONDARY_ENGINE [=] @B{@<identifier@>|@<string@>|NULL}}
2647 table option.
2648
2649 @ingroup ptn_create_or_alter_table_options
2650*/
2653
2654 public:
2659
2660 bool contextualize(Table_ddl_parse_context *pc) override;
2661
2662 private:
2664};
2665
2666/**
2667 Node for the @SQL{STATS_AUTO_RECALC [=] @B{@<0|1|DEFAULT@>})} table option
2668
2669 @ingroup ptn_create_or_alter_table_options
2670*/
2673
2675
2676 public:
2677 /**
2678 @param value
2679 STATS_AUTO_RECALC | value
2680 ------------------|----------------------
2681 1 | Ternary_option::ON
2682 0 | Ternary_option::OFF
2683 DEFAULT | Ternary_option::DEFAULT
2684 */
2686
2687 bool contextualize(Table_ddl_parse_context *pc) override;
2688};
2689
2690/**
2691 Node for the @SQL{STATS_SAMPLE_PAGES [=] @B{@<integer@>|DEFAULT}} table option
2692
2693 @ingroup ptn_create_or_alter_table_options
2694*/
2698
2700
2701 public:
2702 /**
2703 Constructor for implicit number of pages
2704
2705 @param value Number of pages, 1@<=N@<=65535.
2706 */
2708 assert(value != 0 && value <= 0xFFFF);
2709 }
2710 /**
2711 Constructor for the DEFAULT number of pages
2712 */
2714
2715 bool contextualize(Table_ddl_parse_context *pc) override;
2716};
2717
2720
2722
2723 public:
2725 : tables(tables) {}
2726
2727 bool contextualize(Table_ddl_parse_context *pc) override;
2728};
2729
2732
2734
2735 public:
2737
2739 if (super::contextualize(pc)) return true;
2741 return false;
2742 }
2743};
2744
2747
2749
2750 public:
2752 : value(value) {
2753 assert(value != nullptr);
2754 }
2755
2756 bool contextualize(Table_ddl_parse_context *pc) override;
2757};
2758
2761
2763
2764 public:
2766 : value(value) {
2767 assert(value != nullptr);
2768 }
2769
2770 bool contextualize(Table_ddl_parse_context *pc) override;
2771};
2772
2776
2777 public:
2778 explicit PT_check_constraint(LEX_STRING &name, Item *expr, bool is_enforced) {
2779 cc_spec.name = name;
2780 cc_spec.check_expr = expr;
2781 cc_spec.is_enforced = is_enforced;
2782 }
2784
2785 bool contextualize(Table_ddl_parse_context *pc) override;
2786};
2787
2790
2793 // Currently we ignore that constraint in the executor.
2795
2796 const char *opt_place;
2797
2798 public:
2801 const char *opt_place = nullptr)
2806
2807 bool contextualize(Table_ddl_parse_context *pc) override;
2808};
2809
2810/**
2811 Top-level node for the CREATE %TABLE statement
2812
2813 @ingroup ptn_create_table
2814*/
2825
2827
2828 public:
2829 /**
2830 @param mem_root MEM_ROOT to use for allocation
2831 @param is_temporary True if @SQL{CREATE @B{TEMPORARY} %TABLE}
2832 @param only_if_not_exists True if @SQL{CREATE %TABLE ... @B{IF NOT EXISTS}}
2833 @param table_name @SQL{CREATE %TABLE ... @B{@<table name@>}}
2834 @param opt_table_element_list NULL or a list of table column and
2835 constraint definitions.
2836 @param opt_create_table_options NULL or a list of
2837 @ref ptn_create_or_alter_table_options
2838 "table options".
2839 @param opt_partitioning NULL or the @SQL{PARTITION BY} clause.
2840 @param on_duplicate DUPLICATE, IGNORE or fail with an error
2841 on data duplication errors (relevant
2842 for @SQL{CREATE TABLE ... SELECT}
2843 statements).
2844 @param opt_query_expression NULL or the @SQL{@B{SELECT}} clause.
2845 */
2863 /**
2864 @param mem_root MEM_ROOT to use for allocation
2865 @param is_temporary True if @SQL{CREATE @B{TEMPORARY} %TABLE}.
2866 @param only_if_not_exists True if @SQL{CREATE %TABLE ... @B{IF NOT EXISTS}}.
2867 @param table_name @SQL{CREATE %TABLE ... @B{@<table name@>}}.
2868 @param opt_like_clause NULL or the @SQL{@B{LIKE @<table name@>}} clause.
2869 */
2883
2884 Sql_cmd *make_cmd(THD *thd) override;
2885};
2886
2887class PT_create_role final : public Parse_tree_root {
2889
2890 public:
2891 PT_create_role(bool if_not_exists, const List<LEX_USER> *roles)
2892 : sql_cmd(if_not_exists, roles) {}
2893
2894 Sql_cmd *make_cmd(THD *thd) override;
2895};
2896
2897class PT_drop_role final : public Parse_tree_root {
2899
2900 public:
2901 explicit PT_drop_role(bool ignore_errors, const List<LEX_USER> *roles)
2902 : sql_cmd(ignore_errors, roles) {}
2903
2904 Sql_cmd *make_cmd(THD *thd) override;
2905};
2906
2909
2910 public:
2911 explicit PT_set_role(role_enum role_type,
2912 const List<LEX_USER> *opt_except_roles = nullptr)
2913 : sql_cmd(role_type, opt_except_roles) {
2914 assert(role_type == role_enum::ROLE_ALL || opt_except_roles == nullptr);
2915 }
2916 explicit PT_set_role(const List<LEX_USER> *roles) : sql_cmd(roles) {}
2917
2918 Sql_cmd *make_cmd(THD *thd) override;
2919};
2920
2921/**
2922 This class is used for representing both static and dynamic privileges on
2923 global as well as table and column level.
2924*/
2927
2930
2933 : type(type), columns(columns) {}
2934};
2935
2938
2940 : Privilege(STATIC, columns_arg), grant(grant) {}
2941};
2942
2945
2947 const Mem_root_array<LEX_CSTRING> *columns_arg)
2948 : Privilege(DYNAMIC, columns_arg), ident(ident) {}
2949};
2950
2952 private:
2954
2955 public:
2956 explicit PT_role_or_privilege(const POS &pos) : pos(pos) {}
2957 virtual LEX_USER *get_user(THD *thd);
2958 virtual Privilege *get_privilege(THD *thd);
2959};
2960
2964
2965 public:
2967 const LEX_STRING &host)
2969
2970 LEX_USER *get_user(THD *thd) override;
2971};
2972
2975
2976 public:
2979
2980 LEX_USER *get_user(THD *thd) override;
2981 Privilege *get_privilege(THD *thd) override;
2982};
2983
2987
2988 public:
2990 const Mem_root_array<LEX_CSTRING> *columns = nullptr)
2992
2993 Privilege *get_privilege(THD *thd) override;
2994};
2995
2998
2999 public:
3002
3003 Privilege *get_privilege(THD *thd) override;
3004};
3005
3006class PT_grant_roles final : public Parse_tree_root {
3010
3011 public:
3015
3016 Sql_cmd *make_cmd(THD *thd) override;
3017};
3018
3019class PT_revoke_roles final : public Parse_tree_root {
3022
3023 public:
3025 const List<LEX_USER> *users)
3026 : roles(roles), users(users) {}
3027
3028 Sql_cmd *make_cmd(THD *thd) override;
3029};
3030
3033
3034 public:
3035 PT_alter_user_default_role(bool if_exists, const List<LEX_USER> *users,
3036 const List<LEX_USER> *roles,
3037 const role_enum role_type)
3038 : sql_cmd(if_exists, users, roles, role_type) {}
3039
3040 Sql_cmd *make_cmd(THD *thd) override;
3041};
3042
3043/// Base class for Parse tree nodes of SHOW statements
3044
3046 protected:
3047 PT_show_base(const POS &pos, enum_sql_command sql_command)
3048 : m_pos(pos), m_sql_command(sql_command) {}
3049
3050 /// Textual location of a token just parsed.
3052 /// SQL command
3054};
3055
3056/// Base class for Parse tree nodes of SHOW statements with LIKE/WHERE parameter
3057
3059 protected:
3061 const LEX_STRING &wild, Item *where)
3062 : PT_show_base(pos, sql_command), m_wild(wild), m_where(where) {
3063 assert(m_wild.str == nullptr || m_where == nullptr);
3064 }
3065 /// Wild or where clause used in the statement.
3068};
3069
3070/// Base class for Parse tree nodes of SHOW statements with schema parameter.
3071
3073 protected:
3075 char *opt_db, const LEX_STRING &wild, Item *where)
3076 : PT_show_base(pos, sql_command),
3078 m_wild(wild),
3079 m_where(where) {
3080 assert(m_wild.str == nullptr || m_where == nullptr);
3081 }
3082 /// Optional schema name in FROM/IN clause.
3084 /// Wild or where clause used in the statement.
3087};
3088
3089/// Base class for Parse tree nodes of SHOW COLUMNS/SHOW INDEX statements.
3090
3092 protected:
3093 PT_show_table_base(const POS &pos, enum_sql_command sql_command,
3094 Table_ident *table_ident, const LEX_STRING &wild,
3095 Item *where)
3096 : PT_show_filter_base(pos, sql_command, wild, where),
3097 m_table_ident(table_ident) {}
3098
3099 bool make_table_base_cmd(THD *thd, bool *temporary);
3100
3101 /// Table used in the statement.
3103};
3104
3105/// Parse tree node for SHOW FUNCTION/PROCEDURE CODE statements.
3106
3108 protected:
3110 const sp_name *routine_name)
3111 : PT_show_base(pos, sql_command), m_sql_cmd(sql_command, routine_name) {}
3112
3113 Sql_cmd *make_cmd(THD *thd) override;
3114
3115 private:
3117};
3118
3119/// Parse tree node for SHOW BINLOG EVENTS statement
3120
3122 public:
3123 PT_show_binlog_events(const POS &pos, const LEX_STRING opt_log_file_name = {},
3124 PT_limit_clause *opt_limit_clause = nullptr)
3126 m_opt_log_file_name(opt_log_file_name),
3127 m_opt_limit_clause(opt_limit_clause) {}
3128
3129 Sql_cmd *make_cmd(THD *thd) override;
3130
3131 private:
3134
3136};
3137
3138/// Parse tree node for SHOW BINLOGS statement
3139
3140class PT_show_binlogs final : public PT_show_base {
3141 public:
3143
3144 Sql_cmd *make_cmd(THD *thd) override;
3145
3146 private:
3148};
3149
3150/// Parse tree node for SHOW CHARACTER SET statement
3151
3153 public:
3154 PT_show_charsets(const POS &pos, const LEX_STRING &wild, Item *where)
3156
3157 Sql_cmd *make_cmd(THD *thd) override;
3158
3159 private:
3161};
3162
3163/// Parse tree node for SHOW COLLATIONS statement
3164
3166 public:
3167 PT_show_collations(const POS &pos, const LEX_STRING &wild, Item *where)
3169
3170 Sql_cmd *make_cmd(THD *thd) override;
3171
3172 private:
3174};
3175
3176/// Base class for Parse tree nodes of SHOW COUNT(*) { WARNINGS | ERRORS }
3177/// statements.
3178
3180 public:
3181 explicit PT_show_count_base(const POS &pos)
3182 : PT_show_base{pos, SQLCOM_SELECT} {}
3183
3184 protected:
3185 Sql_cmd *make_cmd_generic(THD *thd, LEX_CSTRING diagnostic_variable_name);
3186};
3187
3188/// Parse tree node for SHOW COUNT(*) ERRORS
3189
3191 public:
3192 explicit PT_show_count_errors(const POS &pos) : PT_show_count_base(pos) {}
3193
3194 Sql_cmd *make_cmd(THD *thd) override {
3195 return make_cmd_generic(thd, LEX_CSTRING{STRING_WITH_LEN("error_count")});
3196 }
3197};
3198
3199/// Parse tree node for SHOW COUNT(*) WARNINGS
3200
3202 public:
3203 explicit PT_show_count_warnings(const POS &pos) : PT_show_count_base(pos) {}
3204
3205 Sql_cmd *make_cmd(THD *thd) override {
3206 return make_cmd_generic(thd, LEX_CSTRING{STRING_WITH_LEN("warning_count")});
3207 }
3208};
3209
3210/// Parse tree node for SHOW CREATE DATABASE statement
3211
3213 public:
3214 PT_show_create_database(const POS &pos, bool if_not_exists,
3215 const LEX_STRING &name)
3217 m_if_not_exists(if_not_exists),
3218 m_name(name) {}
3219
3220 Sql_cmd *make_cmd(THD *thd) override;
3221
3222 private:
3225
3227};
3228
3229/// Parse tree node for SHOW CREATE EVENT statement
3230
3232 public:
3233 PT_show_create_event(const POS &pos, sp_name *event_name)
3234 : PT_show_base(pos, SQLCOM_SHOW_CREATE_EVENT), m_spname(event_name) {}
3235
3236 Sql_cmd *make_cmd(THD *thd) override;
3237
3238 private:
3240
3242};
3243
3244/// Parse tree node for SHOW CREATE FUNCTION statement
3245
3247 public:
3248 PT_show_create_function(const POS &pos, sp_name *function_name)
3249 : PT_show_base(pos, SQLCOM_SHOW_CREATE_FUNC), m_spname(function_name) {}
3250
3251 Sql_cmd *make_cmd(THD *thd) override;
3252
3253 private:
3255
3257};
3258
3259/// Parse tree node for SHOW CREATE PROCEDURE statement
3260
3262 public:
3263 PT_show_create_procedure(const POS &pos, sp_name *procedure_name)
3264 : PT_show_base(pos, SQLCOM_SHOW_CREATE_PROC), m_spname(procedure_name) {}
3265
3266 Sql_cmd *make_cmd(THD *thd) override;
3267
3268 private:
3270
3272};
3273
3274/// Parse tree node for SHOW CREATE TABLE and VIEW statements
3275
3277 public:
3278 PT_show_create_table(const POS &pos, Table_ident *table_ident)
3279 : PT_show_base(pos, SQLCOM_SHOW_CREATE), m_sql_cmd(false, table_ident) {}
3280
3281 Sql_cmd *make_cmd(THD *thd) override;
3282
3283 private:
3285};
3286
3287/// Parse tree node for SHOW CREATE TRIGGER statement
3288
3290 public:
3291 PT_show_create_trigger(const POS &pos, sp_name *trigger_name)
3292 : PT_show_base(pos, SQLCOM_SHOW_CREATE_TRIGGER), m_spname(trigger_name) {}
3293
3294 Sql_cmd *make_cmd(THD *thd) override;
3295
3296 private:
3298
3300};
3301
3302/// Parse tree node for SHOW CREATE USER statement
3303
3304class PT_show_create_user final : public PT_show_base {
3305 public:
3308
3309 Sql_cmd *make_cmd(THD *thd) override;
3310
3311 private:
3313
3315};
3316
3317/// Parse tree node for SHOW CREATE VIEW statement
3318
3319class PT_show_create_view final : public PT_show_base {
3320 public:
3321 PT_show_create_view(const POS &pos, Table_ident *table_ident)
3322 : PT_show_base(pos, SQLCOM_SHOW_CREATE), m_sql_cmd(true, table_ident) {}
3323
3324 Sql_cmd *make_cmd(THD *thd) override;
3325
3326 private:
3328};
3329
3330/// Parse tree node for SHOW DATABASES statement
3331
3333 public:
3334 PT_show_databases(const POS &pos, const LEX_STRING &wild, Item *where)
3336
3337 Sql_cmd *make_cmd(THD *thd) override;
3338
3339 private:
3341};
3342
3343/// Parse tree node for SHOW ENGINE statements
3344
3346 protected:
3347 PT_show_engine_base(const POS &pos, enum enum_sql_command sql_command,
3348 const LEX_STRING opt_engine = {})
3349 : PT_show_base(pos, sql_command),
3350 m_engine(opt_engine),
3351 m_all(opt_engine.str == nullptr) {}
3352
3354 bool m_all;
3355};
3356
3357/// Parse tree node for SHOW ENGINE LOGS statement
3358
3360 public:
3361 PT_show_engine_logs(const POS &pos, LEX_STRING opt_engine = {})
3362 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_LOGS, opt_engine) {}
3363
3364 Sql_cmd *make_cmd(THD *thd) override;
3365
3366 private:
3368};
3369
3370/// Parse tree node for SHOW ENGINE MUTEX statement
3371
3373 public:
3374 PT_show_engine_mutex(const POS &pos, LEX_STRING opt_engine = {})
3375 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_MUTEX, opt_engine) {}
3376
3377 Sql_cmd *make_cmd(THD *thd) override;
3378
3379 private:
3381};
3382
3383/// Parse tree node for SHOW ENGINE STATUS statement
3384
3386 public:
3387 PT_show_engine_status(const POS &pos, LEX_STRING opt_engine = {})
3388 : PT_show_engine_base(pos, SQLCOM_SHOW_ENGINE_STATUS, opt_engine) {}
3389
3390 Sql_cmd *make_cmd(THD *thd) override;
3391
3392 private:
3394};
3395
3396/// Parse tree node for SHOW ENGINES statement
3397
3398class PT_show_engines final : public PT_show_base {
3399 public:
3402
3403 Sql_cmd *make_cmd(THD *thd) override;
3404
3405 private:
3407};
3408
3409/// Parse tree node for SHOW ERRORS statement
3410
3411class PT_show_errors final : public PT_show_base {
3412 public:
3413 PT_show_errors(const POS &pos, PT_limit_clause *opt_limit_clause = nullptr)
3415 m_opt_limit_clause(opt_limit_clause) {}
3416
3417 Sql_cmd *make_cmd(THD *thd) override;
3418
3419 private:
3421
3423};
3424
3425/// Parse tree node for SHOW EVENTS statement
3426
3428 public:
3429 PT_show_events(const POS &pos, char *opt_db, const LEX_STRING &wild,
3430 Item *where)
3432
3433 Sql_cmd *make_cmd(THD *thd) override;
3434
3435 private:
3437};
3438
3439/// Parse tree node for SHOW COLUMNS statement.
3440
3443
3444 public:
3445 PT_show_fields(const POS &pos, Show_cmd_type show_cmd_type,
3446 Table_ident *table, LEX_STRING opt_wild = {},
3447 Item *opt_where = nullptr)
3448 : PT_show_table_base(pos, SQLCOM_SHOW_FIELDS, table, opt_wild, opt_where),
3449 m_show_cmd_type(show_cmd_type) {}
3450
3451 Sql_cmd *make_cmd(THD *thd) override;
3452
3453 private:
3456};
3457
3458/// Parse tree node for SHOW FUNCTION CODE statement.
3459
3461 public:
3462 PT_show_function_code(const POS &pos, const sp_name *function_name)
3463 : PT_show_routine_code(pos, SQLCOM_SHOW_FUNC_CODE, function_name) {}
3464};
3465
3466/// Parse tree node for SHOW GRANTS statement.
3467
3468class PT_show_grants final : public PT_show_base {
3469 public:
3470 PT_show_grants(const POS &pos, const LEX_USER *opt_for_user,
3471 const List<LEX_USER> *opt_using_users)
3473 sql_cmd(opt_for_user, opt_using_users) {
3474 assert(opt_using_users == nullptr || opt_for_user != nullptr);
3475 }
3476
3477 Sql_cmd *make_cmd(THD *thd) override;
3478
3479 private:
3481};
3482
3483/// Parse tree node for SHOW INDEX statement.
3484
3485class PT_show_keys final : public PT_show_table_base {
3486 public:
3487 PT_show_keys(const POS &pos, bool extended_show, Table_ident *table,
3488 Item *where)
3490 m_extended_show(extended_show) {}
3491
3492 Sql_cmd *make_cmd(THD *thd) override;
3493
3494 private:
3496
3497 // Flag to indicate EXTENDED keyword usage in the statement.
3500};
3501
3502/// Parse tree node for SHOW MASTER STATUS statement
3503
3505 public:
3508
3509 Sql_cmd *make_cmd(THD *thd) override;
3510
3511 private:
3513};
3514
3515/// Parse tree node for SHOW OPEN TABLES statement
3516
3518 public:
3519 PT_show_open_tables(const POS &pos, char *opt_db, const LEX_STRING &wild,
3520 Item *where)
3522 }
3523
3524 Sql_cmd *make_cmd(THD *thd) override;
3525
3526 private:
3528};
3529
3530/// Parse tree node for SHOW PLUGINS statement
3531
3532class PT_show_plugins final : public PT_show_base {
3533 public:
3535
3536 Sql_cmd *make_cmd(THD *thd) override;
3537
3538 private:
3540};
3541
3542/// Parse tree node for SHOW PRIVILEGES statement
3543
3544class PT_show_privileges final : public PT_show_base {
3545 public:
3548
3549 Sql_cmd *make_cmd(THD *thd) override;
3550
3551 private:
3553};
3554
3555/// Parse tree node for SHOW FUNCTION CODE statement.
3556
3558 public:
3559 PT_show_procedure_code(const POS &pos, const sp_name *procedure_name)
3560 : PT_show_routine_code(pos, SQLCOM_SHOW_PROC_CODE, procedure_name) {}
3561};
3562
3563/// Parse tree node for SHOW PROCESSLIST statement
3564
3565class PT_show_processlist final : public PT_show_base {
3566 public:
3569
3570 Sql_cmd *make_cmd(THD *thd) override;
3571
3572 private:
3574};
3575
3576/// Parse tree node for SHOW PROFILE statement
3577
3578class PT_show_profile final : public PT_show_base {
3579 public:
3580 PT_show_profile(const POS &pos, uint opt_profile_options = 0,
3581 my_thread_id opt_query_id = 0,
3582 PT_limit_clause *opt_limit_clause = nullptr)
3584 m_opt_profile_options(opt_profile_options),
3585 m_opt_query_id(opt_query_id),
3586 m_opt_limit_clause(opt_limit_clause) {}
3587
3588 Sql_cmd *make_cmd(THD *thd) override;
3589
3590 private:
3594
3596};
3597
3598/// Parse tree node for SHOW PROFILES statement
3599
3600class PT_show_profiles final : public PT_show_base {
3601 public:
3603
3604 Sql_cmd *make_cmd(THD *thd) override;
3605
3606 private:
3608};
3609
3610/// Parse tree node for SHOW RELAYLOG EVENTS statement
3611
3613 public:
3615 const LEX_STRING opt_log_file_name = {},
3616 PT_limit_clause *opt_limit_clause = nullptr,
3617 LEX_CSTRING opt_channel_name = {})
3619 m_opt_log_file_name(opt_log_file_name),
3620 m_opt_limit_clause(opt_limit_clause),
3621 m_opt_channel_name(opt_channel_name) {}
3622
3623 Sql_cmd *make_cmd(THD *thd) override;
3624
3625 private:
3629
3631};
3632
3633/// Parse tree node for SHOW REPLICAS statement
3634
3635class PT_show_replicas final : public PT_show_base {
3636 public:
3639
3640 Sql_cmd *make_cmd(THD *thd) override;
3641
3642 private:
3644};
3645
3646/// Parse tree node for SHOW REPLICA STATUS statement
3647
3649 public:
3650 PT_show_replica_status(const POS &pos, LEX_CSTRING opt_channel_name = {})
3652 m_opt_channel_name(opt_channel_name) {}
3653
3654 Sql_cmd *make_cmd(THD *thd) override;
3655
3656 private:
3658
3660};
3661
3662/// Parse tree node for SHOW STATUS statement
3663
3665 public:
3666 PT_show_status(const POS &pos, enum_var_type var_type, const LEX_STRING &wild,
3667 Item *where)
3669 m_var_type(var_type) {
3671 }
3672
3673 Sql_cmd *make_cmd(THD *thd) override;
3674
3675 private:
3677
3679};
3680
3681/// Parse tree node for SHOW STATUS FUNCTION statement
3682
3684 public:
3685 PT_show_status_func(const POS &pos, const LEX_STRING &wild, Item *where)
3687
3688 Sql_cmd *make_cmd(THD *thd) override;
3689
3690 private:
3692};
3693
3694/// Parse tree node for SHOW STATUS PROCEDURE statement
3695
3697 public:
3698 PT_show_status_proc(const POS &pos, const LEX_STRING &wild, Item *where)
3700
3701 Sql_cmd *make_cmd(THD *thd) override;
3702
3703 private:
3705};
3706
3707/// Parse tree node for SHOW TABLE STATUS statement
3708
3710 public:
3711 PT_show_table_status(const POS &pos, char *opt_db, const LEX_STRING &wild,
3712 Item *where)
3714 where) {}
3715
3716 Sql_cmd *make_cmd(THD *thd) override;
3717
3718 private:
3720};
3721
3722/// Parse tree node for SHOW TABLES statement
3723
3725 public:
3726 PT_show_tables(const POS &pos, Show_cmd_type show_cmd_type, char *opt_db,
3727 const LEX_STRING &wild, Item *where)
3729 m_show_cmd_type(show_cmd_type) {}
3730
3731 Sql_cmd *make_cmd(THD *thd) override;
3732
3733 private:
3735
3737};
3738
3739/// Parse tree node for SHOW TRIGGERS statement
3740
3742 public:
3743 PT_show_triggers(const POS &pos, bool full, char *opt_db,
3744 const LEX_STRING &wild, Item *where)
3746 m_full(full) {}
3747
3748 Sql_cmd *make_cmd(THD *thd) override;
3749
3750 private:
3752
3754};
3755
3756/// Parse tree node for SHOW VARIABLES statement
3757
3759 public:
3761 const LEX_STRING &wild, Item *where)
3763 m_var_type(var_type) {
3765 }
3766
3767 Sql_cmd *make_cmd(THD *thd) override;
3768
3769 private:
3771
3773};
3774
3775/// Parse tree node for SHOW WARNINGS statement
3776
3777class PT_show_warnings final : public PT_show_base {
3778 public:
3779 PT_show_warnings(const POS &pos, PT_limit_clause *opt_limit_clause = nullptr)
3781 m_opt_limit_clause(opt_limit_clause) {}
3782
3783 Sql_cmd *make_cmd(THD *thd) override;
3784
3785 private:
3787
3789};
3790
3793
3794 protected:
3796 : flag(flag) {}
3797
3798 public:
3799 bool contextualize(Table_ddl_parse_context *pc) override;
3800
3801 protected:
3802 /**
3803 A routine used by the parser to decide whether we are specifying a full
3804 partitioning or if only partitions to add or to reorganize.
3805
3806 @retval true ALTER TABLE ADD/REORGANIZE PARTITION.
3807 @retval false Something else.
3808 */
3812 }
3813
3814 public:
3816};
3817
3820
3821 public:
3823 PT_field_def_base *field_def,
3824 PT_table_constraint_def *opt_column_constraint,
3825 const char *opt_place)
3826 : super(Alter_info::ALTER_ADD_COLUMN),
3827 m_column_def(field_ident, field_def, opt_column_constraint, opt_place) {
3828 }
3829
3832 }
3833
3834 private:
3836};
3837
3840
3841 public:
3844 : super(Alter_info::ALTER_ADD_COLUMN), m_columns(columns) {}
3845
3847 if (super::contextualize(pc)) return true;
3848
3849 for (auto *column : *m_columns)
3850 if (column->contextualize(pc)) return true;
3851
3852 return false;
3853 }
3854
3855 private:
3857};
3858
3861
3862 public:
3864 : super(Alter_info::ALTER_ADD_INDEX), m_constraint(constraint) {}
3865
3868 }
3869
3870 private:
3872};
3873
3876
3877 public:
3879 const LEX_STRING &new_name,
3880 PT_field_def_base *field_def,
3881 const char *opt_place)
3882 : super(Alter_info::ALTER_CHANGE_COLUMN),
3883 m_old_name(old_name),
3884 m_new_name(new_name),
3885 m_field_def(field_def),
3886 m_opt_place(opt_place) {}
3887
3889 PT_field_def_base *field_def,
3890 const char *opt_place)
3891 : PT_alter_table_change_column(name, name, field_def, opt_place) {}
3892
3893 bool contextualize(Table_ddl_parse_context *pc) override;
3894
3895 private:
3899 const char *m_opt_place;
3900};
3901
3904
3905 protected:
3907 Alter_info::Alter_info_flag alter_info_flag,
3908 const char *name)
3909 : super(alter_info_flag), m_alter_drop(drop_type, name) {}
3910
3911 public:
3913 return (super::contextualize(pc) ||
3914 pc->alter_info->drop_list.push_back(&m_alter_drop));
3915 }
3916
3917 private:
3919};
3920
3922 public:
3923 explicit PT_alter_table_drop_column(const char *name)
3924 : PT_alter_table_drop(Alter_drop::COLUMN, Alter_info::ALTER_DROP_COLUMN,
3925 name) {}
3926};
3927
3929 public:
3932 Alter_info::DROP_FOREIGN_KEY, name) {}
3933};
3934
3936 public:
3937 explicit PT_alter_table_drop_key(const char *name)
3938 : PT_alter_table_drop(Alter_drop::KEY, Alter_info::ALTER_DROP_INDEX,
3939 name) {}
3940};
3941
3943 public:
3945 : PT_alter_table_drop(Alter_drop::CHECK_CONSTRAINT,
3946 Alter_info::DROP_CHECK_CONSTRAINT, name) {}
3947};
3948
3950 public:
3952 : PT_alter_table_drop(Alter_drop::ANY_CONSTRAINT,
3953 Alter_info::DROP_ANY_CONSTRAINT, name) {}
3954};
3955
3958
3959 protected:
3962 Alter_info::Alter_info_flag alter_info_flag, const char *name,
3963 bool is_enforced)
3964 : super(alter_info_flag),
3965 m_constraint_enforcement(alter_type, name, is_enforced) {}
3966
3967 public:
3968 explicit PT_alter_table_enforce_constraint(const char *name, bool is_enforced)
3969 : super(is_enforced ? Alter_info::ENFORCE_ANY_CONSTRAINT
3970 : Alter_info::SUSPEND_ANY_CONSTRAINT),
3972 Alter_constraint_enforcement::Type::ANY_CONSTRAINT, name,
3973 is_enforced) {}
3974
3976 return (super::contextualize(pc) ||
3979 }
3980
3981 private:
3983};
3984
3987 public:
3989 bool is_enforced)
3991 Alter_constraint_enforcement::Type::CHECK_CONSTRAINT,
3992 is_enforced ? Alter_info::ENFORCE_CHECK_CONSTRAINT
3993 : Alter_info::SUSPEND_CHECK_CONSTRAINT,
3994 name, is_enforced) {}
3995};
3996
3999
4000 public:
4001 explicit PT_alter_table_enable_keys(bool enable)
4002 : super(Alter_info::ALTER_KEYS_ONOFF), m_enable(enable) {}
4003
4005 pc->alter_info->keys_onoff =
4007 return super::contextualize(pc);
4008 }
4009
4010 private:
4012};
4013
4016
4017 public:
4018 PT_alter_table_set_default(const char *col_name, Item *opt_default_expr)
4019 : super(Alter_info::ALTER_CHANGE_COLUMN_DEFAULT),
4020 m_name(col_name),
4021 m_expr(opt_default_expr) {}
4022
4023 bool contextualize(Table_ddl_parse_context *pc) override;
4024
4025 private:
4026 const char *m_name;
4028};
4029
4032
4033 public:
4034 PT_alter_table_column_visibility(const char *col_name, bool is_visible)
4035 : super(Alter_info::ALTER_COLUMN_VISIBILITY),
4036 m_alter_column(col_name, is_visible) {}
4037
4039 return (super::contextualize(pc) ||
4040 pc->alter_info->alter_list.push_back(&m_alter_column));
4041 }
4042
4043 private:
4045};
4046
4049
4050 public:
4051 PT_alter_table_index_visible(const char *name, bool visible)
4052 : super(Alter_info::ALTER_INDEX_VISIBILITY),
4053 m_alter_index_visibility(name, visible) {}
4054
4056 return (super::contextualize(pc) ||
4059 }
4060
4061 private:
4063};
4064
4067
4068 public:
4069 explicit PT_alter_table_rename(const Table_ident *ident)
4070 : super(Alter_info::ALTER_RENAME), m_ident(ident) {}
4071
4072 bool contextualize(Table_ddl_parse_context *pc) override;
4073
4074 bool is_rename_table() const override { return true; }
4075
4076 private:
4077 const Table_ident *const m_ident;
4078};
4079
4082
4083 public:
4084 PT_alter_table_rename_key(const char *from, const char *to)
4085 : super(Alter_info::ALTER_RENAME_INDEX), m_rename_key(from, to) {}
4086
4088 return super::contextualize(pc) ||
4090 }
4091
4092 private:
4094};
4095
4098
4099 public:
4100 PT_alter_table_rename_column(const char *from, const char *to)
4101 : super(Alter_info::ALTER_CHANGE_COLUMN), m_rename_column(from, to) {}
4102
4104 return super::contextualize(pc) ||
4105 pc->alter_info->alter_list.push_back(&m_rename_column);
4106 }
4107
4108 private:
4110};
4111
4114
4115 public:
4117 const CHARSET_INFO *opt_collation)
4118 : super(Alter_info::ALTER_OPTIONS),
4120 m_collation(opt_collation) {}
4121
4122 bool contextualize(Table_ddl_parse_context *pc) override;
4123
4124 private:
4127};
4128
4131
4132 public:
4133 PT_alter_table_force() : super(Alter_info::ALTER_RECREATE) {}
4134};
4135
4138
4139 public:
4141 : super(Alter_info::ALTER_ORDER), m_order(order) {}
4142
4143 bool contextualize(Table_ddl_parse_context *pc) override;
4144
4145 private:
4147};
4148
4151
4152 public:
4154 : super(Alter_info::ALTER_PARTITION), m_partition(partition) {}
4155
4156 bool contextualize(Table_ddl_parse_context *pc) override;
4157
4158 private:
4160};
4161
4164
4165 public:
4167 : super(Alter_info::ALTER_REMOVE_PARTITIONING) {}
4168};
4169
4172
4173 friend class PT_alter_table_standalone_stmt; // to access make_cmd()
4174
4175 protected:
4177 : super(alter_info_flag) {}
4178
4179 private:
4181};
4182
4183/**
4184 Node for the @SQL{ALTER TABLE ADD PARTITION} statement
4185
4186 @ingroup ptn_alter_table
4187*/
4190
4191 public:
4192 explicit PT_alter_table_add_partition(bool no_write_to_binlog)
4193 : super(Alter_info::ALTER_ADD_PARTITION),
4194 m_no_write_to_binlog(no_write_to_binlog) {}
4195
4196 bool contextualize(Table_ddl_parse_context *pc) override;
4197
4199 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4200 }
4201
4202 protected:
4204
4205 private:
4207};
4208
4209/**
4210 Node for the @SQL{ALTER TABLE ADD PARTITION (@<partition list@>)} statement
4211
4212 @ingroup ptn_alter_table
4213*/
4217
4218 public:
4220 bool no_write_to_binlog,
4222 : super(no_write_to_binlog), m_def_list(def_list) {}
4223
4224 bool contextualize(Table_ddl_parse_context *pc) override;
4225
4226 private:
4228};
4229
4230/**
4231 Node for the @SQL{ALTER TABLE ADD PARTITION PARTITIONS (@<n>@)} statement
4232
4233 @ingroup ptn_alter_table
4234*/
4238
4239 public:
4240 PT_alter_table_add_partition_num(bool no_write_to_binlog, uint num_parts)
4241 : super(no_write_to_binlog) {
4242 m_part_info.num_parts = num_parts;
4243 }
4244};
4245
4249
4250 public:
4252 : super(Alter_info::ALTER_DROP_PARTITION), m_partitions(partitions) {}
4253
4254 bool contextualize(Table_ddl_parse_context *pc) override;
4255
4257 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4258 }
4259
4260 private:
4262};
4263
4267
4268 public:
4270 Alter_info::Alter_info_flag alter_info_flag,
4271 const List<String> *opt_partition_list)
4272 : super(alter_info_flag), m_opt_partition_list(opt_partition_list) {}
4273
4275 assert(pc->alter_info->partition_names.is_empty());
4276 if (m_opt_partition_list == nullptr)
4278 else
4280 return super::contextualize(pc);
4281 }
4282
4283 private:
4285};
4286
4290
4291 public:
4292 PT_alter_table_rebuild_partition(bool no_write_to_binlog,
4293 const List<String> *opt_partition_list)
4294 : super(Alter_info::ALTER_REBUILD_PARTITION, opt_partition_list),
4295 m_no_write_to_binlog(no_write_to_binlog) {}
4296
4297 bool contextualize(Table_ddl_parse_context *pc) override;
4298
4300 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4301 }
4302
4303 private:
4305};
4306
4310
4311 public:
4312 PT_alter_table_optimize_partition(bool no_write_to_binlog,
4313 const List<String> *opt_partition_list)
4314 : super(Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4315 m_no_write_to_binlog(no_write_to_binlog) {}
4316
4317 bool contextualize(Table_ddl_parse_context *pc) override;
4318
4320 return new (pc->mem_root)
4322 }
4323
4324 private:
4326};
4327
4331
4332 public:
4333 PT_alter_table_analyze_partition(bool no_write_to_binlog,
4334 const List<String> *opt_partition_list)
4335 : super(Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4336 m_no_write_to_binlog(no_write_to_binlog) {}
4337
4338 bool contextualize(Table_ddl_parse_context *pc) override;
4340 return new (pc->mem_root)
4342 }
4343
4344 private:
4346};
4347
4351
4352 public:
4354 uint flags, uint sql_flags)
4355 : super(Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4356 m_flags(flags),
4357 m_sql_flags(sql_flags) {}
4358
4359 bool contextualize(Table_ddl_parse_context *pc) override;
4360
4362 return new (pc->mem_root)
4364 }
4365
4366 private:
4369};
4370
4374
4375 public:
4376 PT_alter_table_repair_partition(bool no_write_to_binlog,
4377 const List<String> *opt_partition_list,
4378 uint flags, uint sql_flags)
4379 : super(Alter_info::ALTER_ADMIN_PARTITION, opt_partition_list),
4380 m_no_write_to_binlog(no_write_to_binlog),
4381 m_flags(flags),
4382 m_sql_flags(sql_flags) {}
4383
4384 bool contextualize(Table_ddl_parse_context *pc) override;
4385
4387 return new (pc->mem_root)
4389 }
4390
4391 private:
4395};
4396
4400
4401 public:
4402 PT_alter_table_coalesce_partition(bool no_write_to_binlog, uint num_parts)
4403 : super(Alter_info::ALTER_COALESCE_PARTITION),
4404 m_no_write_to_binlog(no_write_to_binlog),
4405 m_num_parts(num_parts) {}
4406
4407 bool contextualize(Table_ddl_parse_context *pc) override;
4408
4410 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4411 }
4412
4413 private:
4416};
4417
4421
4422 public:
4424 const List<String> *opt_partition_list)
4425 : super(static_cast<Alter_info::Alter_info_flag>(
4426 Alter_info::ALTER_ADMIN_PARTITION |
4427 Alter_info::ALTER_TRUNCATE_PARTITION),
4428 opt_partition_list) {}
4429
4430 bool contextualize(Table_ddl_parse_context *pc) override;
4431
4433 return new (pc->mem_root)
4435 }
4436};
4437
4441
4442 public:
4443 explicit PT_alter_table_reorganize_partition(bool no_write_to_binlog)
4444 : super(Alter_info::ALTER_TABLE_REORG),
4445 m_no_write_to_binlog(no_write_to_binlog) {}
4446
4447 bool contextualize(Table_ddl_parse_context *pc) override;
4448
4450 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4451 }
4452
4453 private:
4456};
4457
4461
4462 public:
4464 bool no_write_to_binlog, const List<String> &partition_names,
4466 : super(Alter_info::ALTER_REORGANIZE_PARTITION),
4467 m_no_write_to_binlog(no_write_to_binlog),
4468 m_partition_names(partition_names),
4469 m_into(into) {}
4470
4471 bool contextualize(Table_ddl_parse_context *pc) override;
4472
4474 return new (pc->mem_root) Sql_cmd_alter_table(pc->alter_info);
4475 }
4476
4477 private:
4482};
4483
4487
4488 public:
4492 : super(Alter_info::ALTER_EXCHANGE_PARTITION),
4493 m_partition_name(partition_name),
4495 m_validation(validation) {}
4496
4497 bool contextualize(Table_ddl_parse_context *pc) override;
4498
4500 return new (pc->mem_root)
4502 }
4503
4504 private:
4508};
4509
4513
4514 public:
4516 : super(Alter_info::ALTER_SECONDARY_LOAD) {}
4517
4520 }
4521};
4522
4526
4527 public:
4529 : super(Alter_info::ALTER_SECONDARY_UNLOAD) {}
4530
4533 }
4534};
4535
4539
4540 public:
4542 const List<String> *opt_partition_list)
4543 : super(Alter_info::ALTER_DISCARD_TABLESPACE, opt_partition_list) {}
4544
4547 }
4548};
4549
4553
4554 public:
4556 const List<String> *opt_partition_list)
4557 : super(Alter_info::ALTER_IMPORT_TABLESPACE, opt_partition_list) {}
4558
4561 }
4562};
4563
4567
4568 public:
4570 : super(Alter_info::ALTER_DISCARD_TABLESPACE) {}
4571
4574 }
4575};
4576
4580
4581 public:
4583 : super(Alter_info::ALTER_IMPORT_TABLESPACE) {}
4584
4587 }
4588};
4589
4591 public:
4600 m_opt_actions(opt_actions),
4601 m_algo(algo),
4602 m_lock(lock),
4603 m_validation(validation) {}
4604
4605 Sql_cmd *make_cmd(THD *thd) override;
4606
4607 private:
4613
4615};
4616
4618 public:
4628 m_algo(algo),
4629 m_lock(lock),
4630 m_validation(validation) {}
4631
4632 Sql_cmd *make_cmd(THD *thd) override;
4633
4634 private:
4640
4642};
4643
4645 public:
4646 PT_repair_table_stmt(MEM_ROOT *mem_root, bool no_write_to_binlog,
4648 decltype(HA_CHECK_OPT::flags) flags,
4649 decltype(HA_CHECK_OPT::sql_flags) sql_flags)
4651 m_no_write_to_binlog(no_write_to_binlog),
4652 m_table_list(table_list),
4653 m_flags(flags),
4654 m_sql_flags(sql_flags) {}
4655
4656 Sql_cmd *make_cmd(THD *thd) override;
4657
4658 private:
4663};
4664
4666 public:
4667 PT_analyze_table_stmt(MEM_ROOT *mem_root, bool no_write_to_binlog,
4670 int num_buckets, List<String> *columns, LEX_STRING data)
4672 m_no_write_to_binlog(no_write_to_binlog),
4673 m_table_list(table_list),
4675 m_num_buckets(num_buckets),
4676 m_columns(columns),
4677 m_data{data} {}
4678
4679 Sql_cmd *make_cmd(THD *thd) override;
4680
4681 private:
4685 const int m_num_buckets;
4688};
4689
4691 public:
4694 decltype(HA_CHECK_OPT::flags) flags,
4695 decltype(HA_CHECK_OPT::sql_flags) sql_flags)
4697 m_table_list(table_list),
4698 m_flags(flags),
4699 m_sql_flags(sql_flags) {}
4700
4701 Sql_cmd *make_cmd(THD *thd) override;
4702
4703 private:
4707};
4708
4710 public:
4711 PT_optimize_table_stmt(MEM_ROOT *mem_root, bool no_write_to_binlog,
4714 m_no_write_to_binlog(no_write_to_binlog),
4715 m_table_list(table_list) {}
4716
4717 Sql_cmd *make_cmd(THD *thd) override;
4718
4721};
4722
4724 public:
4725 PT_drop_index_stmt(MEM_ROOT *mem_root, const char *index_name,
4726 Table_ident *table,
4730 m_index_name(index_name),
4731 m_table(table),
4732 m_algo(algo),
4733 m_lock(lock),
4735
4736 Sql_cmd *make_cmd(THD *thd) override;
4737
4738 private:
4739 const char *m_index_name;
4743
4745};
4746
4748 public:
4749 explicit PT_truncate_table_stmt(Table_ident *table) : m_table(table) {}
4750
4751 Sql_cmd *make_cmd(THD *thd) override;
4752
4753 private:
4755
4757};
4758
4761
4762 public:
4764 : m_table(table), m_index_hints(index_hints) {}
4765
4766 bool contextualize(Table_ddl_parse_context *pc) override;
4767
4768 private:
4771};
4772
4773class PT_adm_partition final : public Table_ddl_node {
4775
4776 public:
4777 explicit PT_adm_partition(List<String> *opt_partitions)
4778 : m_opt_partitions(opt_partitions) {}
4779
4780 bool contextualize(Table_ddl_parse_context *pc) override;
4781
4782 private:
4784};
4785
4787 public:
4790 LEX_CSTRING key_cache_name)
4792 m_tbl_index_lists(tbl_index_lists),
4793 m_key_cache_name(key_cache_name) {}
4794
4795 Sql_cmd *make_cmd(THD *thd) override;
4796
4797 private:
4800};
4801
4803 public:
4805 PT_adm_partition *partitions,
4806 List<Index_hint> *opt_key_usage_list,
4807 LEX_CSTRING key_cache_name)
4809 m_table(table),
4810 m_partitions(partitions),
4811 m_opt_key_usage_list(opt_key_usage_list),
4812 m_key_cache_name(key_cache_name) {}
4813
4814 Sql_cmd *make_cmd(THD *thd) override;
4815
4816 private:
4821};
4822
4823class PT_preload_keys final : public Table_ddl_node {
4825
4826 public:
4827 PT_preload_keys(Table_ident *table, List<Index_hint> *opt_cache_key_list,
4828 bool ignore_leaves)
4829 : m_table(table),
4830 m_opt_cache_key_list(opt_cache_key_list),
4831 m_ignore_leaves(ignore_leaves) {}
4832
4833 bool contextualize(Table_ddl_parse_context *pc) override;
4834
4835 private:
4839};
4840
4842 public:
4844 PT_adm_partition *partitions,
4845 List<Index_hint> *opt_cache_key_list,
4846 bool ignore_leaves)
4848 m_table(table),
4849 m_partitions(partitions),
4850 m_opt_cache_key_list(opt_cache_key_list),
4851 m_ignore_leaves(ignore_leaves) {}
4852
4853 Sql_cmd *make_cmd(THD *thd) override;
4854
4855 private:
4860};
4861
4863 public:
4867
4868 Sql_cmd *make_cmd(THD *thd) override;
4869
4870 private:
4872};
4873
4876
4877 public:
4880 bool contextualize(Parse_context *pc) override;
4881 Json_table_column *get_column() override { return m_column.get(); }
4882
4883 private:
4885 const char *m_name;
4886};
4887
4890
4891 public:
4896
4897 bool contextualize(Parse_context *pc) override;
4898
4899 Json_table_column *get_column() override { return m_column.get(); }
4900
4901 private:
4903 const char *m_name;
4906};
4907
4909 : public PT_json_table_column {
4911
4912 public:
4915 : m_path(path), m_nested_columns(nested_cols) {}
4916
4917 bool contextualize(Parse_context *pc) override;
4918
4919 Json_table_column *get_column() override { return m_column; }
4920
4921 private:
4925};
4926
4928 THD *const thd;
4930
4932};
4933
4936
4937template <typename Option_type, Option_type Tablespace_options::*Option>
4939 : public PT_alter_tablespace_option_base /* purecov: inspected */
4940{
4942
4943 public:
4944 explicit PT_alter_tablespace_option(Option_type value) : m_value(value) {}
4945
4947 pc->*Option = m_value;
4948 return super::contextualize(pc);
4949 }
4950
4951 private:
4952 const Option_type m_value;
4953};
4954
4959
4963
4967
4971
4976
4981
4986
4990
4992 : public PT_alter_tablespace_option_base /* purecov: inspected */
4993{
4996
4997 public:
4999 : m_nodegroup_id(nodegroup_id) {}
5000
5002
5003 private:
5005};
5006
5008 : public PT_alter_tablespace_option_base /* purecov: inspected */
5009{
5012
5013 public:
5015 : m_comment(comment) {}
5016
5018 if (super::contextualize(pc)) return true; /* purecov: inspected */ // OOM
5019
5020 if (pc->ts_comment.str) {
5021 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "COMMENT");
5022 return true;
5023 }
5024 pc->ts_comment = m_comment;
5025 return false;
5026 }
5027
5028 private:
5030};
5031
5033 : public PT_alter_tablespace_option_base /* purecov: inspected */
5034{
5037
5038 public:
5040 : m_engine_name(engine_name) {}
5041
5043 if (super::contextualize(pc)) return true; /* purecov: inspected */ // OOM
5044
5045 if (pc->engine_name.str) {
5046 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "STORAGE ENGINE");
5047 return true;
5048 }
5050 return false;
5051 }
5052
5053 private:
5055};
5056
5058 : public PT_alter_tablespace_option_base /* purecov: inspected */
5059{
5062
5063 public:
5065 option_type file_block_size)
5066 : m_file_block_size(file_block_size) {}
5067
5069 if (super::contextualize(pc)) return true; /* purecov: inspected */ // OOM
5070
5071 if (pc->file_block_size != 0) {
5072 my_error(ER_FILEGROUP_OPTION_ONLY_ONCE, MYF(0), "FILE_BLOCK_SIZE");
5073 return true;
5074 }
5076 return false;
5077 }
5078
5079 private:
5081};
5082
5083/**
5084 Parse tree node for CREATE RESOURCE GROUP statement.
5085*/
5086
5089 const bool has_priority;
5090
5091 public:
5095 const Value_or_default<int> &opt_priority, bool enabled)
5096 : sql_cmd(name, type, cpu_list,
5097 opt_priority.is_default ? 0 : opt_priority.value, enabled),
5098 has_priority(!opt_priority.is_default) {}
5099
5100 Sql_cmd *make_cmd(THD *thd) override;
5101};
5102
5103/**
5104 Parse tree node for ALTER RESOURCE GROUP statement.
5105*/
5106
5109
5110 public:
5113 const Value_or_default<int> &opt_priority,
5114 const Value_or_default<bool> &enable, bool force)
5115 : sql_cmd(name, cpu_list,
5116 opt_priority.is_default ? 0 : opt_priority.value,
5117 enable.is_default ? false : enable.value, force,
5118 !enable.is_default) {}
5119
5120 Sql_cmd *make_cmd(THD *thd) override;
5121};
5122
5123/**
5124 Parse tree node for DROP RESOURCE GROUP statement.
5125*/
5126
5129
5130 public:
5131 PT_drop_resource_group(const LEX_CSTRING &resource_group_name, bool force)
5132 : sql_cmd(resource_group_name, force) {}
5133
5134 Sql_cmd *make_cmd(THD *thd) override;
5135};
5136
5137/**
5138 Parse tree node for SET RESOURCE GROUP statement.
5139*/
5140
5143
5144 public:
5146 Mem_root_array<ulonglong> *thread_id_list)
5147 : sql_cmd(name, thread_id_list) {}
5148
5149 Sql_cmd *make_cmd(THD *thd) override;
5150};
5151
5153 public:
5155 : m_cmd(thread_id) {}
5156
5157 Sql_cmd *make_cmd(THD *thd) override;
5158
5159 private:
5161};
5162
5163class PT_explain final : public Parse_tree_root {
5164 public:
5165 PT_explain(Explain_format_type format, bool is_analyze,
5166 bool is_explicit_format, Parse_tree_root *explainable_stmt)
5167 : m_format(format),
5168 m_analyze(is_analyze),
5169 m_explicit_format(is_explicit_format),
5170 m_explainable_stmt(explainable_stmt) {}
5171
5172 Sql_cmd *make_cmd(THD *thd) override;
5173
5174 private:
5176 const bool m_analyze;
5179};
5180
5181class PT_load_table final : public Parse_tree_root {
5182 public:
5184 bool is_local_file, enum_source_type, const LEX_STRING filename,
5185 ulong, bool, On_duplicate on_duplicate, Table_ident *table,
5186 List<String> *opt_partitions, const CHARSET_INFO *opt_charset,
5187 String *opt_xml_rows_identified_by,
5188 const Field_separators &opt_field_separators,
5189 const Line_separators &opt_line_separators,
5190 ulong opt_ignore_lines, PT_item_list *opt_fields_or_vars,
5191 PT_item_list *opt_set_fields, PT_item_list *opt_set_exprs,
5192 List<String> *opt_set_expr_strings, bool)
5193 : m_cmd(filetype, is_local_file, filename, on_duplicate, table,
5194 opt_partitions, opt_charset, opt_xml_rows_identified_by,
5195 opt_field_separators, opt_line_separators, opt_ignore_lines,
5196 opt_fields_or_vars ? &opt_fields_or_vars->value : nullptr,
5197 opt_set_fields ? &opt_set_fields->value : nullptr,
5198 opt_set_exprs ? &opt_set_exprs->value : nullptr,
5199 opt_set_expr_strings),
5200 m_lock_type(lock_type) {
5201 assert((opt_set_fields == nullptr) ^ (opt_set_exprs != nullptr));
5202 assert(opt_set_fields == nullptr ||
5203 opt_set_fields->value.size() == opt_set_exprs->value.size());
5204 }
5205
5206 Sql_cmd *make_cmd(THD *thd) override;
5207
5208 private:
5210
5212};
5213
5214/**
5215 Top-level node for the SHUTDOWN statement
5216
5217 @ingroup ptn_stmt
5218*/
5219
5221 public:
5222 Sql_cmd *make_cmd(THD *thd) override;
5223
5224 private:
5226};
5227
5229 private:
5232
5233 public:
5236 Sql_cmd *make_cmd(THD *thd) override;
5237};
5238
5240 LEX_CSTRING);
5241
5244 LEX_CSTRING);
5245
5248 LEX_CSTRING);
5249
5252 LEX_CSTRING);
5253
5254/**
5255 Helper function to imitate \c dynamic_cast for \c PT_set_operation hierarchy.
5256
5257 Template parameter @p To is the destination type (@c PT_union, \c PT_except or
5258 \c PT_intersect). For \c PT_intersect we return nullptr if ALL due to impl.
5259 restriction: we cannot merge INTERSECT ALL.
5260
5261 @param from source item
5262 @param is_distinct true if distinct
5263 @return typecast item to the type To or NULL
5264*/
5265template <class To, PT_set_operation::Setop_type Tag>
5266To *setop_cast(PT_query_expression_body *from, bool is_distinct) {
5267 return (from->type() == Tag &&
5268 down_cast<PT_set_operation *>(from)->is_distinct() == is_distinct &&
5269 (Tag != PT_query_expression_body::INTERSECT || is_distinct))
5270 ? static_cast<To *>(from)
5271 : nullptr;
5272}
5273
5274/**
5275 Flatten set operators at parse time
5276
5277 This function flattens UNION ALL/DISTINCT, EXCEPT All/DISTINCT
5278 and INTERSECT DISTINCT (not ALL due to implementation restrictions) operators
5279 at parse time if applicable, otherwise it creates
5280 new \c PT_<setop> nodes respectively of the two input operands.
5281
5282 Template parameter @p Class is @c PT_union or @c PT_intersect
5283 Template parameter @p Tag is @c PT_query_specification::UNION or
5284 @c ::INTERSECT
5285
5286 @param mem_root MEM_ROOT
5287 @param left left argument of the operator
5288 @param is_distinct true if DISTINCT
5289 @param right right argument of the operator
5290 @param is_right_in_parentheses
5291 true if right hand size is parenthesized
5292 @return resulting parse tree Item
5293*/
5294template <class Class, PT_set_operation::Setop_type Tag>
5297 bool is_distinct,
5299 bool is_right_in_parentheses) {
5300 if (left == nullptr || right == nullptr) return nullptr;
5301 Class *left_setop = setop_cast<Class, Tag>(left, is_distinct);
5302 Class *right_setop [[maybe_unused]] =
5303 setop_cast<Class, Tag>(right, is_distinct);
5304 assert(right_setop == nullptr); // doesn't happen
5305 if (left_setop != nullptr) {
5306 // X1 op X2 op Y ==> op (X1, X2, Y)
5307 left_setop->m_list.push_back(right);
5308 left_setop->set_is_rhs_in_parentheses(is_right_in_parentheses);
5309 return left_setop;
5310 } else {
5311 /* X op Y */
5312 return new (mem_root)
5313 Class(left, is_distinct, right, is_right_in_parentheses);
5314 }
5315}
5316
5317#endif /* PARSE_TREE_NODES_INCLUDED */
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:81
Class representing ALTER CHECK and ALTER CONSTRAINT clauses in ALTER TABLE statement.
Definition: sql_alter.h:183
Type
Definition: sql_alter.h:185
Class representing DROP COLUMN, DROP KEY, DROP FOREIGN KEY, DROP CHECK CONSTRAINT and DROP CONSTRAINT...
Definition: sql_alter.h:64
drop_type
Definition: sql_alter.h:66
An ALTER INDEX operation that changes the visibility of an index.
Definition: sql_alter.h:147
Data describing the table being created by CREATE TABLE or altered by ALTER TABLE.
Definition: sql_alter.h:204
enum_alter_table_algorithm
The different values of the ALGORITHM clause.
Definition: sql_alter.h:354
enum_alter_table_lock
The different values of the LOCK clause.
Definition: sql_alter.h:372
Mem_root_array< const Alter_drop * > drop_list
Columns, keys and constraints to be dropped.
Definition: sql_alter.h:404
Mem_root_array< const Alter_constraint_enforcement * > alter_constraint_enforcement_list
List of check constraints whose enforcement state is changed.
Definition: sql_alter.h:418
List< String > partition_names
Definition: sql_alter.h:432
enum_with_validation
Status of validation clause in ALTER TABLE statement.
Definition: sql_alter.h:390
@ ENABLE
Definition: sql_alter.h:348
@ DISABLE
Definition: sql_alter.h:348
Mem_root_array< const Alter_column * > alter_list
Definition: sql_alter.h:406
enum_enable_or_disable keys_onoff
Definition: sql_alter.h:430
ulonglong flags
Definition: sql_alter.h:428
Mem_root_array< const Alter_rename_key * > alter_rename_key_list
Definition: sql_alter.h:411
Alter_info_flag
Definition: sql_alter.h:215
@ ALTER_ADD_PARTITION
Set for ADD PARTITION.
Definition: sql_alter.h:254
@ ALTER_REORGANIZE_PARTITION
Set for REORGANIZE PARTITION ... INTO.
Definition: sql_alter.h:263
@ ALTER_ALL_PARTITION
Set for partitioning operations specifying ALL keyword.
Definition: sql_alter.h:279
@ ALTER_OPTIONS
Set for table_options.
Definition: sql_alter.h:240
Mem_root_array< const Alter_index_visibility * > alter_index_visibility_list
Indexes whose visibilities are to be changed.
Definition: sql_alter.h:414
Class which instances represent RENAME INDEX clauses in ALTER TABLE statement.
Definition: sql_alter.h:169
After parsing, a Common Table Expression is accessed through a Table_ref.
Definition: table.h:4333
Definition: key.h:43
Definition: item.h:6683
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
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:434
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
bool deferred_hints_flag
Definition: opt_hints.h:356
PT_hint_list * deferred_hints
Definition: opt_hints.h:355
Definition: parse_tree_nodes.h:4773
List< String > * m_opt_partitions
Definition: parse_tree_nodes.h:4783
PT_adm_partition(List< String > *opt_partitions)
Definition: parse_tree_nodes.h:4777
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3283
Table_ddl_node super
Definition: parse_tree_nodes.h:4774
Top-level node for the ALTER INSTANCE statement.
Definition: parse_tree_nodes.h:2040
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4321
PT_alter_instance(enum alter_instance_action_enum alter_instance_action, const LEX_CSTRING &channel)
Definition: parse_tree_nodes.h:2044
Sql_cmd_alter_instance sql_cmd
Definition: parse_tree_nodes.h:2041
Parse tree node for ALTER RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5107
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4600
resourcegroups::Sql_cmd_alter_resource_group sql_cmd
Definition: parse_tree_nodes.h:5108
PT_alter_resource_group(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:5111
Definition: parse_tree_nodes.h:3791
PT_alter_table_action(Alter_info::Alter_info_flag flag)
Definition: parse_tree_nodes.h:3795
PT_ddl_table_option super
Definition: parse_tree_nodes.h:3792
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4419
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:3809
const Alter_info::Alter_info_flag flag
Definition: parse_tree_nodes.h:3815
Definition: parse_tree_nodes.h:3818
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:3830
PT_alter_table_action super
Definition: parse_tree_nodes.h:3819
PT_alter_table_add_column(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:3822
PT_column_def m_column_def
Definition: parse_tree_nodes.h:3835
Definition: parse_tree_nodes.h:3838
const Mem_root_array< PT_table_element * > * m_columns
Definition: parse_tree_nodes.h:3856
PT_alter_table_add_columns(const Mem_root_array< PT_table_element * > *columns)
Definition: parse_tree_nodes.h:3842
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:3846
PT_alter_table_action super
Definition: parse_tree_nodes.h:3839
Definition: parse_tree_nodes.h:3859
PT_alter_table_action super
Definition: parse_tree_nodes.h:3860
PT_alter_table_add_constraint(PT_table_constraint_def *constraint)
Definition: parse_tree_nodes.h:3863
PT_table_constraint_def * m_constraint
Definition: parse_tree_nodes.h:3871
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:3866
Node for the ALTER TABLE ADD PARTITION (<partition list>) statement.
Definition: parse_tree_nodes.h:4215
PT_alter_table_add_partition super
Definition: parse_tree_nodes.h:4216
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3023
const Mem_root_array< PT_part_definition * > * m_def_list
Definition: parse_tree_nodes.h:4227
PT_alter_table_add_partition_def_list(bool no_write_to_binlog, const Mem_root_array< PT_part_definition * > *def_list)
Definition: parse_tree_nodes.h:4219
Node for the ALTER TABLE ADD PARTITION PARTITIONS (<n>@) statement.
Definition: parse_tree_nodes.h:4236
PT_alter_table_add_partition_num(bool no_write_to_binlog, uint num_parts)
Definition: parse_tree_nodes.h:4240
PT_alter_table_add_partition super
Definition: parse_tree_nodes.h:4237
Node for the ALTER TABLE ADD PARTITION statement.
Definition: parse_tree_nodes.h:4188
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4206
partition_info m_part_info
Definition: parse_tree_nodes.h:4203
PT_alter_table_add_partition(bool no_write_to_binlog)
Definition: parse_tree_nodes.h:4192
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) final
Definition: parse_tree_nodes.h:4198
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4471
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4189
Definition: parse_tree_nodes.h:4329
PT_alter_table_analyze_partition(bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4333
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4330
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4339
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4503
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4345
Definition: parse_tree_nodes.h:3874
const LEX_STRING m_old_name
Definition: parse_tree_nodes.h:3896
const LEX_STRING m_new_name
Definition: parse_tree_nodes.h:3897
const char * m_opt_place
Definition: parse_tree_nodes.h:3899
PT_field_def_base * m_field_def
Definition: parse_tree_nodes.h:3898
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2937
PT_alter_table_change_column(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:3878
PT_alter_table_change_column(const LEX_STRING &name, PT_field_def_base *field_def, const char *opt_place)
Definition: parse_tree_nodes.h:3888
PT_alter_table_action super
Definition: parse_tree_nodes.h:3875
Definition: parse_tree_nodes.h:4349
uint m_sql_flags
Definition: parse_tree_nodes.h:4368
PT_alter_table_check_partition(const List< String > *opt_partition_list, uint flags, uint sql_flags)
Definition: parse_tree_nodes.h:4353
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4361
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4350
uint m_flags
Definition: parse_tree_nodes.h:4367
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4510
Definition: parse_tree_nodes.h:4398
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4414
PT_alter_table_coalesce_partition(bool no_write_to_binlog, uint num_parts)
Definition: parse_tree_nodes.h:4402
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4533
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4399
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4409
const uint m_num_parts
Definition: parse_tree_nodes.h:4415
Definition: parse_tree_nodes.h:4030
Alter_column m_alter_column
Definition: parse_tree_nodes.h:4044
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4038
PT_alter_table_column_visibility(const char *col_name, bool is_visible)
Definition: parse_tree_nodes.h:4034
PT_alter_table_action super
Definition: parse_tree_nodes.h:4031
Definition: parse_tree_nodes.h:4112
PT_alter_table_action super
Definition: parse_tree_nodes.h:4113
const CHARSET_INFO *const m_charset
Definition: parse_tree_nodes.h:4125
const CHARSET_INFO *const m_collation
Definition: parse_tree_nodes.h:4126
PT_alter_table_convert_to_charset(const CHARSET_INFO *charset, const CHARSET_INFO *opt_collation)
Definition: parse_tree_nodes.h:4116
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2991
Definition: parse_tree_nodes.h:4537
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4545
PT_alter_table_discard_partition_tablespace(const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4541
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4538
Definition: parse_tree_nodes.h:4565
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4572
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4566
PT_alter_table_discard_tablespace()
Definition: parse_tree_nodes.h:4569
Definition: parse_tree_nodes.h:3942
PT_alter_table_drop_check_constraint(const char *name)
Definition: parse_tree_nodes.h:3944
Definition: parse_tree_nodes.h:3921
PT_alter_table_drop_column(const char *name)
Definition: parse_tree_nodes.h:3923
Definition: parse_tree_nodes.h:3949
PT_alter_table_drop_constraint(const char *name)
Definition: parse_tree_nodes.h:3951
Definition: parse_tree_nodes.h:3928
PT_alter_table_drop_foreign_key(const char *name)
Definition: parse_tree_nodes.h:3930
Definition: parse_tree_nodes.h:3935
PT_alter_table_drop_key(const char *name)
Definition: parse_tree_nodes.h:3937
Definition: parse_tree_nodes.h:4247
const List< String > m_partitions
Definition: parse_tree_nodes.h:4261
PT_alter_table_drop_partition(const List< String > &partitions)
Definition: parse_tree_nodes.h:4251
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4248
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) final
Definition: parse_tree_nodes.h:4256
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4481
Definition: parse_tree_nodes.h:3902
PT_alter_table_action super
Definition: parse_tree_nodes.h:3903
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:3912
PT_alter_table_drop(Alter_drop::drop_type drop_type, Alter_info::Alter_info_flag alter_info_flag, const char *name)
Definition: parse_tree_nodes.h:3906
Alter_drop m_alter_drop
Definition: parse_tree_nodes.h:3918
Definition: parse_tree_nodes.h:3997
PT_alter_table_enable_keys(bool enable)
Definition: parse_tree_nodes.h:4001
PT_alter_table_action super
Definition: parse_tree_nodes.h:3998
bool m_enable
Definition: parse_tree_nodes.h:4011
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4004
Definition: parse_tree_nodes.h:3986
PT_alter_table_enforce_check_constraint(const char *name, bool is_enforced)
Definition: parse_tree_nodes.h:3988
Definition: parse_tree_nodes.h:3956
PT_alter_table_action super
Definition: parse_tree_nodes.h:3957
Alter_constraint_enforcement m_constraint_enforcement
Definition: parse_tree_nodes.h:3982
PT_alter_table_enforce_constraint(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:3960
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:3975
PT_alter_table_enforce_constraint(const char *name, bool is_enforced)
Definition: parse_tree_nodes.h:3968
Definition: parse_tree_nodes.h:4485
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3058
Table_ident * m_table_name
Definition: parse_tree_nodes.h:4506
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:4507
PT_alter_table_exchange_partition(const LEX_STRING &partition_name, Table_ident *table_name, Alter_info::enum_with_validation validation)
Definition: parse_tree_nodes.h:4489
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4499
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4486
const LEX_STRING m_partition_name
Definition: parse_tree_nodes.h:4505
Definition: parse_tree_nodes.h:4129
PT_alter_table_action super
Definition: parse_tree_nodes.h:4130
PT_alter_table_force()
Definition: parse_tree_nodes.h:4133
Definition: parse_tree_nodes.h:4551
PT_alter_table_import_partition_tablespace(const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4555
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4559
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4552
Definition: parse_tree_nodes.h:4578
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4579
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4585
PT_alter_table_import_tablespace()
Definition: parse_tree_nodes.h:4582
Definition: parse_tree_nodes.h:4047
PT_alter_table_action super
Definition: parse_tree_nodes.h:4048
PT_alter_table_index_visible(const char *name, bool visible)
Definition: parse_tree_nodes.h:4051
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4055
Alter_index_visibility m_alter_index_visibility
Definition: parse_tree_nodes.h:4062
Definition: parse_tree_nodes.h:4308
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4319
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4309
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4325
PT_alter_table_optimize_partition(bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4312
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4496
Definition: parse_tree_nodes.h:4136
PT_alter_table_order(PT_order_list *order)
Definition: parse_tree_nodes.h:4140
PT_alter_table_action super
Definition: parse_tree_nodes.h:4137
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4459
PT_order_list *const m_order
Definition: parse_tree_nodes.h:4146
Definition: parse_tree_nodes.h:4149
PT_alter_table_action super
Definition: parse_tree_nodes.h:4150
PT_alter_table_partition_by(PT_partition *partition)
Definition: parse_tree_nodes.h:4153
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4465
PT_partition *const m_partition
Definition: parse_tree_nodes.h:4159
Definition: parse_tree_nodes.h:4265
PT_alter_table_partition_list_or_all(Alter_info::Alter_info_flag alter_info_flag, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4269
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4274
const List< String > * m_opt_partition_list
Definition: parse_tree_nodes.h:4284
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4266
Definition: parse_tree_nodes.h:4288
PT_alter_table_rebuild_partition(bool no_write_to_binlog, const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4292
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4299
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4489
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4289
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4304
Definition: parse_tree_nodes.h:4162
PT_alter_table_action super
Definition: parse_tree_nodes.h:4163
PT_alter_table_remove_partitioning()
Definition: parse_tree_nodes.h:4166
Definition: parse_tree_nodes.h:4096
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4103
PT_alter_table_action super
Definition: parse_tree_nodes.h:4097
PT_alter_table_rename_column(const char *from, const char *to)
Definition: parse_tree_nodes.h:4100
Alter_column m_rename_column
Definition: parse_tree_nodes.h:4109
Definition: parse_tree_nodes.h:4080
PT_alter_table_rename_key(const char *from, const char *to)
Definition: parse_tree_nodes.h:4084
Alter_rename_key m_rename_key
Definition: parse_tree_nodes.h:4093
PT_alter_table_action super
Definition: parse_tree_nodes.h:4081
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4087
Definition: parse_tree_nodes.h:4065
const Table_ident *const m_ident
Definition: parse_tree_nodes.h:4077
PT_alter_table_rename(const Table_ident *ident)
Definition: parse_tree_nodes.h:4069
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2965
bool is_rename_table() const override
Definition: parse_tree_nodes.h:4074
PT_alter_table_action super
Definition: parse_tree_nodes.h:4066
Definition: parse_tree_nodes.h:4459
const Mem_root_array< PT_part_definition * > * m_into
Definition: parse_tree_nodes.h:4480
partition_info m_partition_info
Definition: parse_tree_nodes.h:4481
const List< String > m_partition_names
Definition: parse_tree_nodes.h:4479
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3037
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4460
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4478
PT_alter_table_reorganize_partition_into(bool no_write_to_binlog, const List< String > &partition_names, const Mem_root_array< PT_part_definition * > *into)
Definition: parse_tree_nodes.h:4463
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4473
Definition: parse_tree_nodes.h:4439
partition_info m_partition_info
Definition: parse_tree_nodes.h:4455
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4449
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4454
PT_alter_table_reorganize_partition(bool no_write_to_binlog)
Definition: parse_tree_nodes.h:4443
PT_alter_table_standalone_action super
Definition: parse_tree_nodes.h:4440
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4548
Definition: parse_tree_nodes.h:4372
uint m_flags
Definition: parse_tree_nodes.h:4393
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4373
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4392
uint m_sql_flags
Definition: parse_tree_nodes.h:4394
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4520
PT_alter_table_repair_partition(bool no_write_to_binlog, const List< String > *opt_partition_list, uint flags, uint sql_flags)
Definition: parse_tree_nodes.h:4376
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4386
Definition: parse_tree_nodes.h:4511
PT_alter_table_secondary_load()
Definition: parse_tree_nodes.h:4515
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4518
Definition: parse_tree_nodes.h:4524
PT_alter_table_secondary_unload()
Definition: parse_tree_nodes.h:4528
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4531
Definition: parse_tree_nodes.h:4014
PT_alter_table_set_default(const char *col_name, Item *opt_default_expr)
Definition: parse_tree_nodes.h:4018
Item * m_expr
Definition: parse_tree_nodes.h:4027
const char * m_name
Definition: parse_tree_nodes.h:4026
PT_alter_table_action super
Definition: parse_tree_nodes.h:4015
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4425
Definition: parse_tree_nodes.h:4170
PT_alter_table_action super
Definition: parse_tree_nodes.h:4171
PT_alter_table_standalone_action(Alter_info::Alter_info_flag alter_info_flag)
Definition: parse_tree_nodes.h:4176
virtual Sql_cmd * make_cmd(Table_ddl_parse_context *pc)=0
Definition: parse_tree_nodes.h:4617
PT_alter_table_standalone_stmt(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:4619
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3153
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:4637
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:4638
Table_ident *const m_table_name
Definition: parse_tree_nodes.h:4635
PT_alter_table_standalone_action *const m_action
Definition: parse_tree_nodes.h:4636
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:4639
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:4641
Definition: parse_tree_nodes.h:4590
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:4611
PT_alter_table_stmt(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:4592
const Alter_info::enum_with_validation m_validation
Definition: parse_tree_nodes.h:4612
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3115
Mem_root_array< PT_ddl_table_option * > *const m_opt_actions
Definition: parse_tree_nodes.h:4609
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:4614
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:4610
Table_ident *const m_table_name
Definition: parse_tree_nodes.h:4608
Definition: parse_tree_nodes.h:4419
PT_alter_table_partition_list_or_all super
Definition: parse_tree_nodes.h:4420
Sql_cmd * make_cmd(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:4432
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4542
PT_alter_table_truncate_partition(const List< String > *opt_partition_list)
Definition: parse_tree_nodes.h:4423
Definition: parse_tree_nodes.h:5009
PT_alter_tablespace_option_comment(option_type comment)
Definition: parse_tree_nodes.h:5014
const option_type m_comment
Definition: parse_tree_nodes.h:5029
bool contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5017
decltype(Tablespace_options::ts_comment) option_type
Definition: parse_tree_nodes.h:5011
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5010
Definition: parse_tree_nodes.h:5034
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5035
PT_alter_tablespace_option_engine(option_type engine_name)
Definition: parse_tree_nodes.h:5039
bool contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5042
decltype(Tablespace_options::engine_name) option_type
Definition: parse_tree_nodes.h:5036
const option_type m_engine_name
Definition: parse_tree_nodes.h:5054
Definition: parse_tree_nodes.h:5059
const option_type m_file_block_size
Definition: parse_tree_nodes.h:5080
decltype(Tablespace_options::file_block_size) option_type
Definition: parse_tree_nodes.h:5061
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:5060
PT_alter_tablespace_option_file_block_size(option_type file_block_size)
Definition: parse_tree_nodes.h:5064
bool contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:5068
Definition: parse_tree_nodes.h:4993
const option_type m_nodegroup_id
Definition: parse_tree_nodes.h:5004
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:4994
decltype(Tablespace_options::nodegroup_id) option_type
Definition: parse_tree_nodes.h:4995
PT_alter_tablespace_option_nodegroup(option_type nodegroup_id)
Definition: parse_tree_nodes.h:4998
bool contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.cc:4569
Definition: parse_tree_nodes.h:4940
const Option_type m_value
Definition: parse_tree_nodes.h:4952
bool contextualize(Alter_tablespace_parse_context *pc) override
Definition: parse_tree_nodes.h:4946
PT_alter_tablespace_option(Option_type value)
Definition: parse_tree_nodes.h:4944
PT_alter_tablespace_option_base super
Definition: parse_tree_nodes.h:4941
Definition: parse_tree_nodes.h:3031
Sql_cmd_alter_user_default_role sql_cmd
Definition: parse_tree_nodes.h:3032
PT_alter_user_default_role(bool if_exists, const List< LEX_USER > *users, const List< LEX_USER > *roles, const role_enum role_type)
Definition: parse_tree_nodes.h:3035
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4409
Definition: parse_tree_nodes.h:4665
const Sql_cmd_analyze_table::Histogram_command m_command
Definition: parse_tree_nodes.h:4684
const int m_num_buckets
Definition: parse_tree_nodes.h:4685
const LEX_STRING m_data
Definition: parse_tree_nodes.h:4687
const Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:4683
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3186
List< String > * m_columns
Definition: parse_tree_nodes.h:4686
const bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4682
PT_analyze_table_stmt(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)
Definition: parse_tree_nodes.h:4667
Definition: parse_tree_nodes.h:4759
List< Index_hint > * m_index_hints
Definition: parse_tree_nodes.h:4770
PT_assign_to_keycache(Table_ident *table, List< Index_hint > *index_hints)
Definition: parse_tree_nodes.h:4763
Table_ddl_node super
Definition: parse_tree_nodes.h:4760
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:3274
Table_ident * m_table
Definition: parse_tree_nodes.h:4769
A template-free base class for index options that we can predeclare in sql_lex.h.
Definition: parse_tree_nodes.h:2056
A template for options that set HA_CREATE_INFO::table_options and also records if the option was expl...
Definition: parse_tree_nodes.h:2577
PT_create_table_option super
Definition: parse_tree_nodes.h:2578
PT_bool_create_table_option(bool value)
Definition: parse_tree_nodes.h:2583
const bool value
Definition: parse_tree_nodes.h:2580
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2585
Parse tree node for a single of a window extent's borders, cf.
Definition: parse_tree_nodes.h:1246
PT_border(enum_window_border_type type, Item *value)
For bounded INTERVAL 2 DAYS, 'value' is 2, int_type is DAYS.
Definition: parse_tree_nodes.h:1261
Item * build_addop(Item_cache *order_expr, bool prec, bool asc, const Window *window)
Definition: parse_tree_nodes.cc:3359
Item * m_value
only relevant iff m_border_type == WBT_VALUE_*
Definition: parse_tree_nodes.h:1248
Item ** border_ptr()
Need such low-level access so that fix_fields updates the right pointer.
Definition: parse_tree_nodes.h:1274
interval_type m_int_type
For unbounded border.
Definition: parse_tree_nodes.h:1252
PT_border(enum_window_border_type type, Item *value, interval_type int_type)
Definition: parse_tree_nodes.h:1265
enum_window_border_type m_border_type
Definition: parse_tree_nodes.h:1250
PT_border(enum_window_border_type type)
For bounded non-temporal border, e.g. 2 PRECEDING: 'value' is 2.
Definition: parse_tree_nodes.h:1255
const bool m_date_time
Definition: parse_tree_nodes.h:1251
Item * border() const
Definition: parse_tree_nodes.h:1272
Parse tree node for one or both of a window extent's borders, cf.
Definition: parse_tree_nodes.h:1291
PT_border * m_borders[2]
Definition: parse_tree_nodes.h:1292
PT_borders(PT_border *start, PT_border *end)
Constructor.
Definition: parse_tree_nodes.h:1303
Definition: parse_tree_nodes.h:4802
PT_cache_index_partitions_stmt(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:4804
List< Index_hint > * m_opt_key_usage_list
Definition: parse_tree_nodes.h:4819
Table_ident * m_table
Definition: parse_tree_nodes.h:4817
PT_adm_partition * m_partitions
Definition: parse_tree_nodes.h:4818
const LEX_CSTRING m_key_cache_name
Definition: parse_tree_nodes.h:4820
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3308
Definition: parse_tree_nodes.h:4786
const LEX_CSTRING m_key_cache_name
Definition: parse_tree_nodes.h:4799
Mem_root_array< PT_assign_to_keycache * > * m_tbl_index_lists
Definition: parse_tree_nodes.h:4798
PT_cache_index_stmt(MEM_ROOT *mem_root, Mem_root_array< PT_assign_to_keycache * > *tbl_index_lists, LEX_CSTRING key_cache_name)
Definition: parse_tree_nodes.h:4788
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3294
Definition: parse_tree_nodes.h:1941
PT_item_list * opt_expr_list
Definition: parse_tree_nodes.h:1943
sp_name * proc_name
Definition: parse_tree_nodes.h:1942
PT_call(sp_name *proc_name_arg, PT_item_list *opt_expr_list_arg)
Definition: parse_tree_nodes.h:1946
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1145
Definition: parse_tree_nodes.h:2773
void set_column_name(const LEX_STRING &name)
Definition: parse_tree_nodes.h:2783
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2774
Sql_check_constraint_spec cc_spec
Definition: parse_tree_nodes.h:2775
PT_check_constraint(LEX_STRING &name, Item *expr, bool is_enforced)
Definition: parse_tree_nodes.h:2778
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4326
Definition: parse_tree_nodes.h:4690
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:4704
decltype(HA_CHECK_OPT::flags) m_flags
Definition: parse_tree_nodes.h:4705
PT_check_table_stmt(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:4692
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3207
decltype(HA_CHECK_OPT::sql_flags) m_sql_flags
Definition: parse_tree_nodes.h:4706
Base class for all column attributes in CREATE/ALTER TABLE
Definition: parse_tree_column_attrs.h:85
Definition: parse_tree_nodes.h:2788
PT_table_element super
Definition: parse_tree_nodes.h:2789
PT_column_def(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:2799
const LEX_STRING field_ident
Definition: parse_tree_nodes.h:2791
PT_field_def_base * field_def
Definition: parse_tree_nodes.h:2792
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2181
const char * opt_place
Definition: parse_tree_nodes.h:2796
PT_table_constraint_def * opt_column_constraint
Definition: parse_tree_nodes.h:2794
Represents an element of the WITH list: WITH [...], [...] SELECT ..., ^ or ^ i.e.
Definition: parse_tree_nodes.h:252
const LEX_STRING m_subq_text
Raw text of query expression (including parentheses)
Definition: parse_tree_nodes.h:288
PT_common_table_expr(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:1940
const Create_col_name_list m_column_names
List of explicitly specified column names; if empty, no list.
Definition: parse_tree_nodes.h:297
Parse_tree_node super
Definition: parse_tree_nodes.h:253
bool is(const Common_table_expr *other) const
Definition: parse_tree_nodes.h:280
PT_subquery *const m_subq_node
Parsed version of subq_text.
Definition: parse_tree_nodes.h:295
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:293
void print(const THD *thd, String *str, enum_query_type query_type)
Definition: parse_tree_nodes.cc:1983
const LEX_STRING & name() const
The name after AS.
Definition: parse_tree_nodes.h:263
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:307
LEX_STRING m_name
Definition: parse_tree_nodes.h:286
Definition: parse_tree_nodes.h:2234
PT_create_index_stmt(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:2236
keytype m_keytype
Definition: parse_tree_nodes.h:2256
Index_options m_options
Definition: parse_tree_nodes.h:2261
Table_ident * m_table_ident
Definition: parse_tree_nodes.h:2259
LEX_STRING m_name
Definition: parse_tree_nodes.h:2257
const Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:2262
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2260
const Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:2263
PT_base_index_option * m_type
Definition: parse_tree_nodes.h:2258
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:1775
Parse tree node for CREATE RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5087
resourcegroups::Sql_cmd_create_resource_group sql_cmd
Definition: parse_tree_nodes.h:5088
const bool has_priority
Definition: parse_tree_nodes.h:5089
PT_create_resource_group(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:5092
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4581
Definition: parse_tree_nodes.h:2887
PT_create_role(bool if_not_exists, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:2891
Sql_cmd_create_role sql_cmd
Definition: parse_tree_nodes.h:2888
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4338
Top-level node for the CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM statement.
Definition: parse_tree_nodes.h:1969
bool contains_control_char(char *str, size_t length)
Check if a UTF-8 string contains control characters.
Definition: parse_tree_nodes.h:1995
const Sql_cmd_srs_attributes m_attributes
All attributes except SRID.
Definition: parse_tree_nodes.h:1982
unsigned long long m_srid
SRID of the SRS to create.
Definition: parse_tree_nodes.h:1980
bool m_or_replace
Whether OR REPLACE is specified.
Definition: parse_tree_nodes.h:1973
PT_create_srs(unsigned long long srid, const Sql_cmd_srs_attributes &attributes, bool or_replace, bool if_not_exists)
Definition: parse_tree_nodes.h:2003
Sql_cmd_create_srs sql_cmd
The SQL command object.
Definition: parse_tree_nodes.h:1971
bool m_if_not_exists
Whether IF NOT EXISTS is specified.
Definition: parse_tree_nodes.h:1975
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4169
Node for the STATS_AUTO_RECALC [=] <0|1|DEFAULT>) table option.
Definition: parse_tree_nodes.h:2671
const Ternary_option value
Definition: parse_tree_nodes.h:2674
PT_create_table_option super
Definition: parse_tree_nodes.h:2672
PT_create_stats_auto_recalc_option(Ternary_option value)
Definition: parse_tree_nodes.h:2685
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2039
Node for the STATS_SAMPLE_PAGES [=] <integer>|DEFAULT table option.
Definition: parse_tree_nodes.h:2695
PT_create_stats_stable_pages(value_t value)
Constructor for implicit number of pages.
Definition: parse_tree_nodes.h:2707
const value_t value
Definition: parse_tree_nodes.h:2699
PT_create_table_option super
Definition: parse_tree_nodes.h:2696
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2060
decltype(HA_CREATE_INFO::stats_sample_pages) value_t
Definition: parse_tree_nodes.h:2697
PT_create_stats_stable_pages()
Constructor for the DEFAULT number of pages.
Definition: parse_tree_nodes.h:2713
Definition: parse_tree_nodes.h:2730
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2738
PT_create_storage_option(ha_storage_media value)
Definition: parse_tree_nodes.h:2736
const ha_storage_media value
Definition: parse_tree_nodes.h:2733
PT_create_table_option super
Definition: parse_tree_nodes.h:2731
Definition: parse_tree_nodes.h:2745
PT_create_table_default_charset(const CHARSET_INFO *value)
Definition: parse_tree_nodes.h:2751
const CHARSET_INFO * value
Definition: parse_tree_nodes.h:2748
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2118
PT_create_table_option super
Definition: parse_tree_nodes.h:2746
Definition: parse_tree_nodes.h:2759
const CHARSET_INFO * value
Definition: parse_tree_nodes.h:2762
PT_create_table_option super
Definition: parse_tree_nodes.h:2760
PT_create_table_default_collation(const CHARSET_INFO *value)
Definition: parse_tree_nodes.h:2765
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2139
Node for the ENGINE [=] <identifier>|<string> table option.
Definition: parse_tree_nodes.h:2630
const LEX_CSTRING engine
Definition: parse_tree_nodes.h:2633
PT_create_table_engine_option(const LEX_CSTRING &engine)
Definition: parse_tree_nodes.h:2639
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2021
PT_create_table_option super
Definition: parse_tree_nodes.h:2631
Base class for CREATE TABLE option nodes.
Definition: parse_tree_nodes.h:2351
PT_ddl_table_option super
Definition: parse_tree_nodes.h:2352
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2357
~PT_create_table_option() override=0
Node for the SECONDARY_ENGINE [=] <identifier>|<string>|NULL table option.
Definition: parse_tree_nodes.h:2651
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2030
const LEX_CSTRING m_secondary_engine
Definition: parse_tree_nodes.h:2663
PT_create_table_secondary_engine_option(const LEX_CSTRING &secondary_engine)
Definition: parse_tree_nodes.h:2656
Top-level node for the CREATE TABLE statement.
Definition: parse_tree_nodes.h:2815
On_duplicate on_duplicate
Definition: parse_tree_nodes.h:2822
PT_partition * opt_partitioning
Definition: parse_tree_nodes.h:2821
const Mem_root_array< PT_table_element * > * opt_table_element_list
Definition: parse_tree_nodes.h:2819
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2211
bool is_temporary
Definition: parse_tree_nodes.h:2816
PT_create_table_stmt(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:2846
const Mem_root_array< PT_create_table_option * > * opt_create_table_options
Definition: parse_tree_nodes.h:2820
PT_query_expression_body * opt_query_expression
Definition: parse_tree_nodes.h:2823
bool only_if_not_exists
Definition: parse_tree_nodes.h:2817
Table_ident * table_name
Definition: parse_tree_nodes.h:2818
Table_ident * opt_like_clause
Definition: parse_tree_nodes.h:2824
HA_CREATE_INFO m_create_info
Definition: parse_tree_nodes.h:2826
PT_create_table_stmt(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:2870
Definition: parse_tree_nodes.h:2718
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:2068
const Mem_root_array< Table_ident * > * tables
Definition: parse_tree_nodes.h:2721
PT_create_table_option super
Definition: parse_tree_nodes.h:2719
PT_create_union_option(const Mem_root_array< Table_ident * > *tables)
Definition: parse_tree_nodes.h:2724
Definition: parse_tree_nodes.h:572
PT_cross_join(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:576
PT_joined_table super
Definition: parse_tree_nodes.h:573
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3681
Common base class for CREATE TABLE and ALTER TABLE option nodes.
Definition: parse_tree_nodes.h:2337
~PT_ddl_table_option() override=0
virtual bool is_rename_table() const
Definition: parse_tree_nodes.h:2341
Top-level node for the DELETE statement.
Definition: parse_tree_nodes.h:1755
bool add_table(Parse_context *pc, Table_ident *table)
Definition: parse_tree_nodes.cc:836
bool is_multitable() const
Definition: parse_tree_nodes.h:1811
Item * opt_where_clause
Definition: parse_tree_nodes.h:1765
PT_delete(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:1791
Mem_root_array_YY< Table_ident * > table_list
Definition: parse_tree_nodes.h:1762
SQL_I_List< Table_ref > delete_tables
Definition: parse_tree_nodes.h:1768
Item * opt_delete_limit_clause
Definition: parse_tree_nodes.h:1767
Mem_root_array_YY< PT_table_reference * > join_table_list
Definition: parse_tree_nodes.h:1764
Table_ident * table_ident
Definition: parse_tree_nodes.h:1760
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:1757
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:851
const int opt_delete_options
Definition: parse_tree_nodes.h:1759
PT_delete(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:1772
PT_order * opt_order_clause
Definition: parse_tree_nodes.h:1766
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1758
const char *const opt_table_alias
Definition: parse_tree_nodes.h:1761
List< String > * opt_use_partition
Definition: parse_tree_nodes.h:1763
Definition: parse_tree_nodes.h:485
PT_derived_table(bool lateral, PT_subquery *subquery, const LEX_CSTRING &table_alias, Create_col_name_list *column_names)
Definition: parse_tree_nodes.cc:1313
PT_subquery * m_subquery
Definition: parse_tree_nodes.h:497
const char *const m_table_alias
Definition: parse_tree_nodes.h:498
PT_table_reference super
Definition: parse_tree_nodes.h:486
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1323
bool m_lateral
Definition: parse_tree_nodes.h:496
const Create_col_name_list column_names
List of explicitly specified column names; if empty, no list.
Definition: parse_tree_nodes.h:500
Definition: parse_tree_nodes.h:4723
Alter_drop m_alter_drop
Definition: parse_tree_nodes.h:4744
Alter_info::enum_alter_table_algorithm m_algo
Definition: parse_tree_nodes.h:4741
const char * m_index_name
Definition: parse_tree_nodes.h:4739
Alter_info::enum_alter_table_lock m_lock
Definition: parse_tree_nodes.h:4742
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3243
PT_drop_index_stmt(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:4725
Table_ident * m_table
Definition: parse_tree_nodes.h:4740
Parse tree node for DROP RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5127
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4614
resourcegroups::Sql_cmd_drop_resource_group sql_cmd
Definition: parse_tree_nodes.h:5128
PT_drop_resource_group(const LEX_CSTRING &resource_group_name, bool force)
Definition: parse_tree_nodes.h:5131
Definition: parse_tree_nodes.h:2897
Sql_cmd_drop_role sql_cmd
Definition: parse_tree_nodes.h:2898
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4343
PT_drop_role(bool ignore_errors, const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:2901
Top-level node for the DROP SPATIAL REFERENCE SYSTEM statement.
Definition: parse_tree_nodes.h:2019
Sql_cmd_drop_srs sql_cmd
The SQL command object.
Definition: parse_tree_nodes.h:2021
PT_drop_srs(unsigned long long srid, bool if_exists)
Definition: parse_tree_nodes.h:2029
unsigned long long m_srid
SRID of the SRS to drop.
Definition: parse_tree_nodes.h:2026
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4305
Definition: parse_tree_nodes.h:2996
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:4379
LEX_STRING ident
Definition: parse_tree_nodes.h:2997
PT_dynamic_privilege(const POS &pos, const LEX_STRING &ident)
Definition: parse_tree_nodes.h:3000
Definition: parse_tree_nodes.h:1692
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1715
PT_set_operation(PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1641
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1698
Parse tree node for a window frame's exclusions, cf.
Definition: parse_tree_nodes.h:1313
enum_window_frame_exclusion m_exclusion
Definition: parse_tree_nodes.h:1314
PT_exclusion(enum_window_frame_exclusion e)
Definition: parse_tree_nodes.h:1317
Definition: parse_tree_nodes.h:5152
PT_explain_for_connection(my_thread_id thread_id)
Definition: parse_tree_nodes.h:5154
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3497
Sql_cmd_explain_other_thread m_cmd
Definition: parse_tree_nodes.h:5160
Definition: parse_tree_nodes.h:5163
const bool m_analyze
Definition: parse_tree_nodes.h:5176
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3512
const bool m_explicit_format
Definition: parse_tree_nodes.h:5177
Parse_tree_root *const m_explainable_stmt
Definition: parse_tree_nodes.h:5178
PT_explain(Explain_format_type format, bool is_analyze, bool is_explicit_format, Parse_tree_root *explainable_stmt)
Definition: parse_tree_nodes.h:5165
const Explain_format_type m_format
Definition: parse_tree_nodes.h:5175
Definition: parse_tree_nodes.h:1455
PT_explicit_table(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:1459
Base class for both generated and regular column definitions.
Definition: parse_tree_column_attrs.h:876
Definition: parse_tree_nodes.h:2299
List< Key_part_spec > * m_ref_list
Definition: parse_tree_nodes.h:2326
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:1812
fk_option m_fk_delete_opt
Definition: parse_tree_nodes.h:2329
PT_foreign_key_definition(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:2303
Table_ident * m_referenced_table
Definition: parse_tree_nodes.h:2325
fk_match_opt m_fk_match_option
Definition: parse_tree_nodes.h:2327
fk_option m_fk_update_opt
Definition: parse_tree_nodes.h:2328
const LEX_STRING m_key_name
Definition: parse_tree_nodes.h:2323
const LEX_STRING m_constraint_name
Definition: parse_tree_nodes.h:2322
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2300
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2324
Parse tree node for a window's frame, cf.
Definition: parse_tree_nodes.h:1325
PT_border * m_to
Definition: parse_tree_nodes.h:1330
bool m_originally_absent
If true, this is an artificial frame, not specified by the user.
Definition: parse_tree_nodes.h:1335
enum_window_frame_unit m_query_expression
Definition: parse_tree_nodes.h:1327
PT_border * m_from
Definition: parse_tree_nodes.h:1329
PT_frame(enum_window_frame_unit unit, PT_borders *from_to, PT_exclusion *exclusion)
Definition: parse_tree_nodes.h:1337
PT_exclusion * m_exclusion
Definition: parse_tree_nodes.h:1332
Definition: parse_tree_nodes.h:237
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:241
PT_order_list super
Definition: parse_tree_nodes.h:238
Definition: parse_tree_nodes.h:3006
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4383
const List< LEX_USER > * users
Definition: parse_tree_nodes.h:3008
const bool with_admin_option
Definition: parse_tree_nodes.h:3009
const Mem_root_array< PT_role_or_privilege * > * roles
Definition: parse_tree_nodes.h:3007
PT_grant_roles(const Mem_root_array< PT_role_or_privilege * > *roles, const List< LEX_USER > *users, bool with_admin_option)
Definition: parse_tree_nodes.h:3012
Definition: parse_tree_nodes.h:619
olap_type olap
Definition: parse_tree_nodes.h:623
Parse_tree_node super
Definition: parse_tree_nodes.h:620
PT_order_list * group_list
Definition: parse_tree_nodes.h:622
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:251
PT_group(PT_order_list *group_list_arg, olap_type olap_arg)
Definition: parse_tree_nodes.h:626
Definition: parse_tree_hints.h:98
bool contextualize(Parse_context *pc) override
Function handles list of the hints we get after parse procedure.
Definition: parse_tree_hints.cc:338
A template for options that set a single <alter option> value in thd->lex->key_create_info.
Definition: parse_tree_nodes.h:2179
PT_index_option(Option_type option_value)
Definition: parse_tree_nodes.h:2182
Option_type m_option_value
Definition: parse_tree_nodes.h:2190
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2184
Definition: parse_tree_nodes.h:2275
Index_options m_options
Definition: parse_tree_nodes.h:2296
PT_table_constraint_def super
Definition: parse_tree_nodes.h:2276
keytype m_keytype
Definition: parse_tree_nodes.h:2292
PT_base_index_option * m_type
Definition: parse_tree_nodes.h:2294
List< PT_key_part_specification > * m_columns
Definition: parse_tree_nodes.h:2295
PT_inline_index_definition(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:2279
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:1800
const LEX_STRING m_name
Definition: parse_tree_nodes.h:2293
Definition: parse_tree_nodes.h:1857
virtual mem_root_deque< List_item * > & get_many_values()
Definition: parse_tree_nodes.h:1872
bool push_back(mem_root_deque< Item * > *x)
Definition: parse_tree_nodes.h:1867
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:970
PT_insert_values_list(MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:1863
Parse_tree_node super
Definition: parse_tree_nodes.h:1858
mem_root_deque< List_item * > many_values
Definition: parse_tree_nodes.h:1860
Top-level node for the INSERT statement.
Definition: parse_tree_nodes.h:1883
PT_item_list *const opt_on_duplicate_column_list
Definition: parse_tree_nodes.h:1895
PT_item_list *const column_list
Definition: parse_tree_nodes.h:1890
PT_item_list *const opt_on_duplicate_value_list
Definition: parse_tree_nodes.h:1896
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1885
bool has_query_block() const
Definition: parse_tree_nodes.h:1938
const bool is_replace
Definition: parse_tree_nodes.h:1884
PT_query_expression_body * insert_query_expression
Definition: parse_tree_nodes.h:1892
PT_insert(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:1899
Create_col_name_list *const opt_values_column_list
Definition: parse_tree_nodes.h:1894
Table_ident *const table_ident
Definition: parse_tree_nodes.h:1888
PT_insert_values_list * row_value_list
Definition: parse_tree_nodes.h:1891
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:981
const char *const opt_values_table_alias
Definition: parse_tree_nodes.h:1893
List< String > *const opt_use_partition
Definition: parse_tree_nodes.h:1889
const bool ignore
Definition: parse_tree_nodes.h:1887
const thr_lock_type lock_option
Definition: parse_tree_nodes.h:1886
Definition: parse_tree_nodes.h:5228
PT_install_component(THD *thd, const Mem_root_array_YY< LEX_STRING > urns, List< PT_install_component_set_element > *set_elements)
Definition: parse_tree_nodes.cc:4823
List< PT_install_component_set_element > * m_set_elements
Definition: parse_tree_nodes.h:5231
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4844
Mem_root_array_YY< LEX_STRING > m_urns
Definition: parse_tree_nodes.h:5230
Definition: parse_tree_nodes.h:1701
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1720
PT_set_operation(PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1641
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1707
Definition: parse_tree_nodes.h:1181
sql_exchange m_exchange
Definition: parse_tree_nodes.h:1191
PT_into_destination super
Definition: parse_tree_nodes.h:1182
PT_into_destination_dumpfile(const POS &pos, const LEX_STRING &file_name_arg)
Definition: parse_tree_nodes.h:1185
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3967
Definition: parse_tree_nodes.h:1161
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:1165
PT_into_destination super
Definition: parse_tree_nodes.h:1162
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3958
sql_exchange m_exchange
Definition: parse_tree_nodes.h:1178
Definition: parse_tree_nodes.h:1150
PT_into_destination(const POS &pos)
Definition: parse_tree_nodes.h:1155
Parse_tree_node super
Definition: parse_tree_nodes.h:1151
POS m_pos
Definition: parse_tree_nodes.h:1152
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3943
Definition: parse_tree_nodes.h:1044
PT_transaction_characteristic super
Definition: parse_tree_nodes.h:1045
PT_isolation_level(enum_tx_isolation level)
Definition: parse_tree_nodes.h:1048
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:111
uint elements() const
Definition: parse_tree_helpers.h:122
Definition: parse_tree_nodes.h:584
Item * on
Definition: parse_tree_nodes.h:586
PT_joined_table super
Definition: parse_tree_nodes.h:585
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3687
PT_joined_table_on(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:589
Definition: parse_tree_nodes.h:597
PT_joined_table_using(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:602
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3714
PT_joined_table_using(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:610
List< String > * using_fields
Definition: parse_tree_nodes.h:599
PT_joined_table super
Definition: parse_tree_nodes.h:598
Definition: parse_tree_nodes.h:516
Table_ref * m_left_table_ref
Definition: parse_tree_nodes.h:525
PT_table_reference super
Definition: parse_tree_nodes.h:517
PT_joined_table(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:529
void add_rhs(PT_table_reference *table)
Adds the table reference as the right-hand side of this join.
Definition: parse_tree_nodes.h:556
~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:522
Table_ref * m_right_table_ref
Definition: parse_tree_nodes.h:526
POS m_join_pos
Definition: parse_tree_nodes.h:521
bool contextualize_tabs(Parse_context *pc)
Definition: parse_tree_nodes.cc:152
PT_table_reference * m_left_pt_table
Definition: parse_tree_nodes.h:520
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3670
PT_table_reference * m_right_pt_table
Definition: parse_tree_nodes.h:523
PT_joined_table * add_cross_join(PT_cross_join *cj) override
Adds the cross join to this join operation.
Definition: parse_tree_nodes.h:550
Definition: parse_tree_nodes.h:4874
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3400
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:4881
const char * m_name
Definition: parse_tree_nodes.h:4885
PT_json_table_column super
Definition: parse_tree_nodes.h:4875
unique_ptr_destroy_only< Json_table_column > m_column
Definition: parse_tree_nodes.h:4884
PT_json_table_column_for_ordinality(LEX_STRING name)
Definition: parse_tree_nodes.cc:3393
Definition: parse_tree_nodes.h:4909
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:4919
Item * m_path
Definition: parse_tree_nodes.h:4922
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3478
PT_json_table_column super
Definition: parse_tree_nodes.h:4910
Json_table_column * m_column
Definition: parse_tree_nodes.h:4924
const Mem_root_array< PT_json_table_column * > * m_nested_columns
Definition: parse_tree_nodes.h:4923
PT_json_table_column_with_nested_path(Item *path, Mem_root_array< PT_json_table_column * > *nested_cols)
Definition: parse_tree_nodes.h:4913
Definition: parse_tree_nodes.h:4888
~PT_json_table_column_with_path() override
const CHARSET_INFO * m_collation
Definition: parse_tree_nodes.h:4905
unique_ptr_destroy_only< Json_table_column > m_column
Definition: parse_tree_nodes.h:4902
const char * m_name
Definition: parse_tree_nodes.h:4903
PT_json_table_column super
Definition: parse_tree_nodes.h:4889
Json_table_column * get_column() override
Definition: parse_tree_nodes.h:4899
PT_type * m_type
Definition: parse_tree_nodes.h:4904
PT_json_table_column_with_path(unique_ptr_destroy_only< Json_table_column > column, LEX_STRING name, PT_type *type, const CHARSET_INFO *collation)
Definition: parse_tree_nodes.cc:3410
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3437
Definition: parse_tree_nodes.h:446
virtual Json_table_column * get_column()=0
A key part specification.
Definition: parse_tree_nodes.h:2065
bool has_expression() const
Definition: parse_tree_nodes.h:2129
LEX_CSTRING m_column_name
The name of the column that this key part indexes.
Definition: parse_tree_nodes.h:2161
Parse_tree_node super
Definition: parse_tree_nodes.h:2066
bool is_explicit() const
Definition: parse_tree_nodes.h:2122
Item * get_expression() const
Get the indexed expression.
Definition: parse_tree_nodes.h:2106
LEX_CSTRING get_column_name() const
Get the column that this key part points to.
Definition: parse_tree_nodes.h:2138
enum_order get_order() const
Definition: parse_tree_nodes.h:2116
enum_order m_order
The direction of the index.
Definition: parse_tree_nodes.h:2158
int get_prefix_length() const
Definition: parse_tree_nodes.h:2148
PT_key_part_specification(Item *expression, enum_order order)
Constructor for a functional key part.
Definition: parse_tree_nodes.cc:668
bool contextualize(Parse_context *pc) override
Contextualize this key part specification.
Definition: parse_tree_nodes.cc:679
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:2168
Item * m_expression
The indexed expression in case this is a functional key part.
Definition: parse_tree_nodes.h:2155
Definition: parse_tree_nodes.h:390
Parse_tree_node super
Definition: parse_tree_nodes.h:391
Limit_options limit_options
Definition: parse_tree_nodes.h:393
PT_limit_clause(const Limit_options &limit_options_arg)
Definition: parse_tree_nodes.h:396
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3627
Definition: parse_tree_nodes.h:4841
List< Index_hint > * m_opt_cache_key_list
Definition: parse_tree_nodes.h:4858
bool m_ignore_leaves
Definition: parse_tree_nodes.h:4859
PT_adm_partition * m_partitions
Definition: parse_tree_nodes.h:4857
Table_ident * m_table
Definition: parse_tree_nodes.h:4856
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3326
PT_load_index_partitions_stmt(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:4843
Definition: parse_tree_nodes.h:4862
Mem_root_array< PT_preload_keys * > * m_preload_list
Definition: parse_tree_nodes.h:4871
PT_load_index_stmt(MEM_ROOT *mem_root, Mem_root_array< PT_preload_keys * > *preload_list)
Definition: parse_tree_nodes.h:4864
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3344
Definition: parse_tree_nodes.h:5181
const thr_lock_type m_lock_type
Definition: parse_tree_nodes.h:5211
PT_load_table(enum_filetype filetype, thr_lock_type lock_type, bool is_local_file, enum_source_type, const LEX_STRING filename, ulong, bool, On_duplicate on_duplicate, Table_ident *table, List< String > *opt_partitions, const CHARSET_INFO *opt_charset, 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, bool)
Definition: parse_tree_nodes.h:5183
Sql_cmd_load_table m_cmd
Definition: parse_tree_nodes.h:5209
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3564
Definition: parse_tree_nodes.h:706
Mem_root_array_YY< PT_locking_clause * > m_locking_clauses
Definition: parse_tree_nodes.h:723
bool push_back(PT_locking_clause *locking_clause)
Definition: parse_tree_nodes.h:712
PT_locking_clause_list(MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:708
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:716
Definition: parse_tree_nodes.h:643
Lock_descriptor get_lock_descriptor() const
Definition: parse_tree_nodes.h:655
bool contextualize(Parse_context *pc) final
Definition: parse_tree_nodes.cc:2145
virtual bool set_lock_for_tables(Parse_context *pc)=0
Locked_row_action action() const
Definition: parse_tree_nodes.h:652
Locked_row_action m_locked_row_action
Definition: parse_tree_nodes.h:671
PT_locking_clause(Lock_strength strength, Locked_row_action action)
Definition: parse_tree_nodes.h:645
Lock_strength m_lock_strength
Definition: parse_tree_nodes.h:670
Definition: parse_tree_nodes.h:1577
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1603
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1585
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1597
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1607
PT_locking(PT_query_expression_body *qe, PT_locking_clause_list *locking_clauses)
Definition: parse_tree_nodes.h:1581
PT_locking_clause_list *const m_locking_clauses
Definition: parse_tree_nodes.h:1613
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1590
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1594
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:1599
PT_query_expression_body *const m_query_expression
Definition: parse_tree_nodes.h:1612
Definition: parse_tree_nodes.h:4709
PT_optimize_table_stmt(MEM_ROOT *mem_root, bool no_write_to_binlog, Mem_root_array< Table_ident * > *table_list)
Definition: parse_tree_nodes.h:4711
bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4719
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3228
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:4720
Definition: parse_tree_nodes.h:971
Parse_tree_node super
Definition: parse_tree_nodes.h:972
POS value_pos
Definition: parse_tree_nodes.h:976
Parse_tree_node * value
Definition: parse_tree_nodes.h:975
PT_option_value_list_head(const POS &delimiter_pos_arg, Parse_tree_node *value_arg, const POS &value_pos_arg)
Definition: parse_tree_nodes.h:979
POS delimiter_pos
Definition: parse_tree_nodes.h:974
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3830
Definition: parse_tree_nodes.h:989
PT_option_value_list_head * head
Definition: parse_tree_nodes.h:992
PT_option_value_list_head super
Definition: parse_tree_nodes.h:990
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1000
PT_option_value_list(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:995
Definition: parse_tree_nodes.h:864
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:185
const CHARSET_INFO * opt_charset
Definition: parse_tree_nodes.h:867
PT_option_value_no_option_type_charset(const CHARSET_INFO *opt_charset_arg)
Definition: parse_tree_nodes.h:870
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:865
Definition: parse_tree_nodes.h:877
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:202
POS pos
Definition: parse_tree_nodes.h:880
PT_option_value_no_option_type_names(const POS &pos)
Definition: parse_tree_nodes.h:883
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:878
Definition: parse_tree_nodes.h:930
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:581
POS expr_pos
Definition: parse_tree_nodes.h:938
bool retain_current_password
Definition: parse_tree_nodes.h:936
LEX_USER * user
Definition: parse_tree_nodes.h:933
const char * password
Definition: parse_tree_nodes.h:934
PT_start_option_value_list super
Definition: parse_tree_nodes.h:931
PT_option_value_no_option_type_password_for(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:941
bool random_password_generator
Definition: parse_tree_nodes.h:937
const char * current_password
Definition: parse_tree_nodes.h:935
Definition: parse_tree_nodes.h:905
bool random_password_generator
Definition: parse_tree_nodes.h:911
const char * current_password
Definition: parse_tree_nodes.h:909
PT_start_option_value_list super
Definition: parse_tree_nodes.h:906
POS expr_pos
Definition: parse_tree_nodes.h:912
bool retain_current_password
Definition: parse_tree_nodes.h:910
const char * password
Definition: parse_tree_nodes.h:908
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:627
PT_option_value_no_option_type_password(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:915
Definition: parse_tree_nodes.h:826
LEX_STRING name
Definition: parse_tree_nodes.h:829
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:827
Item * expr
Definition: parse_tree_nodes.h:830
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3790
PT_option_value_no_option_type_user_var(const LEX_STRING &name_arg, Item *expr_arg)
Definition: parse_tree_nodes.h:833
Definition: parse_tree_nodes.h:801
Definition: parse_tree_nodes.h:957
enum_var_type type
Definition: parse_tree_nodes.h:960
Parse_tree_node super
Definition: parse_tree_nodes.h:958
PT_set_scoped_system_variable * value
Definition: parse_tree_nodes.h:961
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3825
PT_option_value_type(enum_var_type type_arg, PT_set_scoped_system_variable *value_arg)
Definition: parse_tree_nodes.h:964
Definition: parse_tree_nodes.h:203
Parse_tree_node super
Definition: parse_tree_nodes.h:204
PT_order_expr(Item *item_arg, enum_order dir)
Definition: parse_tree_nodes.h:207
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:304
Definition: parse_tree_nodes.h:215
void push_back(PT_order_expr *order)
Definition: parse_tree_nodes.h:230
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:222
Parse_tree_node super
Definition: parse_tree_nodes.h:216
SQL_I_List< ORDER > value
Definition: parse_tree_nodes.h:219
Definition: parse_tree_nodes.h:632
Parse_tree_node super
Definition: parse_tree_nodes.h:633
PT_order_list * order_list
Definition: parse_tree_nodes.h:636
PT_order(PT_order_list *order_list_arg)
Definition: parse_tree_nodes.h:637
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:287
Node for the PARTITION clause of CREATE/ALTER TABLE.
Definition: parse_tree_partitions.h:386
Node for the PARTITION definition clause.
Definition: parse_tree_partitions.h:594
Definition: parse_tree_nodes.h:4823
List< Index_hint > * m_opt_cache_key_list
Definition: parse_tree_nodes.h:4837
Table_ddl_node super
Definition: parse_tree_nodes.h:4824
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.cc:4556
PT_preload_keys(Table_ident *table, List< Index_hint > *opt_cache_key_list, bool ignore_leaves)
Definition: parse_tree_nodes.h:4827
Table_ident * m_table
Definition: parse_tree_nodes.h:4836
bool m_ignore_leaves
Definition: parse_tree_nodes.h:4838
Definition: parse_tree_nodes.h:674
PT_query_block_locking_clause(Lock_strength strength, Locked_row_action action=Locked_row_action::WAIT)
Definition: parse_tree_nodes.h:676
bool set_lock_for_tables(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2167
Definition: parse_tree_nodes.h:726
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:729
Setop_type
Definition: parse_tree_nodes.h:728
@ UNION
Definition: parse_tree_nodes.h:728
@ EXCEPT
Definition: parse_tree_nodes.h:728
@ NONE
Definition: parse_tree_nodes.h:728
@ INTERSECT
Definition: parse_tree_nodes.h:728
virtual PT_insert_values_list * get_row_value_list() const =0
virtual bool has_into_clause() const =0
virtual bool has_trailing_into_clause() const =0
Definition: parse_tree_nodes.h:1465
PT_order * m_order
Definition: parse_tree_nodes.h:1568
bool contextualize_deferred_hints(Parse_context *pc)
Definition: parse_tree_nodes.h:1492
PT_limit_clause * m_limit
Definition: parse_tree_nodes.h:1569
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1484
PT_query_expression(PT_with_clause *with_clause, PT_query_expression_body *body, PT_order *order, PT_limit_clause *limit)
Definition: parse_tree_nodes.h:1467
PT_query_expression(PT_query_expression_body *body)
Definition: parse_tree_nodes.h:1479
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3996
PT_query_expression_body * m_body
Definition: parse_tree_nodes.h:1567
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1486
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1487
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:1247
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:1499
PT_query_expression(PT_query_expression_body *body, PT_order *order, PT_limit_clause *limit)
Definition: parse_tree_nodes.h:1475
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1551
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:1570
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1547
Definition: parse_tree_nodes.h:1345
Definition: parse_tree_nodes.h:1347
bool is_implicit_from_clause() const
Definition: parse_tree_nodes.h:1427
PT_into_destination * opt_into1
Definition: parse_tree_nodes.h:1353
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1350
Item * opt_having_clause
Definition: parse_tree_nodes.h:1358
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1424
PT_window_list * opt_window_clause
Definition: parse_tree_nodes.h:1359
const bool m_is_from_clause_implicit
Definition: parse_tree_nodes.h:1354
PT_query_specification(const Query_options &options_arg, PT_item_list *item_list_arg)
Definition: parse_tree_nodes.h:1397
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1163
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1419
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1412
PT_item_list * item_list
Definition: parse_tree_nodes.h:1352
Mem_root_array_YY< PT_table_reference * > from_clause
Definition: parse_tree_nodes.h:1355
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1423
Query_options options
Definition: parse_tree_nodes.h:1351
PT_group * opt_group_clause
Definition: parse_tree_nodes.h:1357
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:1421
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1413
Item * opt_where_clause
Definition: parse_tree_nodes.h:1356
PT_query_primary super
Definition: parse_tree_nodes.h:1348
PT_query_specification(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:1382
PT_query_specification(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, bool implicit_from_clause)
Definition: parse_tree_nodes.h:1362
Definition: parse_tree_nodes.h:4644
Mem_root_array< Table_ident * > * m_table_list
Definition: parse_tree_nodes.h:4660
bool m_no_write_to_binlog
Definition: parse_tree_nodes.h:4659
PT_repair_table_stmt(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:4646
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3168
decltype(HA_CHECK_OPT::sql_flags) m_sql_flags
Definition: parse_tree_nodes.h:4662
decltype(HA_CHECK_OPT::flags) m_flags
Definition: parse_tree_nodes.h:4661
Top-level node for the SHUTDOWN statement.
Definition: parse_tree_nodes.h:5220
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4634
Sql_cmd_restart_server sql_cmd
Definition: parse_tree_nodes.h:5225
Definition: parse_tree_nodes.h:3019
PT_revoke_roles(Mem_root_array< PT_role_or_privilege * > *roles, const List< LEX_USER > *users)
Definition: parse_tree_nodes.h:3024
const Mem_root_array< PT_role_or_privilege * > * roles
Definition: parse_tree_nodes.h:3020
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4397
const List< LEX_USER > * users
Definition: parse_tree_nodes.h:3021
Definition: parse_tree_nodes.h:2961
LEX_STRING role
Definition: parse_tree_nodes.h:2962
PT_role_at_host(const POS &pos, const LEX_STRING &role, const LEX_STRING &host)
Definition: parse_tree_nodes.h:2966
LEX_STRING host
Definition: parse_tree_nodes.h:2963
LEX_USER * get_user(THD *thd) override
Definition: parse_tree_nodes.cc:4363
Definition: parse_tree_nodes.h:2973
LEX_STRING ident
Definition: parse_tree_nodes.h:2974
PT_role_or_dynamic_privilege(const POS &pos, const LEX_STRING &ident)
Definition: parse_tree_nodes.h:2977
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:4371
LEX_USER * get_user(THD *thd) override
Definition: parse_tree_nodes.cc:4367
Definition: parse_tree_nodes.h:2951
POS pos
Definition: parse_tree_nodes.h:2953
virtual LEX_USER * get_user(THD *thd)
Definition: parse_tree_nodes.cc:4353
PT_role_or_privilege(const POS &pos)
Definition: parse_tree_nodes.h:2956
virtual Privilege * get_privilege(THD *thd)
Definition: parse_tree_nodes.cc:4358
Definition: parse_tree_nodes.h:383
PT_item_list super
Definition: parse_tree_nodes.h:384
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3621
Definition: parse_tree_nodes.h:1207
PT_select_sp_var(const LEX_STRING &name_arg)
Definition: parse_tree_nodes.h:1221
sp_head * sp
Definition: parse_tree_nodes.h:1217
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:683
uint offset
Definition: parse_tree_nodes.h:1210
uint get_offset() const override
Definition: parse_tree_nodes.h:1224
PT_select_var super
Definition: parse_tree_nodes.h:1208
bool is_local() const override
Definition: parse_tree_nodes.h:1223
Definition: parse_tree_nodes.h:1710
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:703
PT_query_expression_body * m_qe
Definition: parse_tree_nodes.h:1745
const bool m_has_trailing_locking_clauses
Definition: parse_tree_nodes.h:1747
PT_into_destination * m_into
Definition: parse_tree_nodes.h:1746
PT_select_stmt(enum_sql_command sql_command, PT_query_expression_body *qe)
Definition: parse_tree_nodes.h:1718
Parse_tree_root super
Definition: parse_tree_nodes.h:1711
PT_select_stmt(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:1733
enum_sql_command m_sql_command
Definition: parse_tree_nodes.h:1744
Definition: parse_tree_nodes.h:1229
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3976
List< PT_select_var > value
Definition: parse_tree_nodes.h:1235
PT_into_destination super
Definition: parse_tree_nodes.h:1230
bool push_back(PT_select_var *var)
Definition: parse_tree_nodes.h:1239
PT_select_var_list(const POS &pos)
Definition: parse_tree_nodes.h:1233
Definition: parse_tree_nodes.h:1194
const LEX_STRING name
Definition: parse_tree_nodes.h:1196
virtual bool is_local() const
Definition: parse_tree_nodes.h:1200
PT_select_var(const LEX_STRING &name_arg)
Definition: parse_tree_nodes.h:1198
virtual uint get_offset() const
Definition: parse_tree_nodes.h:1201
Definition: parse_tree_nodes.h:888
PT_set_names(const CHARSET_INFO *opt_charset_arg, const CHARSET_INFO *opt_collation_arg)
Definition: parse_tree_nodes.h:895
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:889
const CHARSET_INFO * opt_charset
Definition: parse_tree_nodes.h:891
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:218
const CHARSET_INFO * opt_collation
Definition: parse_tree_nodes.h:892
Definition: parse_tree_nodes.h:1637
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1660
bool m_is_distinct
Definition: parse_tree_nodes.h:1678
bool can_absorb_order_and_limit(bool, bool) const override
True if this query expression can absorb an extraneous order by/limit clause.
Definition: parse_tree_nodes.h:1665
PT_set_operation(PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1641
bool is_distinct() const
Definition: parse_tree_nodes.h:1669
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:1531
PT_into_destination * m_into
Definition: parse_tree_nodes.h:1679
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1668
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1654
void set_is_rhs_in_parentheses(bool v)
Definition: parse_tree_nodes.h:1672
bool m_is_rhs_in_parentheses
Definition: parse_tree_nodes.h:1680
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1652
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1667
List< PT_query_expression_body > m_list
Definition: parse_tree_nodes.h:1671
bool contextualize_setop(Parse_context *pc, Query_term_type setop_type, Surrounding_context context)
Definition: parse_tree_nodes.cc:1665
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:1404
Parse tree node for SET RESOURCE GROUP statement.
Definition: parse_tree_nodes.h:5141
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4624
resourcegroups::Sql_cmd_set_resource_group sql_cmd
Definition: parse_tree_nodes.h:5142
PT_set_resource_group(const LEX_CSTRING &name, Mem_root_array< ulonglong > *thread_id_list)
Definition: parse_tree_nodes.h:5145
Definition: parse_tree_nodes.h:2907
PT_set_role(role_enum role_type, const List< LEX_USER > *opt_except_roles=nullptr)
Definition: parse_tree_nodes.h:2911
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4348
PT_set_role(const List< LEX_USER > *roles)
Definition: parse_tree_nodes.h:2916
Sql_cmd_set_role sql_cmd
Definition: parse_tree_nodes.h:2908
Definition: parse_tree_nodes.h:781
Parse_tree_node super
Definition: parse_tree_nodes.h:782
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:797
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3748
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:796
PT_set_scoped_system_variable(const POS &pos, const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name, Item *opt_expr)
Definition: parse_tree_nodes.h:785
Item * m_opt_expr
Definition: parse_tree_nodes.h:798
const POS m_pos
Definition: parse_tree_nodes.h:795
Definition: parse_tree_nodes.h:840
const enum_var_type m_scope
Definition: parse_tree_nodes.h:856
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:841
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:858
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3802
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:859
Item * m_opt_expr
Definition: parse_tree_nodes.h:860
const POS m_name_pos
Definition: parse_tree_nodes.h:857
PT_set_system_variable(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:844
Definition: parse_tree_nodes.h:803
Item * m_opt_expr
Definition: parse_tree_nodes.h:822
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:499
PT_set_variable(const POS &pos, const LEX_CSTRING &opt_prefix, const LEX_CSTRING &name, const POS &expr_pos, Item *opt_expr)
Definition: parse_tree_nodes.h:807
PT_option_value_no_option_type super
Definition: parse_tree_nodes.h:804
const POS m_expr_pos
Definition: parse_tree_nodes.h:821
const LEX_CSTRING m_opt_prefix
Definition: parse_tree_nodes.h:819
const POS m_pos
Definition: parse_tree_nodes.h:818
const LEX_CSTRING m_name
Definition: parse_tree_nodes.h:820
Definition: parse_tree_nodes.h:1137
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3926
Parse_tree_node super
Definition: parse_tree_nodes.h:1138
POS set_pos
Definition: parse_tree_nodes.h:1140
PT_set(const POS &set_pos_arg, PT_start_option_value_list *list_arg)
Definition: parse_tree_nodes.h:1144
PT_start_option_value_list * list
Definition: parse_tree_nodes.h:1141
Base class for Parse tree nodes of SHOW statements.
Definition: parse_tree_nodes.h:3045
PT_show_base(const POS &pos, enum_sql_command sql_command)
Definition: parse_tree_nodes.h:3047
enum_sql_command m_sql_command
SQL command.
Definition: parse_tree_nodes.h:3053
POS m_pos
Textual location of a token just parsed.
Definition: parse_tree_nodes.h:3051
Parse tree node for SHOW BINLOG EVENTS statement.
Definition: parse_tree_nodes.h:3121
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3133
Sql_cmd_show_binlog_events m_sql_cmd
Definition: parse_tree_nodes.h:3135
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:3123
const LEX_STRING m_opt_log_file_name
Definition: parse_tree_nodes.h:3132
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2440
Parse tree node for SHOW BINLOGS statement.
Definition: parse_tree_nodes.h:3140
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2452
PT_show_binlogs(const POS &pos)
Definition: parse_tree_nodes.h:3142
Sql_cmd_show_binlogs m_sql_cmd
Definition: parse_tree_nodes.h:3147
Parse tree node for SHOW CHARACTER SET statement.
Definition: parse_tree_nodes.h:3152
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2459
PT_show_charsets(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3154
Sql_cmd_show_charsets m_sql_cmd
Definition: parse_tree_nodes.h:3160
Parse tree node for SHOW COLLATIONS statement.
Definition: parse_tree_nodes.h:3165
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2472
PT_show_collations(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3167
Sql_cmd_show_collations m_sql_cmd
Definition: parse_tree_nodes.h:3173
Base class for Parse tree nodes of SHOW COUNT(*) { WARNINGS | ERRORS } statements.
Definition: parse_tree_nodes.h:3179
Sql_cmd * make_cmd_generic(THD *thd, LEX_CSTRING diagnostic_variable_name)
Definition: parse_tree_nodes.cc:2485
PT_show_count_base(const POS &pos)
Definition: parse_tree_nodes.h:3181
Parse tree node for SHOW COUNT(*) ERRORS.
Definition: parse_tree_nodes.h:3190
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.h:3194
PT_show_count_errors(const POS &pos)
Definition: parse_tree_nodes.h:3192
Parse tree node for SHOW COUNT(*) WARNINGS.
Definition: parse_tree_nodes.h:3201
PT_show_count_warnings(const POS &pos)
Definition: parse_tree_nodes.h:3203
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.h:3205
Parse tree node for SHOW CREATE DATABASE statement.
Definition: parse_tree_nodes.h:3212
const LEX_STRING m_name
Definition: parse_tree_nodes.h:3224
PT_show_create_database(const POS &pos, bool if_not_exists, const LEX_STRING &name)
Definition: parse_tree_nodes.h:3214
Sql_cmd_show_create_database m_sql_cmd
Definition: parse_tree_nodes.h:3226
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2517
const bool m_if_not_exists
Definition: parse_tree_nodes.h:3223
Parse tree node for SHOW CREATE EVENT statement.
Definition: parse_tree_nodes.h:3231
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2530
sp_name *const m_spname
Definition: parse_tree_nodes.h:3239
PT_show_create_event(const POS &pos, sp_name *event_name)
Definition: parse_tree_nodes.h:3233
Sql_cmd_show_create_event m_sql_cmd
Definition: parse_tree_nodes.h:3241
Parse tree node for SHOW CREATE FUNCTION statement.
Definition: parse_tree_nodes.h:3246
Sql_cmd_show_create_function m_sql_cmd
Definition: parse_tree_nodes.h:3256
PT_show_create_function(const POS &pos, sp_name *function_name)
Definition: parse_tree_nodes.h:3248
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2539
sp_name *const m_spname
Definition: parse_tree_nodes.h:3254
Parse tree node for SHOW CREATE PROCEDURE statement.
Definition: parse_tree_nodes.h:3261
Sql_cmd_show_create_procedure m_sql_cmd
Definition: parse_tree_nodes.h:3271
sp_name *const m_spname
Definition: parse_tree_nodes.h:3269
PT_show_create_procedure(const POS &pos, sp_name *procedure_name)
Definition: parse_tree_nodes.h:3263
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2548
Parse tree node for SHOW CREATE TABLE and VIEW statements.
Definition: parse_tree_nodes.h:3276
Sql_cmd_show_create_table m_sql_cmd
Definition: parse_tree_nodes.h:3284
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2557
PT_show_create_table(const POS &pos, Table_ident *table_ident)
Definition: parse_tree_nodes.h:3278
Parse tree node for SHOW CREATE TRIGGER statement.
Definition: parse_tree_nodes.h:3289
PT_show_create_trigger(const POS &pos, sp_name *trigger_name)
Definition: parse_tree_nodes.h:3291
Sql_cmd_show_create_trigger m_sql_cmd
Definition: parse_tree_nodes.h:3299
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2576
sp_name *const m_spname
Definition: parse_tree_nodes.h:3297
Parse tree node for SHOW CREATE USER statement.
Definition: parse_tree_nodes.h:3304
Sql_cmd_show_create_user m_sql_cmd
Definition: parse_tree_nodes.h:3314
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2585
PT_show_create_user(const POS &pos, LEX_USER *user)
Definition: parse_tree_nodes.h:3306
LEX_USER *const m_user
Definition: parse_tree_nodes.h:3312
Parse tree node for SHOW CREATE VIEW statement.
Definition: parse_tree_nodes.h:3319
PT_show_create_view(const POS &pos, Table_ident *table_ident)
Definition: parse_tree_nodes.h:3321
Sql_cmd_show_create_table m_sql_cmd
Definition: parse_tree_nodes.h:3327
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2569
Parse tree node for SHOW DATABASES statement.
Definition: parse_tree_nodes.h:3332
Sql_cmd_show_databases m_sql_cmd
Definition: parse_tree_nodes.h:3340
PT_show_databases(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3334
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2594
Parse tree node for SHOW ENGINE statements.
Definition: parse_tree_nodes.h:3345
PT_show_engine_base(const POS &pos, enum enum_sql_command sql_command, const LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3347
LEX_STRING m_engine
Definition: parse_tree_nodes.h:3353
bool m_all
Definition: parse_tree_nodes.h:3354
Parse tree node for SHOW ENGINE LOGS statement.
Definition: parse_tree_nodes.h:3359
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2607
PT_show_engine_logs(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3361
Sql_cmd_show_engine_logs m_sql_cmd
Definition: parse_tree_nodes.h:3367
Parse tree node for SHOW ENGINE MUTEX statement.
Definition: parse_tree_nodes.h:3372
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2621
Sql_cmd_show_engine_mutex m_sql_cmd
Definition: parse_tree_nodes.h:3380
PT_show_engine_mutex(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3374
Parse tree node for SHOW ENGINE STATUS statement.
Definition: parse_tree_nodes.h:3385
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2635
PT_show_engine_status(const POS &pos, LEX_STRING opt_engine={})
Definition: parse_tree_nodes.h:3387
Sql_cmd_show_engine_status m_sql_cmd
Definition: parse_tree_nodes.h:3393
Parse tree node for SHOW ENGINES statement.
Definition: parse_tree_nodes.h:3398
PT_show_engines(const POS &pos)
Definition: parse_tree_nodes.h:3400
Sql_cmd_show_engines m_sql_cmd
Definition: parse_tree_nodes.h:3406
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2649
Parse tree node for SHOW ERRORS statement.
Definition: parse_tree_nodes.h:3411
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3420
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2658
Sql_cmd_show_errors m_sql_cmd
Definition: parse_tree_nodes.h:3422
PT_show_errors(const POS &pos, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:3413
Parse tree node for SHOW EVENTS statement.
Definition: parse_tree_nodes.h:3427
Sql_cmd_show_events m_sql_cmd
Definition: parse_tree_nodes.h:3436
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2692
PT_show_events(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3429
Parse tree node for SHOW COLUMNS statement.
Definition: parse_tree_nodes.h:3441
Sql_cmd_show_columns m_sql_cmd
Definition: parse_tree_nodes.h:3455
Show_cmd_type m_show_cmd_type
Definition: parse_tree_nodes.h:3454
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:3445
PT_show_table_base super
Definition: parse_tree_nodes.h:3442
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2670
Base class for Parse tree nodes of SHOW statements with LIKE/WHERE parameter.
Definition: parse_tree_nodes.h:3058
Item * m_where
Definition: parse_tree_nodes.h:3067
PT_show_filter_base(const POS &pos, enum_sql_command sql_command, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3060
LEX_STRING m_wild
Wild or where clause used in the statement.
Definition: parse_tree_nodes.h:3066
Parse tree node for SHOW FUNCTION CODE statement.
Definition: parse_tree_nodes.h:3460
PT_show_function_code(const POS &pos, const sp_name *function_name)
Definition: parse_tree_nodes.h:3462
Parse tree node for SHOW GRANTS statement.
Definition: parse_tree_nodes.h:3468
Sql_cmd_show_grants sql_cmd
Definition: parse_tree_nodes.h:3480
PT_show_grants(const POS &pos, const LEX_USER *opt_for_user, const List< LEX_USER > *opt_using_users)
Definition: parse_tree_nodes.h:3470
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:4414
Parse tree node for SHOW INDEX statement.
Definition: parse_tree_nodes.h:3485
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2684
PT_show_keys(const POS &pos, bool extended_show, Table_ident *table, Item *where)
Definition: parse_tree_nodes.h:3487
Sql_cmd_show_keys m_sql_cmd
Definition: parse_tree_nodes.h:3499
bool m_extended_show
Definition: parse_tree_nodes.h:3498
PT_show_table_base super
Definition: parse_tree_nodes.h:3495
Parse tree node for SHOW MASTER STATUS statement.
Definition: parse_tree_nodes.h:3504
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2706
Sql_cmd_show_master_status m_sql_cmd
Definition: parse_tree_nodes.h:3512
PT_show_master_status(const POS &pos)
Definition: parse_tree_nodes.h:3506
Parse tree node for SHOW OPEN TABLES statement.
Definition: parse_tree_nodes.h:3517
PT_show_open_tables(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3519
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2713
Sql_cmd_show_open_tables m_sql_cmd
Definition: parse_tree_nodes.h:3527
Parse tree node for SHOW PLUGINS statement.
Definition: parse_tree_nodes.h:3532
Sql_cmd_show_plugins m_sql_cmd
Definition: parse_tree_nodes.h:3539
PT_show_plugins(const POS &pos)
Definition: parse_tree_nodes.h:3534
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2731
Parse tree node for SHOW PRIVILEGES statement.
Definition: parse_tree_nodes.h:3544
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2740
PT_show_privileges(const POS &pos)
Definition: parse_tree_nodes.h:3546
Sql_cmd_show_privileges m_sql_cmd
Definition: parse_tree_nodes.h:3552
Parse tree node for SHOW FUNCTION CODE statement.
Definition: parse_tree_nodes.h:3557
PT_show_procedure_code(const POS &pos, const sp_name *procedure_name)
Definition: parse_tree_nodes.h:3559
Parse tree node for SHOW PROCESSLIST statement.
Definition: parse_tree_nodes.h:3565
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2747
Sql_cmd_show_processlist m_sql_cmd
Definition: parse_tree_nodes.h:3573
PT_show_processlist(const POS &pos, bool verbose)
Definition: parse_tree_nodes.h:3567
Parse tree node for SHOW PROFILE statement.
Definition: parse_tree_nodes.h:3578
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2770
uint m_opt_profile_options
Definition: parse_tree_nodes.h:3591
Sql_cmd_show_profile m_sql_cmd
Definition: parse_tree_nodes.h:3595
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:3580
my_thread_id m_opt_query_id
Definition: parse_tree_nodes.h:3592
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3593
Parse tree node for SHOW PROFILES statement.
Definition: parse_tree_nodes.h:3600
PT_show_profiles(const POS &pos)
Definition: parse_tree_nodes.h:3602
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2785
Sql_cmd_show_profiles m_sql_cmd
Definition: parse_tree_nodes.h:3607
Parse tree node for SHOW RELAYLOG EVENTS statement.
Definition: parse_tree_nodes.h:3612
Sql_cmd_show_relaylog_events m_sql_cmd
Definition: parse_tree_nodes.h:3630
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:3614
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3627
const LEX_STRING m_opt_log_file_name
Definition: parse_tree_nodes.h:3626
const LEX_CSTRING m_opt_channel_name
Definition: parse_tree_nodes.h:3628
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2792
Parse tree node for SHOW REPLICA STATUS statement.
Definition: parse_tree_nodes.h:3648
Sql_cmd_show_replica_status m_sql_cmd
Definition: parse_tree_nodes.h:3659
const LEX_CSTRING m_opt_channel_name
Definition: parse_tree_nodes.h:3657
PT_show_replica_status(const POS &pos, LEX_CSTRING opt_channel_name={})
Definition: parse_tree_nodes.h:3650
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2812
Parse tree node for SHOW REPLICAS statement.
Definition: parse_tree_nodes.h:3635
Sql_cmd_show_replicas m_sql_cmd
Definition: parse_tree_nodes.h:3643
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2805
PT_show_replicas(const POS &pos)
Definition: parse_tree_nodes.h:3637
Parse tree node for SHOW FUNCTION/PROCEDURE CODE statements.
Definition: parse_tree_nodes.h:3107
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2763
Sql_cmd_show_routine_code m_sql_cmd
Definition: parse_tree_nodes.h:3116
PT_show_routine_code(const POS &pos, enum_sql_command sql_command, const sp_name *routine_name)
Definition: parse_tree_nodes.h:3109
Base class for Parse tree nodes of SHOW statements with schema parameter.
Definition: parse_tree_nodes.h:3072
char * m_opt_db
Optional schema name in FROM/IN clause.
Definition: parse_tree_nodes.h:3083
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:3074
Item * m_where
Definition: parse_tree_nodes.h:3086
LEX_STRING m_wild
Wild or where clause used in the statement.
Definition: parse_tree_nodes.h:3085
Parse tree node for SHOW STATUS FUNCTION statement.
Definition: parse_tree_nodes.h:3683
Sql_cmd_show_status_func m_sql_cmd
Definition: parse_tree_nodes.h:3691
PT_show_status_func(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3685
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2837
Parse tree node for SHOW STATUS PROCEDURE statement.
Definition: parse_tree_nodes.h:3696
PT_show_status_proc(const POS &pos, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3698
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2850
Sql_cmd_show_status_proc m_sql_cmd
Definition: parse_tree_nodes.h:3704
Parse tree node for SHOW STATUS statement.
Definition: parse_tree_nodes.h:3664
enum_var_type m_var_type
Definition: parse_tree_nodes.h:3678
Sql_cmd_show_status m_sql_cmd
Definition: parse_tree_nodes.h:3676
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2821
PT_show_status(const POS &pos, enum_var_type var_type, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3666
Base class for Parse tree nodes of SHOW COLUMNS/SHOW INDEX statements.
Definition: parse_tree_nodes.h:3091
bool make_table_base_cmd(THD *thd, bool *temporary)
Definition: parse_tree_nodes.cc:2356
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:3093
Table_ident * m_table_ident
Table used in the statement.
Definition: parse_tree_nodes.h:3102
Parse tree node for SHOW TABLE STATUS statement.
Definition: parse_tree_nodes.h:3709
Sql_cmd_show_table_status m_sql_cmd
Definition: parse_tree_nodes.h:3719
PT_show_table_status(const POS &pos, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3711
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2863
Parse tree node for SHOW TABLES statement.
Definition: parse_tree_nodes.h:3724
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2878
Show_cmd_type m_show_cmd_type
Definition: parse_tree_nodes.h:3736
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:3726
Sql_cmd_show_tables m_sql_cmd
Definition: parse_tree_nodes.h:3734
Parse tree node for SHOW TRIGGERS statement.
Definition: parse_tree_nodes.h:3741
PT_show_triggers(const POS &pos, bool full, char *opt_db, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3743
bool m_full
Definition: parse_tree_nodes.h:3753
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2894
Sql_cmd_show_triggers m_sql_cmd
Definition: parse_tree_nodes.h:3751
Parse tree node for SHOW VARIABLES statement.
Definition: parse_tree_nodes.h:3758
enum_var_type m_var_type
Definition: parse_tree_nodes.h:3772
Sql_cmd_show_variables m_sql_cmd
Definition: parse_tree_nodes.h:3770
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2909
PT_show_variables(const POS &pos, enum_var_type var_type, const LEX_STRING &wild, Item *where)
Definition: parse_tree_nodes.h:3760
Parse tree node for SHOW WARNINGS statement.
Definition: parse_tree_nodes.h:3777
PT_limit_clause *const m_opt_limit_clause
Definition: parse_tree_nodes.h:3786
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:2925
Sql_cmd_show_warnings m_sql_cmd
Definition: parse_tree_nodes.h:3788
PT_show_warnings(const POS &pos, PT_limit_clause *opt_limit_clause=nullptr)
Definition: parse_tree_nodes.h:3779
Top-level node for the SHUTDOWN statement.
Definition: parse_tree_nodes.h:1957
Sql_cmd * make_cmd(THD *) override
Definition: parse_tree_nodes.h:1961
Sql_cmd_shutdown sql_cmd
Definition: parse_tree_nodes.h:1958
Definition: parse_tree_nodes.h:1089
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3895
POS head_pos
Definition: parse_tree_nodes.h:1093
PT_start_option_value_list_following_option_type_eq(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:1097
PT_start_option_value_list_following_option_type super
Definition: parse_tree_nodes.h:1090
PT_option_value_list_head * opt_tail
Definition: parse_tree_nodes.h:1094
PT_set_scoped_system_variable * head
Definition: parse_tree_nodes.h:1092
PT_start_option_value_list_following_option_type_transaction(PT_transaction_characteristics *characteristics_arg, const POS &characteristics_pos_arg)
Definition: parse_tree_nodes.h:1113
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3909
PT_transaction_characteristics * characteristics
Definition: parse_tree_nodes.h:1109
PT_start_option_value_list_following_option_type super
Definition: parse_tree_nodes.h:1107
POS characteristics_pos
Definition: parse_tree_nodes.h:1110
Definition: parse_tree_nodes.h:1086
Definition: parse_tree_nodes.h:1007
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1008
POS head_pos
Definition: parse_tree_nodes.h:1011
PT_start_option_value_list_no_type(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:1015
PT_option_value_list_head * tail
Definition: parse_tree_nodes.h:1012
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3850
PT_option_value_no_option_type * head
Definition: parse_tree_nodes.h:1010
Definition: parse_tree_nodes.h:1070
PT_transaction_characteristics * characteristics
Definition: parse_tree_nodes.h:1073
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1071
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3881
POS end_pos
Definition: parse_tree_nodes.h:1074
PT_start_option_value_list_transaction(PT_transaction_characteristics *characteristics_arg, const POS &end_pos_arg)
Definition: parse_tree_nodes.h:1077
Definition: parse_tree_nodes.h:1122
PT_start_option_value_list super
Definition: parse_tree_nodes.h:1123
PT_start_option_value_list_following_option_type * list
Definition: parse_tree_nodes.h:1126
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3921
PT_start_option_value_list_type(enum_var_type type_arg, PT_start_option_value_list_following_option_type *list_arg)
Definition: parse_tree_nodes.h:1129
enum_var_type type
Definition: parse_tree_nodes.h:1125
Definition: parse_tree_nodes.h:902
Definition: parse_tree_nodes.h:2984
const Mem_root_array< LEX_CSTRING > * columns
Definition: parse_tree_nodes.h:2986
PT_static_privilege(const POS &pos, uint grant, const Mem_root_array< LEX_CSTRING > *columns=nullptr)
Definition: parse_tree_nodes.h:2989
const uint grant
Definition: parse_tree_nodes.h:2985
Privilege * get_privilege(THD *thd) override
Definition: parse_tree_nodes.cc:4375
Definition: parse_tree_nodes.h:1616
Parse_tree_node super
Definition: parse_tree_nodes.h:1617
PT_query_expression_body * qe
Definition: parse_tree_nodes.h:1619
bool m_is_derived_table
Definition: parse_tree_nodes.h:1624
Query_block * value()
Definition: parse_tree_nodes.h:1634
PT_subquery(POS p, PT_query_expression_body *query_expression)
Definition: parse_tree_nodes.h:1626
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:4122
Query_block * query_block
Definition: parse_tree_nodes.h:1621
POS pos
Definition: parse_tree_nodes.h:1620
Definition: parse_tree_nodes.h:2273
Definition: parse_tree_nodes.h:172
~PT_table_ddl_stmt_base() override=0
Alter_info m_alter_info
Definition: parse_tree_nodes.h:180
PT_table_ddl_stmt_base(MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:174
Base class for column/constraint definitions in CREATE TABLE.
Definition: parse_tree_nodes.h:2271
Definition: parse_tree_nodes.h:451
Item * m_path
Definition: parse_tree_nodes.h:467
const LEX_STRING m_table_alias
Definition: parse_tree_nodes.h:469
Item * m_expr
Definition: parse_tree_nodes.h:466
PT_table_reference super
Definition: parse_tree_nodes.h:452
Mem_root_array< PT_json_table_column * > * m_nested_columns
Definition: parse_tree_nodes.h:468
PT_table_factor_function(Item *expr, Item *path, Mem_root_array< PT_json_table_column * > *nested_cols, const LEX_STRING &table_alias)
Definition: parse_tree_nodes.h:455
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1274
Definition: parse_tree_nodes.h:503
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1368
PT_table_factor_joined_table(PT_joined_table *joined_table)
Definition: parse_tree_nodes.h:507
PT_joined_table * m_joined_table
Definition: parse_tree_nodes.h:513
PT_table_reference super
Definition: parse_tree_nodes.h:504
Definition: parse_tree_nodes.h:425
const char *const opt_table_alias
Definition: parse_tree_nodes.h:430
Table_ident * table_ident
Definition: parse_tree_nodes.h:428
PT_table_reference super
Definition: parse_tree_nodes.h:426
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3647
PT_table_factor_table_ident(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)
Definition: parse_tree_nodes.h:434
List< Index_hint > * opt_key_definition
Definition: parse_tree_nodes.h:431
List< String > * opt_use_partition
Definition: parse_tree_nodes.h:429
Definition: parse_tree_nodes.h:684
void print_table_ident(const THD *thd, const Table_ident *ident, String *s)
Definition: parse_tree_nodes.cc:3725
Table_ident_list m_tables
Definition: parse_tree_nodes.h:703
bool raise_error(THD *thd, const Table_ident *name, int error)
Definition: parse_tree_nodes.cc:3735
bool set_lock_for_tables(Parse_context *pc) override
Definition: parse_tree_nodes.cc:2335
PT_table_locking_clause(Lock_strength strength, Mem_root_array_YY< Table_ident * > tables, Locked_row_action action)
Definition: parse_tree_nodes.h:688
Mem_root_array_YY< Table_ident * > Table_ident_list
Definition: parse_tree_nodes.h:686
Definition: parse_tree_nodes.h:472
PT_table_reference super
Definition: parse_tree_nodes.h:473
PT_table_reference_list_parens(const Mem_root_array_YY< PT_table_reference * > table_list)
Definition: parse_tree_nodes.h:478
Mem_root_array_YY< PT_table_reference * > table_list
Definition: parse_tree_nodes.h:475
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3661
Definition: parse_tree_nodes.h:406
Table_ref * m_table_ref
Definition: parse_tree_nodes.h:408
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:147
Definition: parse_tree_nodes.h:1430
PT_insert_values_list *const row_value_list
Definition: parse_tree_nodes.h:1433
bool is_set_operation() const override
Definition: parse_tree_nodes.h:1444
bool has_into_clause() const override
Definition: parse_tree_nodes.h:1441
PT_insert_values_list * get_row_value_list() const override
Definition: parse_tree_nodes.h:1450
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:1446
bool has_trailing_into_clause() const override
Definition: parse_tree_nodes.h:1442
PT_table_value_constructor(PT_insert_values_list *row_value_list_arg)
Definition: parse_tree_nodes.h:1436
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1226
bool is_table_value_constructor() const override
Definition: parse_tree_nodes.h:1448
PT_query_primary super
Definition: parse_tree_nodes.h:1431
A template for options that set HA_CREATE_INFO::table_options and also records if the option was expl...
Definition: parse_tree_nodes.h:2509
PT_create_table_option super
Definition: parse_tree_nodes.h:2510
const Ternary_option value
Definition: parse_tree_nodes.h:2512
PT_ternary_create_table_option(Ternary_option value)
Definition: parse_tree_nodes.h:2515
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2518
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:2372
PT_traceable_create_table_option(Option_type value)
Definition: parse_tree_nodes.h:2378
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2380
const Option_type value
Definition: parse_tree_nodes.h:2375
PT_create_table_option super
Definition: parse_tree_nodes.h:2373
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:2199
bool contextualize(Table_ddl_parse_context *pc) override
Definition: parse_tree_nodes.h:2204
PT_traceable_index_option(Option_type option_value)
Definition: parse_tree_nodes.h:2201
Option_type m_option_value
Definition: parse_tree_nodes.h:2211
Definition: parse_tree_nodes.h:1036
PT_transaction_characteristic super
Definition: parse_tree_nodes.h:1037
PT_transaction_access_mode(bool is_read_only)
Definition: parse_tree_nodes.h:1040
Definition: parse_tree_nodes.h:1023
int32 value
Definition: parse_tree_nodes.h:1027
PT_transaction_characteristic(const char *name_arg, int32 value_arg)
Definition: parse_tree_nodes.h:1030
Parse_tree_node super
Definition: parse_tree_nodes.h:1024
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:3862
const char * name
Definition: parse_tree_nodes.h:1026
Definition: parse_tree_nodes.h:1052
PT_transaction_characteristic * opt_tail
Definition: parse_tree_nodes.h:1056
PT_transaction_characteristics(PT_transaction_characteristic *head_arg, PT_transaction_characteristic *opt_tail_arg)
Definition: parse_tree_nodes.h:1059
PT_transaction_characteristic * head
Definition: parse_tree_nodes.h:1055
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.h:1063
Parse_tree_node super
Definition: parse_tree_nodes.h:1053
Definition: parse_tree_nodes.h:4747
Sql_cmd_truncate_table m_cmd_truncate_table
Definition: parse_tree_nodes.h:4756
Table_ident * m_table
Definition: parse_tree_nodes.h:4754
PT_truncate_table_stmt(Table_ident *table)
Definition: parse_tree_nodes.h:4749
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:3262
Base class for all column type nodes.
Definition: parse_tree_column_attrs.h:531
Definition: parse_tree_nodes.h:1683
PT_set_operation(PT_query_expression_body *lhs, bool is_distinct, PT_query_expression_body *rhs, bool is_rhs_in_parentheses=false)
Definition: parse_tree_nodes.h:1641
enum Setop_type type() const override
Definition: parse_tree_nodes.h:1689
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1710
Top-level node for the UPDATE statement.
Definition: parse_tree_nodes.h:1824
PT_with_clause * m_with_clause
Definition: parse_tree_nodes.h:1825
Item * opt_limit_clause
Definition: parse_tree_nodes.h:1834
Sql_cmd * make_cmd(THD *thd) override
Definition: parse_tree_nodes.cc:915
Mem_root_array_YY< PT_table_reference * > join_table_list
Definition: parse_tree_nodes.h:1829
PT_hint_list * opt_hints
Definition: parse_tree_nodes.h:1826
bool opt_ignore
Definition: parse_tree_nodes.h:1828
PT_item_list * value_list
Definition: parse_tree_nodes.h:1831
thr_lock_type opt_low_priority
Definition: parse_tree_nodes.h:1827
PT_update(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:1837
PT_item_list * column_list
Definition: parse_tree_nodes.h:1830
PT_order * opt_order_clause
Definition: parse_tree_nodes.h:1833
Item * opt_where_clause
Definition: parse_tree_nodes.h:1832
Parse tree node for a list of window definitions corresponding to a <window clause> in SQL 2003.
Definition: parse_tree_window.h:60
Represents the WITH clause: WITH [...], [...] SELECT ..., ^^^^^^^^^^^^^^^^^.
Definition: parse_tree_nodes.h:337
const Table_ref * m_most_inner_in_parsing
The innermost CTE reference which we're parsing at the moment.
Definition: parse_tree_nodes.h:378
PT_with_clause(const PT_with_list *l, bool r)
Definition: parse_tree_nodes.h:341
void print(const THD *thd, String *str, enum_query_type query_type)
Definition: parse_tree_nodes.cc:1964
void leave_parsing_definition(const Table_ref *old)
Definition: parse_tree_nodes.h:364
Parse_tree_node super
Definition: parse_tree_nodes.h:338
const PT_with_list *const m_list
All CTEs of this clause.
Definition: parse_tree_nodes.h:371
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:359
bool contextualize(Parse_context *pc) override
Definition: parse_tree_nodes.cc:1957
const bool m_recursive
True if the user has specified the RECURSIVE keyword.
Definition: parse_tree_nodes.h:373
Represents the WITH list.
Definition: parse_tree_nodes.h:317
Mem_root_array< PT_common_table_expr * > m_elements
Definition: parse_tree_nodes.h:329
PT_with_list(MEM_ROOT *mem_root)
Definition: parse_tree_nodes.h:322
Parse_tree_node super
Definition: parse_tree_nodes.h:318
bool push_back(PT_common_table_expr *el)
Definition: parse_tree_nodes.cc:1928
const Mem_root_array< PT_common_table_expr * > & elements() const
Definition: parse_tree_nodes.h:324
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:139
virtual bool contextualize(Context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_node_base.h:187
bool is_contextualized() const
Definition: parse_tree_node_base.h:176
void error(Context *pc, const POS &pos) const
syntax_error() function replacement for deferred reporting of syntax errors
Definition: parse_tree_node_base.h:206
Base class for all top-level nodes of SQL statements.
Definition: parse_tree_nodes.h:160
Parse_tree_root()=default
void operator=(const Parse_tree_root &)=delete
Parse_tree_root(const Parse_tree_root &)=delete
virtual ~Parse_tree_root()=default
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:1160
bool clear_correlated_query_blocks()
Empties all correlated query blocks defined within the query expression; that is, correlated CTEs def...
Definition: sql_union.cc:1633
Common base class for n-ary set operations, including unary.
Definition: query_term.h:402
Simple intrusive linked list.
Definition: sql_list.h:46
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:379
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:616
Sql_cmd_alter_user_default_role ALTER USER ... DEFAULT ROLE ... statement.
Definition: sql_admin.h:338
Histogram_command
Specifies which (if any) of the commands UPDATE HISTOGRAM or DROP HISTOGRAM that is specified after A...
Definition: sql_admin.h:70
Sql_cmd_create_role represetns the CREATE ROLE ... statement.
Definition: sql_admin.h:258
Definition: sql_cmd_srs.h:56
Represents ALTER TABLE IMPORT/DISCARD TABLESPACE statements.
Definition: sql_alter.h:627
Sql_cmd_drop_role represetns the DROP ROLE ... statement.
Definition: sql_admin.h:278
Definition: sql_cmd_srs.h:110
Definition: opt_explain.h:178
Definition: sql_load.h:47
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:640
Sql_cmd_set_role represetns the SET ROLE ... statement.
Definition: sql_admin.h:230
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 MASTER STATUS statement.
Definition: sql_show.h:442
Represents SHOW OPEN TABLES statement.
Definition: sql_show.h:451
Represents SHOW PLUGINS statement.
Definition: sql_show.h:458
Represents SHOW PRIVILEGES statement.
Definition: sql_show.h:465
Represents SHOW PROCESSLIST statement.
Definition: sql_show.h:473
Represents SHOW PROFILE statement.
Definition: sql_show.h:493
Represents SHOW PROFILES statement.
Definition: sql_show.h:500
Represents SHOW RELAYLOG EVENTS statement.
Definition: sql_show.h:508
Represents SHOW REPLICA STATUS statement.
Definition: sql_show.h:532
Represents SHOW REPLICAS statement.
Definition: sql_show.h:523
Represents SHOW FUNCTION CODE and SHOW PROCEDURE CODE statements.
Definition: sql_show.h:220
Represents SHOW STATUS FUNCTION statement.
Definition: sql_show.h:549
Represents SHOW STATUS PROCEDURE statement.
Definition: sql_show.h:556
Represents SHOW STATUS statement.
Definition: sql_show.h:541
Represents SHOW TABLE STATUS statement.
Definition: sql_show.h:563
Represents SHOW TABLES statement.
Definition: sql_show.h:571
Represents SHOW TRIGGERS statement.
Definition: sql_show.h:578
Represents SHOW VARIABLES statement.
Definition: sql_show.h:585
Represents SHOW WARNINGS statement.
Definition: sql_show.h:592
Sql_cmd_shutdown represents the SHUTDOWN statement.
Definition: sql_admin.h:219
Sql_cmd_truncate_table represents the TRUNCATE statement.
Definition: sql_truncate.h:44
Representation of an SQL command.
Definition: sql_cmd.h:65
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
LEX * lex
Definition: sql_class.h:981
Definition: sql_lex.h:294
Definition: table.h:2792
Represents the (explicit) window of a SQL 2003 section 7.11 <window clause>, or the implicit (inlined...
Definition: window.h:105
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:110
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:380
Definition: sp_head.h:120
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:110
const char * p
Definition: ctype-mb.cc:1237
enum_query_type
Query type constants (usable as bitmap flags).
Definition: enum_query_type.h:31
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
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:5722
bool lookup(Table_ref *tl, PT_common_table_expr **found)
Looks up a table reference into the list of CTEs.
Definition: sql_parse.cc:5822
bool match_table_ref(Table_ref *tl, bool in_self, bool *found)
Definition: sql_parse.cc:5903
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:2415
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:2553
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:2460
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:2608
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:2442
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:2451
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:2570
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:2623
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:2433
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:2397
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:2406
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:2424
static int flags[50]
Definition: hp_test1.cc:40
static void start(mysql_harness::PluginFuncEnv *env)
Definition: http_auth_backend_plugin.cc:177
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
#define STRING_WITH_LEN(X)
Definition: m_string.h:315
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:489
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:719
#define HA_OPTION_NO_PACK_KEYS
PACK_KEYS=0 option was specified.
Definition: my_base.h:662
#define HA_OPTION_CHECKSUM
CHECKSUM=1 option was specified.
Definition: my_base.h:647
#define HA_OPTION_NO_CHECKSUM
CHECKSUM=0 option was specified.
Definition: my_base.h:714
#define HA_OPTION_DELAY_KEY_WRITE
DELAY_KEY_WRITE=1 option was specified.
Definition: my_base.h:655
ha_key_alg
Definition: my_base.h:97
#define HA_OPTION_STATS_PERSISTENT
STATS_PERSISTENT=1 has been specified in the SQL command (either CREATE or ALTER TABLE).
Definition: my_base.h:687
ha_storage_media
Definition: my_base.h:115
#define HA_OPTION_PACK_KEYS
PACK_KEYS=1 option was specified.
Definition: my_base.h:615
#define HA_OPTION_NO_STATS_PERSISTENT
STATS_PERSISTENT=0 has been specified in CREATE/ALTER TABLE.
Definition: my_base.h:694
Some useful bit functions.
constexpr bool is_single_bit(IntType bits)
Determine if a single bit is set among some bits.
Definition: my_bit.h:137
Some integer typedefs for easier portability.
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_SLAVE_HOSTS
Definition: my_sqlcommand.h:120
@ SQLCOM_SHOW_CREATE_TRIGGER
Definition: my_sqlcommand.h:174
@ SQLCOM_SHOW_ENGINE_MUTEX
Definition: my_sqlcommand.h:66
@ 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_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_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_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_MASTER_STAT
Definition: my_sqlcommand.h:68
@ 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_SLAVE_STAT
Definition: my_sqlcommand.h:69
@ 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
static bool column_names
Definition: mysql.cc:160
char * user
Definition: mysqladmin.cc:60
static bool ignore_errors
Definition: mysqlcheck.cc:61
static uint verbose
Definition: mysqlcheck.cc:65
static char * path
Definition: mysqldump.cc:137
static char * where
Definition: mysqldump.cc:140
static longlong opt_ignore_lines
Definition: mysqlimport.cc:81
static Secondary_engine * secondary_engine
Definition: mysqltest.cc:249
static char * opt_db
Definition: mysqltest.cc:189
const char * collation
Definition: audit_api_message_emit.cc:184
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1057
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 str)
Definition: config_parser.cc:65
Definition: options.cc:49
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
EXPLAIN <command>.
Surrounding_context
Definition: parse_tree_node_base.h:97
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:148
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:4814
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:2464
#define TYPE_AND_REF(x)
Definition: parse_tree_nodes.h:2388
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:201
decltype(HA_CREATE_INFO::table_options) table_options_t
Definition: parse_tree_nodes.h:2501
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:2473
PT_index_option< ulong, &KEY_CREATE_INFO::block_size > PT_block_size
Definition: parse_tree_nodes.h:2215
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:4668
PT_set_operation * flatten_equal_set_ops(MEM_ROOT *mem_root, 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:5295
PT_index_option< LEX_CSTRING, &KEY_CREATE_INFO::comment > PT_index_comment
Definition: parse_tree_nodes.h:2217
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:2485
Mem_root_array_YY< PT_base_index_option * > Index_options
Definition: parse_tree_nodes.h:2214
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:2481
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:4794
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:5266
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:2477
PT_index_option< LEX_CSTRING, &KEY_CREATE_INFO::parser_name > PT_fulltext_index_parser_name
Definition: parse_tree_nodes.h:2219
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:4735
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:4689
Parse_tree_node_tmpl< Alter_tablespace_parse_context > PT_alter_tablespace_option_base
Definition: parse_tree_nodes.h:4935
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:2232
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:2499
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:4765
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:2489
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:4712
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:2494
PT_index_option< bool, &KEY_CREATE_INFO::is_visible > PT_index_visibility
Definition: parse_tree_nodes.h:2220
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:2469
olap_type
Definition: parser_yystype.h:179
On_duplicate
Definition: parser_yystype.h:242
Locked_row_action
We will static_cast this one to thr_lock_type.
Definition: parser_yystype.h:213
Lock_strength
Definition: parser_yystype.h:210
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:225
@ JTT_LEFT
Definition: parser_yystype.h:229
@ JTT_STRAIGHT_INNER
Definition: parser_yystype.h:232
@ JTT_NATURAL_LEFT
Definition: parser_yystype.h:234
@ JTT_NATURAL
Definition: parser_yystype.h:228
@ JTT_NATURAL_INNER
Definition: parser_yystype.h:233
@ JTT_NATURAL_RIGHT
Definition: parser_yystype.h:235
@ JTT_STRAIGHT
Definition: parser_yystype.h:227
@ JTT_RIGHT
Definition: parser_yystype.h:230
@ JTT_INNER
Definition: parser_yystype.h:226
Show_cmd_type
Definition: parser_yystype.h:260
Ternary_option
Definition: parser_yystype.h:240
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:90
@ OPT_GLOBAL
Definition: set_var.h:93
@ OPT_SESSION
Definition: set_var.h:92
#define HA_CREATE_USED_COMPRESS
COMPRESSION="zlib|lz4|none" used during table create.
Definition: handler.h:761
#define HA_CREATE_USED_CONNECTION
Definition: handler.h:728
#define HA_CREATE_USED_INSERT_METHOD
Definition: handler.h:713
#define HA_CREATE_USED_PACK_KEYS
Definition: handler.h:717
#define HA_CREATE_USED_DATADIR
Definition: handler.h:720
#define HA_CREATE_USED_KEY_BLOCK_SIZE
Definition: handler.h:729
#define HA_CREATE_USED_INDEXDIR
Definition: handler.h:721
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:803
#define HA_CREATE_USED_TABLESPACE
This is set whenever a 'TABLESPACE=...' phrase is used on CREATE TABLE.
Definition: handler.h:758
enum_tx_isolation
Definition: handler.h:3029
#define HA_CREATE_USED_ROW_FORMAT
Definition: handler.h:725
#define HA_CREATE_USED_ENCRYPT
ENCRYPTION="Y" used during table create.
Definition: handler.h:764
#define HA_CREATE_USED_DELAY_KEY_WRITE
Definition: handler.h:724
#define HA_CREATE_USED_MIN_ROWS
Definition: handler.h:714
#define HA_CREATE_USED_PASSWORD
Definition: handler.h:727
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:787
#define HA_CREATE_USED_COMMENT
Definition: handler.h:726
#define HA_CREATE_USED_MAX_ROWS
Definition: handler.h:715
#define HA_CREATE_USED_CHECKSUM
Definition: handler.h:723
#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:739
#define HA_CREATE_USED_AVG_ROW_LENGTH
Definition: handler.h:716
#define HA_CREATE_USED_AUTO
Definition: handler.h:710
alter_instance_action_enum
Definition: sql_admin.h:362
role_enum
Definition: sql_admin.h:225
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:33
Definition: parse_tree_nodes.h:4927
Alter_tablespace_parse_context(THD *thd)
Definition: parse_tree_nodes.cc:4566
THD *const thd
Definition: parse_tree_nodes.h:4928
MEM_ROOT *const mem_root
Definition: parse_tree_nodes.h:4929
Definition: m_ctype.h:385
Definition: parse_tree_nodes.h:2943
const LEX_STRING ident
Definition: parse_tree_nodes.h:2944
Dynamic_privilege(const LEX_STRING &ident, const Mem_root_array< LEX_CSTRING > *columns_arg)
Definition: parse_tree_nodes.h:2946
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:3634
uint flags
Definition: handler.h:3633
Struct to hold information about the table that should be created.
Definition: handler.h:3045
ulonglong auto_increment_value
Definition: handler.h:3084
bool m_transactional_ddl
Definition: handler.h:3122
enum row_type row_type
Row type of the table definition.
Definition: handler.h:3105
LEX_STRING compress
Algorithm (and possible options) to be used for InnoDB's transparent page compression.
Definition: handler.h:3061
LEX_STRING encrypt_type
This attribute is used for InnoDB's transparent page encryption.
Definition: handler.h:3069
ulong avg_row_length
Definition: handler.h:3086
const char * data_file_name
Definition: handler.h:3079
ulonglong m_implicit_tablespace_autoextend_size
Definition: handler.h:3127
ulong table_options
Definition: handler.h:3085
uint stats_sample_pages
Definition: handler.h:3091
uint merge_insert_method
Definition: handler.h:3108
LEX_STRING connect_string
Definition: handler.h:3049
const char * tablespace
Definition: handler.h:3051
ulonglong max_rows
Definition: handler.h:3082
const char * password
Definition: handler.h:3050
ha_storage_media storage_media
Definition: handler.h:3109
LEX_STRING comment
Definition: handler.h:3052
const char * index_file_name
Definition: handler.h:3080
std::uint32_t key_block_size
Definition: handler.h:3090
ulonglong min_rows
Definition: handler.h:3083
uint64_t used_fields
Definition: handler.h:3087
Definition: table.h:2659
Opt_hints_global * opt_hints_global
Definition: sql_lex.h:3793
Definition: parser_yystype.h:188
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
Definition: table.h:283
Item * item_initial
The initial ordering expression.
Definition: table.h:293
ORDER * next
Definition: table.h:287
enum_order direction
Definition: table.h:305
bool used_alias
Tells whether this ORDER element was referenced with an alias or with an expression,...
Definition: table.h:314
table_map used
Definition: table.h:326
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:121
THD *const thd
Current thread handler.
Definition: parse_tree_node_base.h:122
MEM_ROOT * mem_root
Current MEM_ROOT.
Definition: parse_tree_node_base.h:123
This class is used for representing both static and dynamic privileges on global as well as table and...
Definition: parse_tree_nodes.h:2925
const Mem_root_array< LEX_CSTRING > * columns
Definition: parse_tree_nodes.h:2929
Privilege(privilege_type type, const Mem_root_array< LEX_CSTRING > *columns)
Definition: parse_tree_nodes.h:2931
privilege_type
Definition: parse_tree_nodes.h:2926
@ STATIC
Definition: parse_tree_nodes.h:2926
@ DYNAMIC
Definition: parse_tree_nodes.h:2926
privilege_type type
Definition: parse_tree_nodes.h:2928
Info on properties that can be set with '–disable_X' and '–disable_X' commands.
Definition: mysqltest.cc:269
Definition: parse_tree_node_base.h:111
Definition: parser_yystype.h:197
Definition: sql_cmd_srs.h:41
Definition: parse_tree_nodes.h:2936
const uint grant
Definition: parse_tree_nodes.h:2937
Static_privilege(uint grant, const Mem_root_array< LEX_CSTRING > *columns_arg)
Definition: parse_tree_nodes.h:2939
Parse context for the table DDL (ALTER TABLE and CREATE TABLE) nodes.
Definition: parse_tree_nodes.h:190
HA_CREATE_INFO *const create_info
Definition: parse_tree_nodes.h:193
Alter_info *const alter_info
Definition: parse_tree_nodes.h:194
Table_ddl_parse_context(THD *thd_arg, Query_block *select_arg, Alter_info *alter_info)
Definition: parse_tree_nodes.cc:139
KEY_CREATE_INFO *const key_create_info
Definition: parse_tree_nodes.h:195
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:322
Bison "location" class.
Definition: parse_location.h:43
Definition: task.h:427
Explain_format_type
Values for explain_format sysvar.
Definition: system_variables.h:121
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
unsigned int uint
Definition: uca9-dump.cc:75
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