@@ -123,7 +123,7 @@ class PT_column_attr_base : public Parse_tree_node_tmpl<Column_parse_context> {
123
123
*/
124
124
class PT_null_column_attr : public PT_column_attr_base {
125
125
public:
126
- virtual void apply_type_flags (ulong *type_flags) const {
126
+ void apply_type_flags (ulong *type_flags) const override {
127
127
*type_flags &= ~NOT_NULL_FLAG;
128
128
*type_flags |= EXPLICIT_NULL_FLAG;
129
129
}
@@ -135,7 +135,7 @@ class PT_null_column_attr : public PT_column_attr_base {
135
135
@ingroup ptn_column_attrs
136
136
*/
137
137
class PT_not_null_column_attr : public PT_column_attr_base {
138
- virtual void apply_type_flags (ulong *type_flags) const {
138
+ void apply_type_flags (ulong *type_flags) const override {
139
139
*type_flags |= NOT_NULL_FLAG;
140
140
}
141
141
};
@@ -159,11 +159,11 @@ class PT_secondary_column_attr : public PT_column_attr_base {
159
159
*/
160
160
class PT_unique_key_column_attr : public PT_column_attr_base {
161
161
public:
162
- virtual void apply_type_flags (ulong *type_flags) const {
162
+ void apply_type_flags (ulong *type_flags) const override {
163
163
*type_flags |= UNIQUE_FLAG;
164
164
}
165
165
166
- virtual void apply_alter_info_flags (ulonglong *flags) const {
166
+ void apply_alter_info_flags (ulonglong *flags) const override {
167
167
*flags |= Alter_info::ALTER_ADD_INDEX;
168
168
}
169
169
};
@@ -175,11 +175,11 @@ class PT_unique_key_column_attr : public PT_column_attr_base {
175
175
*/
176
176
class PT_primary_key_column_attr : public PT_column_attr_base {
177
177
public:
178
- virtual void apply_type_flags (ulong *type_flags) const {
178
+ void apply_type_flags (ulong *type_flags) const override {
179
179
*type_flags |= PRI_KEY_FLAG | NOT_NULL_FLAG;
180
180
}
181
181
182
- virtual void apply_alter_info_flags (ulonglong *flags) const {
182
+ void apply_alter_info_flags (ulonglong *flags) const override {
183
183
*flags |= Alter_info::ALTER_ADD_INDEX;
184
184
}
185
185
};
@@ -250,7 +250,7 @@ class PT_comment_column_attr : public PT_column_attr_base {
250
250
explicit PT_comment_column_attr (const LEX_CSTRING &comment)
251
251
: comment(comment) {}
252
252
253
- virtual void apply_comment (LEX_CSTRING *to) const { *to = comment; }
253
+ void apply_comment (LEX_CSTRING *to) const override { *to = comment; }
254
254
};
255
255
256
256
/* *
@@ -294,16 +294,16 @@ class PT_default_column_attr : public PT_column_attr_base {
294
294
295
295
public:
296
296
explicit PT_default_column_attr (Item *item) : item(item) {}
297
- virtual void apply_default_value (Item **value) const { *value = item; }
297
+ void apply_default_value (Item **value) const override { *value = item; }
298
298
299
- virtual bool contextualize (Column_parse_context *pc) {
299
+ bool contextualize (Column_parse_context *pc) override {
300
300
if (pc->is_generated ) {
301
301
my_error (ER_WRONG_USAGE, MYF (0 ), " DEFAULT" , " generated column" );
302
302
return true ;
303
303
}
304
304
return super::contextualize (pc) || item->itemize (pc, &item);
305
305
}
306
- virtual void apply_type_flags (ulong *type_flags) const {
306
+ void apply_type_flags (ulong *type_flags) const override {
307
307
if (item->type () == Item::NULL_ITEM) *type_flags |= EXPLICIT_NULL_FLAG;
308
308
}
309
309
};
@@ -321,9 +321,9 @@ class PT_on_update_column_attr : public PT_column_attr_base {
321
321
322
322
public:
323
323
explicit PT_on_update_column_attr (uint8 precision) : precision(precision) {}
324
- virtual void apply_on_update_value (Item **value) const { *value = item; }
324
+ void apply_on_update_value (Item **value) const override { *value = item; }
325
325
326
- virtual bool contextualize (Column_parse_context *pc) {
326
+ bool contextualize (Column_parse_context *pc) override {
327
327
if (pc->is_generated ) {
328
328
my_error (ER_WRONG_USAGE, MYF (0 ), " ON UPDATE" , " generated column" );
329
329
return true ;
@@ -344,10 +344,10 @@ class PT_auto_increment_column_attr : public PT_column_attr_base {
344
344
typedef PT_column_attr_base super;
345
345
346
346
public:
347
- virtual void apply_type_flags (ulong *type_flags) const {
347
+ void apply_type_flags (ulong *type_flags) const override {
348
348
*type_flags |= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG;
349
349
}
350
- virtual bool contextualize (Column_parse_context *pc) {
350
+ bool contextualize (Column_parse_context *pc) override {
351
351
if (pc->is_generated ) {
352
352
my_error (ER_WRONG_USAGE, MYF (0 ), " AUTO_INCREMENT" , " generated column" );
353
353
return true ;
@@ -365,13 +365,13 @@ class PT_serial_default_value_column_attr : public PT_column_attr_base {
365
365
typedef PT_column_attr_base super;
366
366
367
367
public:
368
- virtual void apply_type_flags (ulong *type_flags) const {
368
+ void apply_type_flags (ulong *type_flags) const override {
369
369
*type_flags |= AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG;
370
370
}
371
- virtual void apply_alter_info_flags (ulonglong *flags) const {
371
+ void apply_alter_info_flags (ulonglong *flags) const override {
372
372
*flags |= Alter_info::ALTER_ADD_INDEX;
373
373
}
374
- virtual bool contextualize (Column_parse_context *pc) {
374
+ bool contextualize (Column_parse_context *pc) override {
375
375
if (pc->is_generated ) {
376
376
my_error (ER_WRONG_USAGE, MYF (0 ), " SERIAL DEFAULT VALUE" ,
377
377
" generated column" );
@@ -395,11 +395,11 @@ class PT_column_format_column_attr : public PT_column_attr_base {
395
395
explicit PT_column_format_column_attr (column_format_type format)
396
396
: format(format) {}
397
397
398
- virtual void apply_type_flags (ulong *type_flags) const {
398
+ void apply_type_flags (ulong *type_flags) const override {
399
399
*type_flags &= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
400
400
*type_flags |= format << FIELD_FLAGS_COLUMN_FORMAT;
401
401
}
402
- virtual bool contextualize (Column_parse_context *pc) {
402
+ bool contextualize (Column_parse_context *pc) override {
403
403
if (pc->is_generated ) {
404
404
my_error (ER_WRONG_USAGE, MYF (0 ), " COLUMN_FORMAT" , " generated column" );
405
405
return true ;
@@ -422,11 +422,11 @@ class PT_storage_media_column_attr : public PT_column_attr_base {
422
422
explicit PT_storage_media_column_attr (ha_storage_media media)
423
423
: media(media) {}
424
424
425
- virtual void apply_type_flags (ulong *type_flags) const {
425
+ void apply_type_flags (ulong *type_flags) const override {
426
426
*type_flags &= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
427
427
*type_flags |= media << FIELD_FLAGS_STORAGE_MEDIA;
428
428
}
429
- virtual bool contextualize (Column_parse_context *pc) {
429
+ bool contextualize (Column_parse_context *pc) override {
430
430
if (pc->is_generated ) {
431
431
my_error (ER_WRONG_USAGE, MYF (0 ), " STORAGE" , " generated column" );
432
432
return true ;
@@ -556,11 +556,11 @@ class PT_numeric_type : public PT_type {
556
556
}
557
557
}
558
558
559
- virtual ulong get_type_flags () const {
559
+ ulong get_type_flags () const override {
560
560
return (options & ZEROFILL_FLAG) ? (options | UNSIGNED_FLAG) : options;
561
561
}
562
- virtual const char *get_length () const { return length; }
563
- virtual const char *get_dec () const { return dec; }
562
+ const char *get_length () const override { return length; }
563
+ const char *get_dec () const override { return dec; }
564
564
};
565
565
566
566
/* *
@@ -576,7 +576,7 @@ class PT_bit_type : public PT_type {
576
576
explicit PT_bit_type (const char *length)
577
577
: PT_type(MYSQL_TYPE_BIT), length(length) {}
578
578
579
- virtual const char *get_length () const { return length; }
579
+ const char *get_length () const override { return length; }
580
580
};
581
581
582
582
/* *
@@ -587,7 +587,7 @@ class PT_bit_type : public PT_type {
587
587
class PT_boolean_type : public PT_type {
588
588
public:
589
589
PT_boolean_type () : PT_type(MYSQL_TYPE_TINY) {}
590
- virtual const char *get_length () const { return " 1" ; }
590
+ const char *get_length () const override { return " 1" ; }
591
591
};
592
592
593
593
enum class Char_type : ulong {
@@ -615,11 +615,11 @@ class PT_char_type : public PT_type {
615
615
PT_char_type (Char_type char_type, const CHARSET_INFO *charset,
616
616
bool force_binary = false )
617
617
: PT_char_type(char_type, " 1" , charset, force_binary) {}
618
- virtual ulong get_type_flags () const {
618
+ ulong get_type_flags () const override {
619
619
return force_binary ? BINCMP_FLAG : 0 ;
620
620
}
621
- virtual const char *get_length () const { return length; }
622
- virtual const CHARSET_INFO *get_charset () const { return charset; }
621
+ const char *get_length () const override { return length; }
622
+ const CHARSET_INFO *get_charset () const override { return charset; }
623
623
};
624
624
625
625
enum class Blob_type {
@@ -658,11 +658,11 @@ class PT_blob_type : public PT_type {
658
658
charset(&my_charset_bin),
659
659
force_binary(false ) {}
660
660
661
- virtual ulong get_type_flags () const {
661
+ ulong get_type_flags () const override {
662
662
return force_binary ? BINCMP_FLAG : 0 ;
663
663
}
664
- virtual const CHARSET_INFO *get_charset () const { return charset; }
665
- virtual const char *get_length () const { return length; }
664
+ const CHARSET_INFO *get_charset () const override { return charset; }
665
+ const char *get_length () const override { return length; }
666
666
};
667
667
668
668
/* *
@@ -704,7 +704,7 @@ class PT_time_type : public PT_type {
704
704
PT_time_type (Time_type time_type, const char *dec)
705
705
: PT_type(static_cast <Parent_type>(time_type)), dec(dec) {}
706
706
707
- virtual const char *get_dec () const { return dec; }
707
+ const char *get_dec () const override { return dec; }
708
708
};
709
709
710
710
/* *
@@ -722,10 +722,10 @@ class PT_timestamp_type : public PT_type {
722
722
explicit PT_timestamp_type (const char *dec)
723
723
: super(MYSQL_TYPE_TIMESTAMP2), dec(dec), type_flags(0 ) {}
724
724
725
- virtual const char *get_dec () const { return dec; }
726
- virtual ulong get_type_flags () const { return type_flags; }
725
+ const char *get_dec () const override { return dec; }
726
+ ulong get_type_flags () const override { return type_flags; }
727
727
728
- virtual bool contextualize (Parse_context *pc) {
728
+ bool contextualize (Parse_context *pc) override {
729
729
if (super::contextualize (pc)) return true ;
730
730
/*
731
731
TIMESTAMP fields are NOT NULL by default, unless the variable
@@ -760,9 +760,9 @@ class PT_spacial_type : public PT_type {
760
760
explicit PT_spacial_type (Field::geometry_type geo_type)
761
761
: PT_type(MYSQL_TYPE_GEOMETRY), geo_type(geo_type) {}
762
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 ; }
763
+ const CHARSET_INFO *get_charset () const override { return &my_charset_bin; }
764
+ uint get_uint_geom_type () const override { return geo_type; }
765
+ const char *get_length () const override { return NULL ; }
766
766
};
767
767
768
768
enum class Enum_type { ENUM = MYSQL_TYPE_ENUM, SET = MYSQL_TYPE_SET };
@@ -785,11 +785,11 @@ class PT_enum_type_tmpl : public PT_type {
785
785
DBUG_ASSERT (charset == NULL || !force_binary);
786
786
}
787
787
788
- virtual const CHARSET_INFO *get_charset () const { return charset; }
789
- virtual ulong get_type_flags () const {
788
+ const CHARSET_INFO *get_charset () const override { return charset; }
789
+ ulong get_type_flags () const override {
790
790
return force_binary ? BINCMP_FLAG : 0 ;
791
791
}
792
- virtual List<String> *get_interval_list () const { return interval_list; }
792
+ List<String> *get_interval_list () const override { return interval_list; }
793
793
};
794
794
795
795
/* *
@@ -810,7 +810,7 @@ class PT_serial_type : public PT_type {
810
810
public:
811
811
PT_serial_type () : PT_type(MYSQL_TYPE_LONGLONG) {}
812
812
813
- virtual ulong get_type_flags () const {
813
+ ulong get_type_flags () const override {
814
814
return AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG | UNIQUE_FLAG;
815
815
}
816
816
};
@@ -823,7 +823,7 @@ class PT_serial_type : public PT_type {
823
823
class PT_json_type : public PT_type {
824
824
public:
825
825
PT_json_type () : PT_type(MYSQL_TYPE_JSON) {}
826
- virtual const CHARSET_INFO *get_charset () const { return &my_charset_bin; }
826
+ const CHARSET_INFO *get_charset () const override { return &my_charset_bin; }
827
827
};
828
828
829
829
/* *
@@ -869,7 +869,7 @@ class PT_field_def_base : public Parse_tree_node {
869
869
type_node(type_node) {}
870
870
871
871
public:
872
- virtual bool contextualize (Parse_context *pc) {
872
+ bool contextualize (Parse_context *pc) override {
873
873
if (super::contextualize (pc) || type_node->contextualize (pc)) return true ;
874
874
875
875
type = type_node->type ;
@@ -923,7 +923,7 @@ class PT_field_def : public PT_field_def_base {
923
923
Mem_root_array<PT_column_attr_base *> *opt_attrs)
924
924
: super(type_node_arg), opt_attrs(opt_attrs) {}
925
925
926
- virtual bool contextualize (Parse_context *pc_arg) {
926
+ bool contextualize (Parse_context *pc_arg) override {
927
927
Column_parse_context pc (pc_arg->thd , pc_arg->select , false );
928
928
return super::contextualize (&pc) || contextualize_attrs (&pc, opt_attrs);
929
929
}
@@ -950,7 +950,7 @@ class PT_generated_field_def : public PT_field_def_base {
950
950
expr(expr),
951
951
opt_attrs(opt_attrs) {}
952
952
953
- virtual bool contextualize (Parse_context *pc_arg) {
953
+ bool contextualize (Parse_context *pc_arg) override {
954
954
Column_parse_context pc (pc_arg->thd , pc_arg->select , true );
955
955
if (super::contextualize (&pc) || contextualize_attrs (&pc, opt_attrs) ||
956
956
expr->itemize (&pc, &expr))
0 commit comments