MySQL  8.0.17
Source Code Documentation
parse_tree_column_attrs.h
Go to the documentation of this file.
1 /* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License, version 2.0,
5  as published by the Free Software Foundation.
6 
7  This program is also distributed with certain software (including
8  but not limited to OpenSSL) that is licensed under separate terms,
9  as designated in a particular file or component or in included license
10  documentation. The authors of MySQL hereby grant you an additional
11  permission to link the program and your derivative works with the
12  separately licensed software that they have included with MySQL.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License, version 2.0, for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22 
23 #ifndef PARSE_TREE_COL_ATTRS_INCLUDED
24 #define PARSE_TREE_COL_ATTRS_INCLUDED
25 
26 #include <type_traits>
27 
28 #include "my_dbug.h"
29 #include "mysql/mysql_lex_string.h"
30 #include "mysql_com.h"
31 #include "nullable.h"
32 #include "sql/gis/srid.h"
33 #include "sql/item_timefunc.h"
35 #include "sql/sql_alter.h"
36 #include "sql/sql_check_constraint.h" // Sql_check_constraint_spec
37 #include "sql/sql_class.h"
38 #include "sql/sql_error.h"
39 #include "sql/sql_lex.h"
40 #include "sql/sql_parse.h"
41 
42 using Mysql::Nullable;
43 
44 /**
45  Parse context for column type attribyte specific parse tree nodes.
46 
47  For internal use in the contextualization code.
48 
49  @ingroup ptn_column_attrs ptn_gcol_attrs
50 */
52  const bool is_generated; ///< Owner column is a generated one.
53 
54  Column_parse_context(THD *thd_arg, SELECT_LEX *select_arg, bool is_generated)
55  : Parse_context(thd_arg, select_arg), is_generated(is_generated) {}
56 };
57 
58 /**
59  Base class for all column attributes in @SQL{CREATE/ALTER TABLE}
60 
61  @ingroup ptn_column_attrs ptn_gcol_attrs
62 */
63 class PT_column_attr_base : public Parse_tree_node_tmpl<Column_parse_context> {
64  protected:
66 
67  public:
69 
70  virtual void apply_type_flags(ulong *) const {}
71  virtual void apply_alter_info_flags(ulonglong *) const {}
72  virtual void apply_comment(LEX_CSTRING *) const {}
73  virtual void apply_default_value(Item **) const {}
75  virtual void apply_on_update_value(Item **) const {}
76  virtual void apply_srid_modifier(Nullable<gis::srid_t> *) const {}
77  virtual bool apply_collation(
78  Column_parse_context *, const CHARSET_INFO **to MY_ATTRIBUTE((unused)),
79  bool *has_explicit_collation MY_ATTRIBUTE((unused))) const {
80  return false;
81  }
82  virtual bool add_check_constraints(
83  Sql_check_constraint_spec_list *check_const_list MY_ATTRIBUTE((unused))) {
84  return false;
85  }
86 
87  /**
88  Check for the [NOT] ENFORCED characteristic.
89 
90  @returns true if the [NOT] ENFORCED follows the CHECK(...) clause,
91  false otherwise.
92  */
93  virtual bool has_constraint_enforcement() const { return false; }
94 
95  /**
96  Check if constraint is enforced.
97  Method must be called only when has_constraint_enforcement() is true (i.e
98  when [NOT] ENFORCED follows the CHECK(...) clause).
99 
100  @returns true if constraint is enforced.
101  false otherwise.
102  */
103  virtual bool is_constraint_enforced() const { return false; }
104 
105  /**
106  Update the ENFORCED/NOT ENFORCED state of the CHECK constraint.
107 
108  @param enforced true if ENFORCED, false if NOT ENFORCED.
109 
110  @returns false if success, true if error (e.g. if [NOT] ENFORCED follows
111  something other than the CHECK clause.)
112  */
114  bool enforced MY_ATTRIBUTE((unused))) {
115  return true; // error
116  }
117 };
118 
119 /**
120  Node for the @SQL{NULL} column attribute
121 
122  @ingroup ptn_column_attrs
123 */
125  public:
126  virtual void apply_type_flags(ulong *type_flags) const {
127  *type_flags &= ~NOT_NULL_FLAG;
128  *type_flags |= EXPLICIT_NULL_FLAG;
129  }
130 };
131 
132 /**
133  Node for the @SQL{NOT NULL} column attribute
134 
135  @ingroup ptn_column_attrs
136 */
138  virtual void apply_type_flags(ulong *type_flags) const {
139  *type_flags |= NOT_NULL_FLAG;
140  }
141 };
142 
143 /**
144  Node for the @SQL{NOT SECONDARY} column attribute
145 
146  @ingroup ptn_column_attrs
147 */
149  public:
150  void apply_type_flags(unsigned long *type_flags) const override {
151  *type_flags |= NOT_SECONDARY_FLAG;
152  }
153 };
154 
155 /**
156  Node for the @SQL{UNIQUE [KEY]} column attribute
157 
158  @ingroup ptn_column_attrs
159 */
161  public:
162  virtual void apply_type_flags(ulong *type_flags) const {
163  *type_flags |= UNIQUE_FLAG;
164  }
165 
166  virtual void apply_alter_info_flags(ulonglong *flags) const {
168  }
169 };
170 
171 /**
172  Node for the @SQL{PRIMARY [KEY]} column attribute
173 
174  @ingroup ptn_column_attrs
175 */
177  public:
178  virtual void apply_type_flags(ulong *type_flags) const {
179  *type_flags |= PRI_KEY_FLAG | NOT_NULL_FLAG;
180  }
181 
182  virtual void apply_alter_info_flags(ulonglong *flags) const {
184  }
185 };
186 
187 /**
188  Node for the @SQL{[CONSTRAINT [symbol]] CHECK '(' expr ')'} column attribute.
189 
190  @ingroup ptn_column_attrs
191 */
195 
196  public:
199  col_cc_spec.check_expr = expr;
200  }
201 
202  bool set_constraint_enforcement(bool enforced) override {
203  col_cc_spec.is_enforced = enforced;
204  return false;
205  }
206 
207  void apply_alter_info_flags(ulonglong *flags) const override {
209  }
210 
212  Sql_check_constraint_spec_list *check_const_list) override {
213  DBUG_ASSERT(check_const_list != nullptr);
214  return (check_const_list->push_back(&col_cc_spec));
215  }
216 
217  bool contextualize(Column_parse_context *pc) override {
218  return (super::contextualize(pc) ||
220  }
221 };
222 
223 /**
224  Node for the @SQL{[NOT] ENFORCED} column attribute.
225 
226  @ingroup ptn_column_attrs
227 */
229  public:
230  explicit PT_constraint_enforcement_attr(bool enforced)
231  : m_enforced(enforced) {}
232 
233  bool has_constraint_enforcement() const override { return true; }
234 
235  bool is_constraint_enforced() const override { return m_enforced; }
236 
237  private:
238  const bool m_enforced;
239 };
240 
241 /**
242  Node for the @SQL{COMMENT @<comment@>} column attribute
243 
244  @ingroup ptn_column_attrs
245 */
248 
249  public:
251  : comment(comment) {}
252 
253  virtual void apply_comment(LEX_CSTRING *to) const { *to = comment; }
254 };
255 
256 /**
257  Node for the @SQL{COLLATE @<collation@>} column attribute
258 
259  @ingroup ptn_column_attrs
260 */
262  public:
263  explicit PT_collate_column_attr(const POS &pos, const CHARSET_INFO *collation)
264  : m_pos(pos), m_collation(collation) {
265  DBUG_ASSERT(m_collation != nullptr);
266  }
267 
269  bool *has_explicit_collation) const override {
270  if (*has_explicit_collation) {
271  pc->thd->syntax_error_at(m_pos, ER_INVALID_MULTIPLE_CLAUSES, "COLLATE");
272  return true;
273  }
274  *has_explicit_collation = true;
275  return merge_charset_and_collation(*to, m_collation, to);
276  }
277 
278  private:
279  const POS m_pos;
280  const CHARSET_INFO *const m_collation;
281 };
282 
283 // Specific to non-generated columns only:
284 
285 /**
286  Node for the @SQL{DEFAULT @<expression@>} column attribute
287 
288  @ingroup ptn_not_gcol_attr
289 */
292 
294 
295  public:
297  virtual void apply_default_value(Item **value) const { *value = item; }
298 
300  if (pc->is_generated) {
301  my_error(ER_WRONG_USAGE, MYF(0), "DEFAULT", "generated column");
302  return true;
303  }
304  return super::contextualize(pc) || item->itemize(pc, &item);
305  }
306  virtual void apply_type_flags(ulong *type_flags) const {
307  if (item->type() == Item::NULL_ITEM) *type_flags |= EXPLICIT_NULL_FLAG;
308  }
309 };
310 
311 /**
312  Node for the @SQL{UPDATE NOW[([@<precision@>])]} column attribute
313 
314  @ingroup ptn_not_gcol_attr
315 */
318 
321 
322  public:
324  virtual void apply_on_update_value(Item **value) const { *value = item; }
325 
327  if (pc->is_generated) {
328  my_error(ER_WRONG_USAGE, MYF(0), "ON UPDATE", "generated column");
329  return true;
330  }
331  if (super::contextualize(pc)) return true;
332 
334  return item == NULL;
335  }
336 };
337 
338 /**
339  Node for the @SQL{AUTO_INCREMENT} column attribute
340 
341  @ingroup ptn_not_gcol_attr
342 */
345 
346  public:
347  virtual void apply_type_flags(ulong *type_flags) const {
348  *type_flags |= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG;
349  }
351  if (pc->is_generated) {
352  my_error(ER_WRONG_USAGE, MYF(0), "AUTO_INCREMENT", "generated column");
353  return true;
354  }
355  return super::contextualize(pc);
356  }
357 };
358 
359 /**
360  Node for the @SQL{SERIAL DEFAULT VALUE} column attribute
361 
362  @ingroup ptn_not_gcol_attr
363 */
366 
367  public:
368  virtual void apply_type_flags(ulong *type_flags) const {
369  *type_flags |= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG;
370  }
371  virtual void apply_alter_info_flags(ulonglong *flags) const {
373  }
375  if (pc->is_generated) {
376  my_error(ER_WRONG_USAGE, MYF(0), "SERIAL DEFAULT VALUE",
377  "generated column");
378  return true;
379  }
380  return super::contextualize(pc);
381  }
382 };
383 
384 /**
385  Node for the @SQL{COLUMN_FORMAT @<DEFAULT|FIXED|DYNAMIC@>} column attribute
386 
387  @ingroup ptn_not_gcol_attr
388 */
391 
393 
394  public:
396  : format(format) {}
397 
398  virtual void apply_type_flags(ulong *type_flags) const {
399  *type_flags &= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
400  *type_flags |= format << FIELD_FLAGS_COLUMN_FORMAT;
401  }
403  if (pc->is_generated) {
404  my_error(ER_WRONG_USAGE, MYF(0), "COLUMN_FORMAT", "generated column");
405  return true;
406  }
407  return super::contextualize(pc);
408  }
409 };
410 
411 /**
412  Node for the @SQL{STORAGE @<DEFAULT|DISK|MEMORY@>} column attribute
413 
414  @ingroup ptn_not_gcol_attr
415 */
418 
420 
421  public:
423  : media(media) {}
424 
425  virtual void apply_type_flags(ulong *type_flags) const {
426  *type_flags &= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
427  *type_flags |= media << FIELD_FLAGS_STORAGE_MEDIA;
428  }
430  if (pc->is_generated) {
431  my_error(ER_WRONG_USAGE, MYF(0), "STORAGE", "generated column");
432  return true;
433  }
434  return super::contextualize(pc);
435  }
436 };
437 
438 /// Node for the SRID column attribute
441 
443 
444  public:
445  explicit PT_srid_column_attr(gis::srid_t srid) : m_srid(srid) {}
446 
447  void apply_srid_modifier(Nullable<gis::srid_t> *srid) const override {
448  *srid = m_srid;
449  }
450 };
451 
452 /// Node for the generated default value, column attribute
455 
456  public:
460  }
461 
463  Value_generator **default_value_expression) override {
464  *default_value_expression = &m_default_value_expression;
465  }
466 
467  bool contextualize(Column_parse_context *pc) override {
468  // GC and default value expressions are mutually exclusive and thus only
469  // one is allowed to be present on the same column definition.
470  if (pc->is_generated) {
471  my_error(ER_WRONG_USAGE, MYF(0), "DEFAULT", "generated column");
472  return true;
473  }
474  Parse_context expr_pc(pc->thd, pc->select);
475  return super::contextualize(pc) ||
478  }
479 
480  private:
482 };
483 
484 // Type nodes:
485 
486 /**
487  Base class for all column type nodes
488 
489  @ingroup ptn_column_types
490 */
491 class PT_type : public Parse_tree_node {
492  public:
494 
495  protected:
497 
498  public:
499  virtual ulong get_type_flags() const { return 0; }
500  virtual const char *get_length() const { return NULL; }
501  virtual const char *get_dec() const { return NULL; }
502  virtual const CHARSET_INFO *get_charset() const { return NULL; }
503  virtual uint get_uint_geom_type() const { return 0; }
504  virtual List<String> *get_interval_list() const { return NULL; }
505 };
506 
507 /**
508  Node for numeric types
509 
510  Type list:
511  * NUMERIC, REAL, DOUBLE, DECIMAL and FIXED,
512  * INTEGER, INT, INT1, INT2, INT3, INT4, TINYINT, SMALLINT, MEDIUMINT and
513  BIGINT.
514 
515  @ingroup ptn_column_types
516 */
517 class PT_numeric_type : public PT_type {
518  const char *length;
519  const char *dec;
521 
523 
524  public:
525  PT_numeric_type(THD *thd, Numeric_type type_arg, const char *length,
526  const char *dec, ulong options)
527  : PT_type(static_cast<Parent_type>(type_arg)),
528  length(length),
529  dec(dec),
530  options(options) {
532 
533  if (type_arg != Numeric_type::DECIMAL && dec != nullptr) {
535  ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT,
536  ER_THD(thd, ER_WARN_DEPRECATED_FLOAT_DIGITS));
537  }
538  if (options & UNSIGNED_FLAG) {
540  ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT,
541  ER_THD(thd, ER_WARN_DEPRECATED_FLOAT_UNSIGNED));
542  }
543  }
544  PT_numeric_type(THD *thd, Int_type type_arg, const char *length,
545  ulong options)
546  : PT_type(static_cast<enum_field_types>(type_arg)),
547  length(length),
548  dec(0),
549  options(options) {
551 
552  if (length != nullptr) {
554  ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT,
555  ER_THD(thd, ER_WARN_DEPRECATED_INTEGER_DISPLAY_WIDTH));
556  }
557  }
558 
559  virtual ulong get_type_flags() const {
561  }
562  virtual const char *get_length() const { return length; }
563  virtual const char *get_dec() const { return dec; }
564 };
565 
566 /**
567  Node for the BIT type
568 
569  @ingroup ptn_column_types
570 */
571 class PT_bit_type : public PT_type {
572  const char *length;
573 
574  public:
576  explicit PT_bit_type(const char *length)
578 
579  virtual const char *get_length() const { return length; }
580 };
581 
582 /**
583  Node for the BOOL/BOOLEAN type
584 
585  @ingroup ptn_column_types
586 */
587 class PT_boolean_type : public PT_type {
588  public:
590  virtual const char *get_length() const { return "1"; }
591 };
592 
593 enum class Char_type : ulong {
597 };
598 
599 class PT_char_type : public PT_type {
600  const char *length;
602  const bool force_binary;
603 
605 
606  public:
607  PT_char_type(Char_type char_type, const char *length,
608  const CHARSET_INFO *charset, bool force_binary = false)
609  : PT_type(static_cast<Parent_type>(char_type)),
610  length(length),
611  charset(charset),
614  }
616  bool force_binary = false)
617  : PT_char_type(char_type, "1", charset, force_binary) {}
618  virtual ulong get_type_flags() const {
619  return force_binary ? BINCMP_FLAG : 0;
620  }
621  virtual const char *get_length() const { return length; }
622  virtual const CHARSET_INFO *get_charset() const { return charset; }
623 };
624 
625 enum class Blob_type {
629 };
630 
631 /**
632  Node for BLOB types
633 
634  Types: BLOB, TINYBLOB, MEDIUMBLOB, LONGBLOB, LONG, LONG VARBINARY,
635  LONG VARCHAR, TEXT, TINYTEXT, MEDIUMTEXT, LONGTEXT.
636 
637  @ingroup ptn_column_types
638 */
639 class PT_blob_type : public PT_type {
640  const char *length;
642  const bool force_binary;
643 
645 
646  public:
648  bool force_binary = false)
649  : PT_type(static_cast<Parent_type>(blob_type)),
650  length(NULL),
651  charset(charset),
654  }
655  explicit PT_blob_type(const char *length)
657  length(length),
659  force_binary(false) {}
660 
661  virtual ulong get_type_flags() const {
662  return force_binary ? BINCMP_FLAG : 0;
663  }
664  virtual const CHARSET_INFO *get_charset() const { return charset; }
665  virtual const char *get_length() const { return length; }
666 };
667 
668 /**
669  Node for the YEAR type
670 
671  @ingroup ptn_column_types
672 */
673 class PT_year_type : public PT_type {
674  public:
676 };
677 
678 /**
679  Node for the DATE type
680 
681  @ingroup ptn_column_types
682 */
683 class PT_date_type : public PT_type {
684  public:
686 };
687 
688 enum class Time_type : ulong {
691 };
692 
693 /**
694  Node for the TIME, TIMESTAMP and DATETIME types
695 
696  @ingroup ptn_column_types
697 */
698 class PT_time_type : public PT_type {
699  const char *dec;
700 
702 
703  public:
704  PT_time_type(Time_type time_type, const char *dec)
705  : PT_type(static_cast<Parent_type>(time_type)), dec(dec) {}
706 
707  virtual const char *get_dec() const { return dec; }
708 };
709 
710 /**
711  Node for the TIMESTAMP type
712 
713  @ingroup ptn_column_types
714 */
715 class PT_timestamp_type : public PT_type {
716  typedef PT_type super;
717 
718  const char *dec;
720 
721  public:
722  explicit PT_timestamp_type(const char *dec)
724 
725  virtual const char *get_dec() const { return dec; }
726  virtual ulong get_type_flags() const { return type_flags; }
727 
728  virtual bool contextualize(Parse_context *pc) {
729  if (super::contextualize(pc)) return true;
730  /*
731  TIMESTAMP fields are NOT NULL by default, unless the variable
732  explicit_defaults_for_timestamp is true.
733  */
736  /*
737  To flag the current statement as dependent for binary
738  logging on the session var. Extra copying to Lex is
739  done in case prepared stmt.
740  */
743 
744  return false;
745  }
746 };
747 
748 /**
749  Node for spatial types
750 
751  Types: GEOMETRY, GEOMCOLLECTION/GEOMETRYCOLLECTION, POINT, MULTIPOINT,
752  LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON
753 
754  @ingroup ptn_column_types
755 */
756 class PT_spacial_type : public PT_type {
758 
759  public:
762 
763  virtual const CHARSET_INFO *get_charset() const { return &my_charset_bin; }
764  virtual uint get_uint_geom_type() const { return geo_type; }
765  virtual const char *get_length() const { return NULL; }
766 };
767 
769 
770 template <Enum_type enum_type>
771 class PT_enum_type_tmpl : public PT_type {
774  const bool force_binary;
775 
777 
778  public:
780  bool force_binary)
781  : PT_type(static_cast<Parent_type>(enum_type)),
783  charset(charset),
786  }
787 
788  virtual const CHARSET_INFO *get_charset() const { return charset; }
789  virtual ulong get_type_flags() const {
790  return force_binary ? BINCMP_FLAG : 0;
791  }
792  virtual List<String> *get_interval_list() const { return interval_list; }
793 };
794 
795 /**
796  Node for the ENUM type
797 
798  @ingroup ptn_column_types
799 */
801 
802 /**
803  Node for the SET type
804 
805  @ingroup ptn_column_types
806 */
808 
809 class PT_serial_type : public PT_type {
810  public:
812 
813  virtual ulong get_type_flags() const {
815  }
816 };
817 
818 /**
819  Node for the JSON type
820 
821  @ingroup ptn_column_types
822 */
823 class PT_json_type : public PT_type {
824  public:
826  virtual const CHARSET_INFO *get_charset() const { return &my_charset_bin; }
827 };
828 
829 /**
830  Base class for both generated and regular column definitions
831 
832  @ingroup ptn_create_table
833 */
837 
838  public:
841  const char *length;
842  const char *dec;
852  /// Holds the expression to generate default values
855  // List of column check constraint's specification.
857 
858  protected:
860 
863  alter_info_flags(0),
867  gcol_info(NULL),
868  default_val_info(nullptr),
869  type_node(type_node) {}
870 
871  public:
872  virtual bool contextualize(Parse_context *pc) {
873  if (super::contextualize(pc) || type_node->contextualize(pc)) return true;
874 
875  type = type_node->type;
878  dec = type_node->get_dec();
882  check_const_spec_list = new (pc->thd->mem_root)
884  if (check_const_spec_list == nullptr) return true; // OOM
885  return false;
886  }
887 
888  protected:
889  template <class T>
891  Mem_root_array<T *> *attrs) {
892  if (attrs != NULL) {
893  for (auto attr : *attrs) {
894  if (attr->contextualize(pc)) return true;
895  attr->apply_type_flags(&type_flags);
896  attr->apply_alter_info_flags(&alter_info_flags);
897  attr->apply_comment(&comment);
898  attr->apply_default_value(&default_value);
899  attr->apply_gen_default_value(&default_val_info);
900  attr->apply_on_update_value(&on_update_value);
901  attr->apply_srid_modifier(&m_srid);
902  if (attr->apply_collation(pc, &charset, &has_explicit_collation))
903  return true;
904  if (attr->add_check_constraints(check_const_spec_list)) return true;
905  }
906  }
907  return false;
908  }
909 };
910 
911 /**
912  Base class for regular (non-generated) column definition nodes
913 
914  @ingroup ptn_create_table
915 */
918 
920 
921  public:
922  PT_field_def(PT_type *type_node_arg,
924  : super(type_node_arg), opt_attrs(opt_attrs) {}
925 
926  virtual bool contextualize(Parse_context *pc_arg) {
927  Column_parse_context pc(pc_arg->thd, pc_arg->select, false);
929  }
930 };
931 
932 /**
933  Base class for generated column definition nodes
934 
935  @ingroup ptn_create_table
936 */
939 
943 
944  public:
948  : super(type_node_arg),
950  expr(expr),
951  opt_attrs(opt_attrs) {}
952 
953  virtual bool contextualize(Parse_context *pc_arg) {
954  Column_parse_context pc(pc_arg->thd, pc_arg->select, true);
956  expr->itemize(&pc, &expr))
957  return true;
958 
960  if (gcol_info == NULL) return true; // OOM
965 
966  return false;
967  }
968 };
969 
970 #endif /* PARSE_TREE_COL_ATTRS_INCLUDED */
virtual bool contextualize(Column_parse_context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:374
unsigned long long int ulonglong
Definition: my_inttypes.h:74
virtual bool itemize(Parse_context *pc, Item **res)
The same as contextualize()/contextualize_() but with additional parameter.
Definition: item.cc:587
Node for spatial types.
Definition: parse_tree_column_attrs.h:756
virtual const CHARSET_INFO * get_charset() const
Definition: parse_tree_column_attrs.h:826
void set_field_stored(bool stored)
Definition: field.h:655
Node for the SERIAL DEFAULT VALUE column attribute.
Definition: parse_tree_column_attrs.h:364
MEM_ROOT * mem_root
Current MEM_ROOT.
Definition: parse_tree_node_base.h:101
virtual const char * get_dec() const
Definition: parse_tree_column_attrs.h:707
Internal to MySQL.
Definition: field_types.h:75
std::uint32_t srid_t
A spatial reference system ID (SRID).
Definition: srid.h:32
const char * length
Definition: parse_tree_column_attrs.h:600
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:417
#define NOT_SECONDARY_FLAG
Field will not be loaded in secondary engine.
Definition: mysql_com.h:187
Definition: field_types.h:74
t pos
Definition: dbug_analyze.cc:148
std::remove_const< decltype(PT_type::type)>::type Parent_type
Definition: parse_tree_column_attrs.h:701
std::remove_const< decltype(PT_type::type)>::type Parent_type
Definition: parse_tree_column_attrs.h:522
std::remove_const< decltype(PT_type::type)>::type Parent_type
Definition: parse_tree_column_attrs.h:644
const Virtual_or_stored virtual_or_stored
Definition: parse_tree_column_attrs.h:940
const char * length
Definition: parse_tree_column_attrs.h:640
Node for BLOB types.
Definition: parse_tree_column_attrs.h:639
bool merge_charset_and_collation(const CHARSET_INFO *charset, const CHARSET_INFO *collation, const CHARSET_INFO **to)
(end of group Runtime_Environment)
Definition: sql_parse.cc:7124
PT_spacial_type(Field::geometry_type geo_type)
Definition: parse_tree_column_attrs.h:760
Definition: mysql_lex_string.h:34
PT_serial_type()
Definition: parse_tree_column_attrs.h:811
#define ZEROFILL_FLAG
Field is zerofill.
Definition: mysql_com.h:146
virtual ulong get_type_flags() const
Definition: parse_tree_column_attrs.h:726
Node for the AUTO_INCREMENT column attribute.
Definition: parse_tree_column_attrs.h:343
PT_enum_type_tmpl< Enum_type::ENUM > PT_enum_type
Node for the ENUM type.
Definition: parse_tree_column_attrs.h:800
Node for the COMMENT <comment> column attribute.
Definition: parse_tree_column_attrs.h:246
const bool is_generated
Owner column is a generated one.
Definition: parse_tree_column_attrs.h:52
SELECT_LEX * select
Current SELECT_LEX object.
Definition: parse_tree_node_base.h:102
Item * on_update_value
Definition: parse_tree_column_attrs.h:850
Node for the BOOL/BOOLEAN type.
Definition: parse_tree_column_attrs.h:587
const string name("\ame\)
#define FIELD_FLAGS_STORAGE_MEDIA
Field storage media, bit 22-23.
Definition: mysql_com.h:172
Internal to MySQL.
Definition: field_types.h:76
Node for the COLLATE <collation> column attribute.
Definition: parse_tree_column_attrs.h:261
Mem_root_array< PT_column_attr_base * > * opt_attrs
Definition: parse_tree_column_attrs.h:919
Value_generator * default_val_info
Holds the expression to generate default values.
Definition: parse_tree_column_attrs.h:853
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:215
virtual List< String > * get_interval_list() const
Definition: parse_tree_column_attrs.h:792
std::remove_const< decltype(PT_type::type)>::type Parent_type
Definition: parse_tree_column_attrs.h:604
virtual void apply_alter_info_flags(ulonglong *flags) const
Definition: parse_tree_column_attrs.h:182
Class to represent the check constraint specifications obtained from the SQL statement parse...
Definition: sql_check_constraint.h:42
Char_type
Definition: parse_tree_column_attrs.h:593
virtual void apply_alter_info_flags(ulonglong *flags) const
Definition: parse_tree_column_attrs.h:166
Item * check_expr
Check constraint expression.
Definition: sql_check_constraint.h:91
const CHARSET_INFO * charset
Definition: parse_tree_column_attrs.h:641
Node for the UNIQUE [KEY] column attribute.
Definition: parse_tree_column_attrs.h:160
const char * length
Definition: parse_tree_column_attrs.h:841
virtual const char * get_length() const
Definition: parse_tree_column_attrs.h:500
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:178
virtual bool set_constraint_enforcement(bool enforced)
Update the ENFORCED/NOT ENFORCED state of the CHECK constraint.
Definition: parse_tree_column_attrs.h:113
PT_type(enum_field_types type)
Definition: parse_tree_column_attrs.h:496
PT_json_type()
Definition: parse_tree_column_attrs.h:825
This class represents a query block, aka a query specification, which is a query consisting of a SELE...
Definition: sql_lex.h:847
Definition: parse_tree_column_attrs.h:599
Node for the SRID column attribute.
Definition: parse_tree_column_attrs.h:439
#define EXPLICIT_NULL_FLAG
Field is explicitly specified as \ NULL by the user.
Definition: mysql_com.h:177
bool is_enforced
Check constraint state (enforced/not enforced)
Definition: sql_check_constraint.h:97
Definition: field_types.h:80
struct System_variables variables
Definition: sql_class.h:956
Time_type
Definition: parse_tree_column_attrs.h:688
bool contextualize(Column_parse_context *pc) override
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:217
Item * item
Definition: parse_tree_column_attrs.h:320
Int_type
Definition: parser_yystype.h:151
virtual bool is_constraint_enforced() const
Check if constraint is enforced.
Definition: parse_tree_column_attrs.h:103
Virtual_or_stored
Definition: parser_yystype.h:149
void apply_srid_modifier(Nullable< gis::srid_t > *srid) const override
Definition: parse_tree_column_attrs.h:447
Node for the COLUMN_FORMAT <DEFAULT|FIXED|DYNAMIC> column attribute.
Definition: parse_tree_column_attrs.h:389
void push_warning(THD *thd, Sql_condition::enum_severity_level severity, uint code, const char *message_text)
Push the warning to error list if there is still room in the list.
Definition: sql_error.cc:659
Definition: mysql_lex_string.h:39
Sergei Dialog Client Authentication NULL
Definition: dialog.cc:352
const char * dec
Definition: parse_tree_column_attrs.h:842
virtual bool contextualize(Column_parse_context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:326
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:291
gis::srid_t m_srid
Definition: parse_tree_column_attrs.h:442
virtual bool contextualize(Column_parse_context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:429
Sql_check_constraint_spec col_cc_spec
Definition: parse_tree_column_attrs.h:194
PT_comment_column_attr(const LEX_CSTRING &comment)
Definition: parse_tree_column_attrs.h:250
const LEX_CSTRING comment
Definition: parse_tree_column_attrs.h:247
virtual bool contextualize(Parse_context *pc_arg)
Definition: parse_tree_column_attrs.h:953
PT_year_type()
Definition: parse_tree_column_attrs.h:675
Definition: field_types.h:82
virtual bool has_constraint_enforcement() const
Check for the [NOT] ENFORCED characteristic.
Definition: parse_tree_column_attrs.h:93
PT_check_constraint_column_attr(LEX_STRING &name, Item *expr)
Definition: parse_tree_column_attrs.h:197
PT_field_def_base(PT_type *type_node)
Definition: parse_tree_column_attrs.h:861
Base class for all column type nodes.
Definition: parse_tree_column_attrs.h:491
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:425
const CHARSET_INFO * charset
Definition: parse_tree_column_attrs.h:601
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:126
decltype(Alter_info::flags) typedef alter_info_flags_t
Definition: parse_tree_column_attrs.h:68
Node for the [CONSTRAINT [symbol]] CHECK &#39;(&#39; expr &#39;)&#39; column attribute.
Definition: parse_tree_column_attrs.h:192
virtual void apply_default_value(Item **value) const
Definition: parse_tree_column_attrs.h:297
virtual ulong get_type_flags() const
Definition: parse_tree_column_attrs.h:789
virtual bool contextualize(Column_parse_context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:299
Node for the STORAGE <DEFAULT|DISK|MEMORY> column attribute.
Definition: parse_tree_column_attrs.h:416
virtual ulong get_type_flags() const
Definition: parse_tree_column_attrs.h:559
Node for the NOT SECONDARY column attribute.
Definition: parse_tree_column_attrs.h:148
virtual void apply_alter_info_flags(ulonglong *flags) const
Definition: parse_tree_column_attrs.h:371
Column_parse_context(THD *thd_arg, SELECT_LEX *select_arg, bool is_generated)
Definition: parse_tree_column_attrs.h:54
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:368
Node for the DATE type.
Definition: parse_tree_column_attrs.h:683
Definition: field_types.h:85
const bool force_binary
Definition: parse_tree_column_attrs.h:602
enum_field_types type
Definition: parse_tree_column_attrs.h:839
virtual bool add_check_constraints(Sql_check_constraint_spec_list *check_const_list)
Definition: parse_tree_column_attrs.h:82
virtual const char * get_dec() const
Definition: parse_tree_column_attrs.h:501
const uint8 precision
Definition: parse_tree_column_attrs.h:319
virtual void apply_default_value(Item **) const
Definition: parse_tree_column_attrs.h:73
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:193
#define AUTO_INCREMENT_FLAG
field is a autoincrement field
Definition: mysql_com.h:151
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:306
Base class for all column attributes in CREATE/ALTER TABLE
Definition: parse_tree_column_attrs.h:63
PT_field_def(PT_type *type_node_arg, Mem_root_array< PT_column_attr_base *> *opt_attrs)
Definition: parse_tree_column_attrs.h:922
bool contextualize(Column_parse_context *pc) override
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:467
Set for ADD INDEX | ADD KEY | ADD PRIMARY KEY | ADD UNIQUE KEY | ADD UNIQUE INDEX | ALTER ADD [COLUMN...
Definition: sql_alter.h:212
PT_srid_column_attr(gis::srid_t srid)
Definition: parse_tree_column_attrs.h:445
virtual void apply_on_update_value(Item **value) const
Definition: parse_tree_column_attrs.h:324
Common definition between mysql server & client.
Node for the NULL column attribute.
Definition: parse_tree_column_attrs.h:124
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:390
PT_field_def_base super
Definition: parse_tree_column_attrs.h:938
PT_boolean_type()
Definition: parse_tree_column_attrs.h:589
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:138
Definition: field_types.h:65
const char * length
Definition: parse_tree_column_attrs.h:572
Base class for generated column definition nodes.
Definition: parse_tree_column_attrs.h:937
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:440
List< String > * interval_list
Definition: parse_tree_column_attrs.h:846
Definition: parse_tree_column_attrs.h:771
PT_default_column_attr(Item *item)
Definition: parse_tree_column_attrs.h:296
virtual void apply_type_flags(ulong *) const
Definition: parse_tree_column_attrs.h:70
virtual ulong get_type_flags() const
Definition: parse_tree_column_attrs.h:618
virtual bool contextualize(Parse_context *pc_arg)
Definition: parse_tree_column_attrs.h:926
Value_generator m_default_value_expression
Definition: parse_tree_column_attrs.h:481
Item * item
Definition: parse_tree_column_attrs.h:293
Definition: item.h:710
Used for replication only.
Definition: field_types.h:78
virtual const char * get_length() const
Definition: parse_tree_column_attrs.h:621
PT_bit_type(const char *length)
Definition: parse_tree_column_attrs.h:576
Definition: field_types.h:81
virtual const char * get_length() const
Definition: parse_tree_column_attrs.h:765
PT_generated_default_val_column_attr(Item *expr)
Definition: parse_tree_column_attrs.h:457
#define DBUG_ASSERT(A)
Definition: my_dbug.h:183
virtual const char * get_dec() const
Definition: parse_tree_column_attrs.h:725
virtual ulong get_type_flags() const
Definition: parse_tree_column_attrs.h:661
const bool force_binary
Definition: parse_tree_column_attrs.h:642
virtual bool contextualize(Column_parse_context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:402
virtual void apply_gen_default_value(Value_generator **)
Definition: parse_tree_column_attrs.h:74
virtual const CHARSET_INFO * get_charset() const
Definition: parse_tree_column_attrs.h:788
PT_time_type(Time_type time_type, const char *dec)
Definition: parse_tree_column_attrs.h:704
virtual const CHARSET_INFO * get_charset() const
Definition: parse_tree_column_attrs.h:622
#define FIELD_FLAGS_COLUMN_FORMAT
Field column format, bit 24-25.
Definition: mysql_com.h:174
ulong options
Definition: parse_tree_column_attrs.h:520
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:162
Class for storing value or NULL value.
Definition: nullable.h:40
Bison "location" class.
Definition: parse_location.h:43
PT_bit_type()
Definition: parse_tree_column_attrs.h:575
Node for the YEAR type.
Definition: parse_tree_column_attrs.h:673
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:344
PT_generated_field_def(PT_type *type_node_arg, Item *expr, Virtual_or_stored virtual_or_stored, Mem_root_array< PT_column_attr_base *> *opt_attrs)
Definition: parse_tree_column_attrs.h:945
bool contextualize_attrs(Column_parse_context *pc, Mem_root_array< T *> *attrs)
Definition: parse_tree_column_attrs.h:890
const CHARSET_INFO * charset
Definition: parse_tree_column_attrs.h:843
Node for numeric types.
Definition: parse_tree_column_attrs.h:517
const char * dec
Definition: parse_tree_column_attrs.h:699
column_format_type format
Definition: parse_tree_column_attrs.h:392
virtual const CHARSET_INFO * get_charset() const
Definition: parse_tree_column_attrs.h:502
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:347
const CHARSET_INFO *const m_collation
Definition: parse_tree_column_attrs.h:280
virtual bool contextualize(Column_parse_context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_column_attrs.h:350
const char * dec
Definition: parse_tree_column_attrs.h:718
Field::geometry_type geo_type
Definition: parse_tree_column_attrs.h:757
Parse context for column type attribyte specific parse tree nodes.
Definition: parse_tree_column_attrs.h:51
ha_storage_media
Definition: my_base.h:114
Node for the BIT type.
Definition: parse_tree_column_attrs.h:571
Set for add check constraint.
Definition: sql_alter.h:302
Definition: field_types.h:73
Node for the UPDATE NOW[([<precision>])] column attribute.
Definition: parse_tree_column_attrs.h:316
ha_storage_media media
Definition: parse_tree_column_attrs.h:419
enum_field_types
Column types for MySQL.
Definition: field_types.h:52
Node for the generated default value, column attribute.
Definition: parse_tree_column_attrs.h:453
#define UNSIGNED_FLAG
Field is unsigned.
Definition: mysql_com.h:145
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:454
Definition: item.h:666
unsigned int uint
Definition: uca-dump.cc:29
Base class for parse tree nodes (excluding the Parse_tree_root hierarchy)
Definition: parse_tree_node_base.h:111
THD *const thd
Current thread handler.
Definition: parse_tree_node_base.h:100
Definition: field_types.h:87
virtual uint get_uint_geom_type() const
Definition: parse_tree_column_attrs.h:764
#define MYF(v)
Definition: my_inttypes.h:124
ulonglong flags
Definition: sql_alter.h:391
virtual void apply_comment(LEX_CSTRING *) const
Definition: parse_tree_column_attrs.h:72
virtual const char * get_length() const
Definition: parse_tree_column_attrs.h:562
bool set_constraint_enforcement(bool enforced) override
Update the ENFORCED/NOT ENFORCED state of the CHECK constraint.
Definition: parse_tree_column_attrs.h:202
bool binlog_need_explicit_defaults_ts
Definition: sql_lex.h:3430
Parse_tree_node super
Definition: parse_tree_column_attrs.h:835
Node for the TIMESTAMP type.
Definition: parse_tree_column_attrs.h:715
#define FIELD_FLAGS_STORAGE_MEDIA_MASK
Definition: mysql_com.h:173
Definition: parse_tree_column_attrs.h:809
Mem_root_array< PT_column_attr_base * > * opt_attrs
Definition: parse_tree_column_attrs.h:942
PT_timestamp_type(const char *dec)
Definition: parse_tree_column_attrs.h:722
const char * dec
Definition: parse_tree_column_attrs.h:519
Value_generator * gcol_info
Definition: parse_tree_column_attrs.h:851
PT_char_type(Char_type char_type, const char *length, const CHARSET_INFO *charset, bool force_binary=false)
Definition: parse_tree_column_attrs.h:607
Node for the TIME, TIMESTAMP and DATETIME types.
Definition: parse_tree_column_attrs.h:698
Definition: m_ctype.h:359
uint8_t uint8
Definition: my_inttypes.h:58
Definition: field_types.h:58
PT_column_format_column_attr(column_format_type format)
Definition: parse_tree_column_attrs.h:395
#define BINCMP_FLAG
Intern: Used by sql_yacc.
Definition: mysql_com.h:160
A typesafe replacement for DYNAMIC_ARRAY.
Definition: mem_root_array.h:397
const CHARSET_INFO * charset
Definition: parse_tree_column_attrs.h:773
Environment data for the contextualization phase.
Definition: parse_tree_node_base.h:99
Node for the JSON type.
Definition: parse_tree_column_attrs.h:823
Definition: item_timefunc.h:1166
PT_type * type_node
Definition: parse_tree_column_attrs.h:859
virtual void apply_srid_modifier(Nullable< gis::srid_t > *) const
Definition: parse_tree_column_attrs.h:76
PT_enum_type_tmpl< Enum_type::SET > PT_set_type
Node for the SET type.
Definition: parse_tree_column_attrs.h:807
virtual bool contextualize(Parse_context *pc)
Definition: parse_tree_column_attrs.h:872
alter_info_flags_t alter_info_flags
Definition: parse_tree_column_attrs.h:847
virtual uint get_uint_geom_type() const
Definition: parse_tree_column_attrs.h:503
LEX * lex
Definition: sql_class.h:837
Definition: sql_error.h:58
MEM_ROOT * mem_root
Definition: sql_class.h:237
Item * default_value
Definition: parse_tree_column_attrs.h:849
Node for the [NOT] ENFORCED column attribute.
Definition: parse_tree_column_attrs.h:228
decltype(Alter_info::flags) typedef alter_info_flags_t
Definition: parse_tree_column_attrs.h:836
uint uint_geom_type
Definition: parse_tree_column_attrs.h:845
Node for the NOT NULL column attribute.
Definition: parse_tree_column_attrs.h:137
PT_on_update_column_attr(uint8 precision)
Definition: parse_tree_column_attrs.h:323
void syntax_error_at(const YYLTYPE &location)
Definition: sql_class.h:3911
bool has_constraint_enforcement() const override
Check for the [NOT] ENFORCED characteristic.
Definition: parse_tree_column_attrs.h:233
LEX_CSTRING comment
Definition: parse_tree_column_attrs.h:848
virtual void apply_on_update_value(Item **) const
Definition: parse_tree_column_attrs.h:75
Blob_type
Definition: parse_tree_column_attrs.h:625
void apply_gen_default_value(Value_generator **default_value_expression) override
Definition: parse_tree_column_attrs.h:462
PT_numeric_type(THD *thd, Int_type type_arg, const char *length, ulong options)
Definition: parse_tree_column_attrs.h:544
geometry_type
Definition: field.h:839
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:317
virtual const char * get_length() const
Definition: parse_tree_column_attrs.h:579
PT_date_type()
Definition: parse_tree_column_attrs.h:685
Enum_type
Definition: parse_tree_column_attrs.h:768
PT_numeric_type(THD *thd, Numeric_type type_arg, const char *length, const char *dec, ulong options)
Definition: parse_tree_column_attrs.h:525
int type
Definition: http_common.h:411
LEX_CSTRING EMPTY_CSTR
Definition: sql_class.cc:106
virtual bool contextualize(Column_parse_context *pc)
Do all context-sensitive things and mark the node as contextualized.
Definition: parse_tree_node_base.h:161
PT_collate_column_attr(const POS &pos, const CHARSET_INFO *collation)
Definition: parse_tree_column_attrs.h:263
PT_column_attr_base super
Definition: parse_tree_column_attrs.h:365
std::remove_const< decltype(PT_type::type)>::type Parent_type
Definition: parse_tree_column_attrs.h:776
bool explicit_defaults_for_timestamp
Definition: system_variables.h:307
bool push_back(const Element_type &element)
Adds a new element at the end of the array, after its current last element.
Definition: mem_root_array.h:188
PT_blob_type(const char *length)
Definition: parse_tree_column_attrs.h:655
bool has_explicit_collation
Definition: parse_tree_column_attrs.h:844
ulong type_flags
Definition: parse_tree_column_attrs.h:840
#define PRI_KEY_FLAG
Field is part of a primary key.
Definition: mysql_com.h:141
Node for the DEFAULT <expression> column attribute.
Definition: parse_tree_column_attrs.h:290
#define UNIQUE_FLAG
Intern: Used by sql_yacc.
Definition: mysql_com.h:159
Used for storing information associated with generated column, default values generated from expressi...
Definition: field.h:591
virtual bool apply_collation(Column_parse_context *, const CHARSET_INFO **to, bool *has_explicit_collation) const
Definition: parse_tree_column_attrs.h:77
PT_char_type(Char_type char_type, const CHARSET_INFO *charset, bool force_binary=false)
Definition: parse_tree_column_attrs.h:615
List< String > *const interval_list
Definition: parse_tree_column_attrs.h:772
virtual List< String > * get_interval_list() const
Definition: parse_tree_column_attrs.h:504
virtual ulong get_type_flags() const
Definition: parse_tree_column_attrs.h:813
Definition: field_types.h:70
virtual const char * get_length() const
Definition: parse_tree_column_attrs.h:665
Item * expr_item
Item representing the generation expression.
Definition: field.h:601
PT_field_def_base super
Definition: parse_tree_column_attrs.h:917
bool add_check_constraints(Sql_check_constraint_spec_list *check_const_list) override
Definition: parse_tree_column_attrs.h:211
const bool m_enforced
Definition: parse_tree_column_attrs.h:238
PT_column_attr_base()
Definition: parse_tree_column_attrs.h:65
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin
Definition: ctype-bin.cc:510
void set_field_type(enum_field_types fld_type)
Definition: field.h:638
const enum_field_types type
Definition: parse_tree_column_attrs.h:493
Definition: field_types.h:88
#define NOT_NULL_FLAG
Field can&#39;t be NULL.
Definition: mysql_com.h:140
virtual void apply_alter_info_flags(ulonglong *) const
Definition: parse_tree_column_attrs.h:71
ulong type_flags
Definition: parse_tree_column_attrs.h:719
Definition: field_types.h:83
bool binlog_need_explicit_defaults_ts
The member is served for marking a query that CREATEs or ALTERs a table declared with a TIMESTAMP col...
Definition: sql_class.h:2197
const string value("\alue\)
const char * length
Definition: parse_tree_column_attrs.h:518
Definition: field_types.h:84
void apply_alter_info_flags(ulonglong *flags) const override
Definition: parse_tree_column_attrs.h:207
Sql_check_constraint_spec_list * check_const_spec_list
Definition: parse_tree_column_attrs.h:856
bool apply_collation(Column_parse_context *pc, const CHARSET_INFO **to, bool *has_explicit_collation) const override
Definition: parse_tree_column_attrs.h:268
column_format_type
Definition: field.h:191
Definition: field_types.h:67
virtual const CHARSET_INFO * get_charset() const
Definition: parse_tree_column_attrs.h:763
LEX_STRING name
Name of the check constraint.
Definition: sql_check_constraint.h:88
virtual void apply_type_flags(ulong *type_flags) const
Definition: parse_tree_column_attrs.h:398
static int flags[50]
Definition: hp_test1.cc:39
Base class for regular (non-generated) column definition nodes.
Definition: parse_tree_column_attrs.h:916
const bool force_binary
Definition: parse_tree_column_attrs.h:774
virtual const char * get_length() const
Definition: parse_tree_column_attrs.h:590
const char * ER_THD(const THD *thd, int mysql_errno)
Definition: derror.cc:102
virtual enum Type type() const =0
virtual bool contextualize(Parse_context *pc)
Definition: parse_tree_column_attrs.h:728
virtual const CHARSET_INFO * get_charset() const
Definition: parse_tree_column_attrs.h:664
PT_storage_media_column_attr(ha_storage_media media)
Definition: parse_tree_column_attrs.h:422
PT_blob_type(Blob_type blob_type, const CHARSET_INFO *charset, bool force_binary=false)
Definition: parse_tree_column_attrs.h:647
unsigned long ulong
Definition: my_inttypes.h:48
#define FIELD_FLAGS_COLUMN_FORMAT_MASK
Definition: mysql_com.h:175
#define false
Definition: config_static.h:43
virtual const char * get_dec() const
Definition: parse_tree_column_attrs.h:563
bool is_constraint_enforced() const override
Check if constraint is enforced.
Definition: parse_tree_column_attrs.h:235
Item * expr
Definition: parse_tree_column_attrs.h:941
virtual ulong get_type_flags() const
Definition: parse_tree_column_attrs.h:499
Base class for both generated and regular column definitions.
Definition: parse_tree_column_attrs.h:834
Definition: field_types.h:72
PT_enum_type_tmpl(List< String > *interval_list, const CHARSET_INFO *charset, bool force_binary)
Definition: parse_tree_column_attrs.h:779
Numeric_type
Definition: parser_yystype.h:159
const POS m_pos
Definition: parse_tree_column_attrs.h:279
Mem_root_array< Sql_check_constraint_spec * > Sql_check_constraint_spec_list
Definition: dd_table.h:48
virtual void apply_comment(LEX_CSTRING *to) const
Definition: parse_tree_column_attrs.h:253
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:777
Nullable< gis::srid_t > m_srid
Definition: parse_tree_column_attrs.h:854
PT_constraint_enforcement_attr(bool enforced)
Definition: parse_tree_column_attrs.h:230
PT_type super
Definition: parse_tree_column_attrs.h:716
void apply_type_flags(unsigned long *type_flags) const override
Definition: parse_tree_column_attrs.h:150
Node for the PRIMARY [KEY] column attribute.
Definition: parse_tree_column_attrs.h:176