MySQL 8.4.0
Source Code Documentation
table_impl.h
Go to the documentation of this file.
1/* Copyright (c) 2014, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef DD__TABLE_IMPL_INCLUDED
25#define DD__TABLE_IMPL_INCLUDED
26
27#include <sys/types.h>
28#include <memory>
29#include <new>
30#include <string>
31
32#include "my_inttypes.h"
33#include "mysql_version.h" // MYSQL_VERSION_ID
36#include "sql/dd/impl/types/abstract_table_impl.h" // dd::Abstract_table_impl
39#include "sql/dd/object_id.h"
40#include "sql/dd/sdi_fwd.h"
41#include "sql/dd/string_type.h"
43#include "sql/dd/types/check_constraint.h" // dd::Check_constraint
44#include "sql/dd/types/foreign_key.h" // dd::Foreign_key
45#include "sql/dd/types/index.h" // dd::Index
46#include "sql/dd/types/partition.h" // dd::Partition
47#include "sql/dd/types/table.h" // dd:Table
48#include "sql/dd/types/trigger.h" // dd::Trigger
49#include "sql/strfunc.h"
50
51namespace dd {
52
53///////////////////////////////////////////////////////////////////////////
54
55class Column;
56class Foreign_key;
57class Index;
58class Object_table;
59class Open_dictionary_tables_ctx;
60class Partition;
61class Properties;
62class Sdi_rcontext;
63class Sdi_wcontext;
64class Trigger_impl;
65class Weak_object;
66class Object_table;
67
68class Table_impl : public Abstract_table_impl, virtual public Table {
69 public:
70 Table_impl();
71
72 ~Table_impl() override;
73
74 public:
75 /////////////////////////////////////////////////////////////////////////
76 // enum_table_type.
77 /////////////////////////////////////////////////////////////////////////
78
80
81 public:
83
84 bool validate() const override;
85
87
89
90 bool drop_children(Open_dictionary_tables_ctx *otx) const override;
91
92 bool restore_attributes(const Raw_record &r) override;
93
94 bool store_attributes(Raw_record *r) override;
95
96 void serialize(Sdi_wcontext *wctx, Sdi_writer *w) const override;
97
98 bool deserialize(Sdi_rcontext *rctx, const RJ_Value &val) override;
99
100 void debug_print(String_type &outb) const override;
101
102 private:
103 /**
104 Store the trigger object in DD table.
105
106 @param otx current Open_dictionary_tables_ctx
107
108 @returns
109 false on success.
110 true on failure.
111 */
113
114 public:
115 /////////////////////////////////////////////////////////////////////////
116 // is_temporary.
117 /////////////////////////////////////////////////////////////////////////
118
119 bool is_temporary() const override { return m_is_temporary; }
120 void set_is_temporary(bool is_temporary) override {
122 }
123
124 /////////////////////////////////////////////////////////////////////////
125 // collation.
126 /////////////////////////////////////////////////////////////////////////
127
128 Object_id collation_id() const override { return m_collation_id; }
129
132 }
133
134 /////////////////////////////////////////////////////////////////////////
135 // tablespace.
136 /////////////////////////////////////////////////////////////////////////
137
138 Object_id tablespace_id() const override { return m_tablespace_id; }
139
142 }
143
144 bool is_explicit_tablespace() const override {
145 bool is_explicit = false;
146 if (options().exists("explicit_tablespace"))
147 options().get("explicit_tablespace", &is_explicit);
148 return is_explicit;
149 }
150
151 /////////////////////////////////////////////////////////////////////////
152 // engine.
153 /////////////////////////////////////////////////////////////////////////
154
155 const String_type &engine() const override { return m_engine; }
156
157 void set_engine(const String_type &engine) override { m_engine = engine; }
158
159 /////////////////////////////////////////////////////////////////////////
160 // row_format
161 /////////////////////////////////////////////////////////////////////////
162
163 enum_row_format row_format() const override { return m_row_format; }
164
167 }
168
169 /////////////////////////////////////////////////////////////////////////
170 // comment
171 /////////////////////////////////////////////////////////////////////////
172
173 const String_type &comment() const override { return m_comment; }
174
175 void set_comment(const String_type &comment) override { m_comment = comment; }
176
177 /////////////////////////////////////////////////////////////////////////
178 // last_checked_for_upgrade_version_id
179 /////////////////////////////////////////////////////////////////////////
182 }
183
186 }
187
188 /////////////////////////////////////////////////////////////////////////
189 // se_private_data.
190 /////////////////////////////////////////////////////////////////////////
191
192 const Properties &se_private_data() const override {
193 return m_se_private_data;
194 }
195
197
198 bool set_se_private_data(const String_type &se_private_data_raw) override {
199 return m_se_private_data.insert_values(se_private_data_raw);
200 }
201
204 }
205
206 /////////////////////////////////////////////////////////////////////////
207 // se_private_id.
208 /////////////////////////////////////////////////////////////////////////
209
210 Object_id se_private_id() const override { return m_se_private_id; }
211
214 }
215
216 /////////////////////////////////////////////////////////////////////////
217 // Storage engine attributes
218 /////////////////////////////////////////////////////////////////////////
219
220 LEX_CSTRING engine_attribute() const override {
222 }
223
225 m_engine_attribute.assign(a.str, a.length);
226 }
227
230 }
231
234 }
235
236 /////////////////////////////////////////////////////////////////////////
237 // Partition type
238 /////////////////////////////////////////////////////////////////////////
239
241 return m_partition_type;
242 }
243
246 }
247
248 /////////////////////////////////////////////////////////////////////////
249 // default_partitioning
250 /////////////////////////////////////////////////////////////////////////
251
254 }
255
259 }
260
261 /////////////////////////////////////////////////////////////////////////
262 // partition_expression
263 /////////////////////////////////////////////////////////////////////////
264
265 const String_type &partition_expression() const override {
267 }
268
270 const String_type &partition_expression) override {
272 }
273
274 /////////////////////////////////////////////////////////////////////////
275 // partition_expression_utf8
276 /////////////////////////////////////////////////////////////////////////
277
278 const String_type &partition_expression_utf8() const override {
280 }
281
283 const String_type &partition_expression_utf8) override {
285 }
286
287 /////////////////////////////////////////////////////////////////////////
288 // subpartition_type
289 /////////////////////////////////////////////////////////////////////////
290
292 return m_subpartition_type;
293 }
294
298 }
299
300 /////////////////////////////////////////////////////////////////////////
301 // default_subpartitioning
302 /////////////////////////////////////////////////////////////////////////
303
306 }
307
311 }
312
313 /////////////////////////////////////////////////////////////////////////
314 // subpartition_expression
315 /////////////////////////////////////////////////////////////////////////
316
317 const String_type &subpartition_expression() const override {
319 }
320
322 const String_type &subpartition_expression) override {
324 }
325
326 /////////////////////////////////////////////////////////////////////////
327 // subpartition_expression_utf8
328 /////////////////////////////////////////////////////////////////////////
329
332 }
333
337 }
338
339 /////////////////////////////////////////////////////////////////////////
340 // Index collection.
341 /////////////////////////////////////////////////////////////////////////
342
343 Index *add_index() override;
344
345 Index *add_first_index() override;
346
347 const Index_collection &indexes() const override { return m_indexes; }
348
349 Index_collection *indexes() override { return &m_indexes; }
350
351 const Index *get_index(Object_id index_id) const {
352 return const_cast<Table_impl *>(this)->get_index(index_id);
353 }
354
355 Index *get_index(Object_id index_id);
356
357 /////////////////////////////////////////////////////////////////////////
358 // Foreign key collection.
359 /////////////////////////////////////////////////////////////////////////
360
361 Foreign_key *add_foreign_key() override;
362
363 const Foreign_key_collection &foreign_keys() const override {
364 return m_foreign_keys;
365 }
366
368
369 /////////////////////////////////////////////////////////////////////////
370 // Foreign key parent collection.
371 /////////////////////////////////////////////////////////////////////////
372
374
375 private:
377
378 public:
379 bool reload_foreign_key_parents(THD *thd) override;
380
383 }
384
385 /////////////////////////////////////////////////////////////////////////
386 // Partition collection.
387 /////////////////////////////////////////////////////////////////////////
388
389 Partition *add_partition() override;
390
391 const Partition_collection &partitions() const override {
392 return m_partitions;
393 }
394
396
397 const Partition_leaf_vector &leaf_partitions() const override {
398 return m_leaf_partitions;
399 }
400
402 return &m_leaf_partitions;
403 }
404
405 // non-virtual
407
408 const Partition *get_partition(Object_id partition_id) const {
409 return const_cast<Table_impl *>(this)->get_partition(partition_id);
410 }
411
412 Partition *get_partition(Object_id partition_id);
413
415
416 // Fix "inherits ... via dominance" warnings
418 const Entity_object_impl *impl() const override {
420 }
421 Object_id id() const override { return Entity_object_impl::id(); }
422 bool is_persistent() const override {
424 }
425 const String_type &name() const override {
427 }
428 void set_name(const String_type &name) override {
430 }
431 Object_id schema_id() const override {
433 }
436 }
437 uint mysql_version_id() const override {
439 }
440 const Properties &options() const override {
442 }
444 bool set_options(const Properties &options) override {
446 }
447 bool set_options(const String_type &options_raw) override {
448 return Abstract_table_impl::set_options(options_raw);
449 }
450 ulonglong created(bool convert_time) const override {
451 return Abstract_table_impl::created(convert_time);
452 }
455 }
456 ulonglong last_altered(bool convert_time) const override {
457 return Abstract_table_impl::last_altered(convert_time);
458 }
461 }
463 bool drop_column(const String_type &name) override {
465 }
466 const Column_collection &columns() const override {
468 }
471 }
472 const Column *get_column(Object_id column_id) const {
473 return Abstract_table_impl::get_column(column_id);
474 }
476 return Abstract_table_impl::get_column(column_id);
477 }
478 const Column *get_column(const String_type &name) const override {
480 }
483 }
484 bool update_aux_key(Aux_key *key) const override {
486 }
487 enum_hidden_type hidden() const override {
489 }
492 }
493
494 /////////////////////////////////////////////////////////////////////////
495 // Trigger collection.
496 /////////////////////////////////////////////////////////////////////////
497
498 bool has_trigger() const override { return (m_triggers.size() > 0); }
499
500 const Trigger_collection &triggers() const override { return m_triggers; }
501
502 Trigger_collection *triggers() override { return &m_triggers; }
503
504 void copy_triggers(const Table *tab_obj) override;
505
507 Trigger::enum_event_type et) override;
508
509 const Trigger *get_trigger(const char *name) const override;
510
511 Trigger *add_trigger_following(const Trigger *trigger,
513 Trigger::enum_event_type et) override;
514
515 Trigger *add_trigger_preceding(const Trigger *trigger,
517 Trigger::enum_event_type et) override;
518
519 void drop_trigger(const Trigger *trigger) override;
520
521 void drop_all_triggers() override;
522
523 private:
525 Trigger::enum_event_type et) const;
526
529
531
532 public:
533 /////////////////////////////////////////////////////////////////////////
534 // Check constraints.
535 /////////////////////////////////////////////////////////////////////////
536
538
540 return m_check_constraints;
541 }
542
544 return &m_check_constraints;
545 }
546
547 private:
548 // Fields.
549
551
554
555 // Setting this to 0 means that every table will be checked by CHECK
556 // TABLE FOR UPGRADE once, even if it was created in this version.
557 // If we instead initialize to MYSQL_VERSION_ID, it will only run
558 // CHECK TABLE FOR UPGRADE after a real upgrade.
561
562 // SE-specific json attributes
565
568
569 // - Partitioning related fields.
570
575
580
581 // References to tightly-coupled objects.
582
590
591 // References to other objects.
592
595
596 Table_impl(const Table_impl &src);
597 Table_impl *clone() const override { return new Table_impl(*this); }
598
599 // N.B.: returning dd::Table from this function might confuse MSVC
600 // compiler thanks to diamond inheritance.
602 /*
603 TODO: In future we might want to save even more memory and use separate
604 placeholder class implementing dd::Table interface instead of
605 Table_impl. Instances of such class can be several times smaller
606 than an empty Table_impl. It might make sense to do the same for
607 for some of other types as well.
608 */
609 Table_impl *placeholder = new Table_impl();
610 placeholder->set_id(id());
611 placeholder->set_schema_id(schema_id());
612 placeholder->set_name(name());
613 placeholder->set_engine(engine());
614 placeholder->set_se_private_id(se_private_id());
615 return placeholder;
616 }
617};
618
619///////////////////////////////////////////////////////////////////////////
620
621} // namespace dd
622
623#endif // DD__TABLE_IMPL_INCLUDED
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
Definition: abstract_table_impl.h:58
void set_created(ulonglong created) override
Definition: abstract_table_impl.h:132
Object_id schema_id() const override
Definition: abstract_table_impl.h:89
void set_hidden(enum_hidden_type hidden) override
Definition: abstract_table_impl.h:153
ulonglong last_altered(bool convert_time) const override
Definition: abstract_table_impl.h:138
void set_schema_id(Object_id schema_id) override
Definition: abstract_table_impl.h:91
void set_last_altered(ulonglong last_altered) override
Definition: abstract_table_impl.h:143
Column * add_column() override
Definition: abstract_table_impl.cc:270
const Column_collection & columns() const override
Definition: abstract_table_impl.h:162
const Properties & options() const override
Definition: abstract_table_impl.h:112
uint mysql_version_id() const override
Definition: abstract_table_impl.h:100
bool drop_column(const String_type &name) override
Definition: abstract_table_impl.cc:276
bool set_options(const Properties &options) override
Definition: abstract_table_impl.h:116
const Column * get_column(Object_id column_id) const
Definition: abstract_table_impl.cc:300
enum_hidden_type hidden() const override
Definition: abstract_table_impl.h:151
ulonglong created(bool convert_time) const override
Definition: abstract_table_impl.h:128
enum_hidden_type
Enumeration type which indicates whether the table is hidden, and if yes then which type of hidden ta...
Definition: abstract_table.h:103
Definition: check_constraint.h:42
Definition: collection.h:44
size_t size() const
Definition: collection.h:229
Definition: column.h:87
Definition: entity_object_impl.h:44
void set_name(const String_type &name) override
Definition: entity_object_impl.h:62
void set_id(Object_id id)
Definition: entity_object_impl.h:51
Object_id id() const override
The unique dictionary object id.
Definition: entity_object_impl.h:49
const String_type & name() const override
Definition: entity_object_impl.h:60
Entity_object_impl * impl() override
Definition: entity_object_impl.h:68
bool is_persistent() const override
Is dictionary object persistent in dictionary tables ?
Definition: entity_object_impl.h:57
Definition: foreign_key.h:181
Definition: foreign_key.h:47
Definition: index.h:51
Auxiliary class for opening dictionary tables.
Definition: transaction_impl.h:76
Definition: partition.h:51
The Properties_impl class implements the Properties interface.
Definition: properties_impl.h:77
bool insert_values(const Properties &properties) override
Insert key/value pairs from a different property object.
Definition: properties_impl.cc:104
The Properties class defines an interface for storing key=value pairs, where both key and value may b...
Definition: properties.h:74
virtual bool get(const String_type &key, String_type *value) const =0
Get the string value for a given key.
Definition: raw_record.h:46
Opaque context which keeps reusable resoureces needed during deserialization.
Definition: sdi.cc:231
Opaque context which keeps reusable resources needed during serialization.
Definition: sdi.cc:129
Definition: object_keys.h:219
Definition: table_impl.h:68
void set_created(ulonglong created) override
Definition: table_impl.h:453
bool load_foreign_key_parents(Open_dictionary_tables_ctx *otx)
Definition: table_impl.cc:131
String_type m_partition_expression
Definition: table_impl.h:572
void set_schema_id(Object_id schema_id) override
Definition: table_impl.h:434
const Partition_leaf_vector & leaf_partitions() const override
Definition: table_impl.h:397
Index * add_first_index() override
Definition: table_impl.cc:731
enum_table_type type() const override
Definition: table_impl.h:79
ulonglong created(bool convert_time) const override
Definition: table_impl.h:450
bool drop_column(const String_type &name) override
Definition: table_impl.h:463
Entity_object_impl * impl() override
Definition: table_impl.h:417
enum_row_format m_row_format
Definition: table_impl.h:566
enum_subpartition_type m_subpartition_type
Definition: table_impl.h:576
Trigger * add_trigger(Trigger::enum_action_timing at, Trigger::enum_event_type et) override
Add new trigger to the table.
Definition: table_impl.cc:828
bool restore_attributes(const Raw_record &r) override
Definition: table_impl.cc:400
bool set_se_private_data(const Properties &se_private_data) override
Definition: table_impl.h:202
Foreign_key_collection m_foreign_keys
Definition: table_impl.h:584
Properties & se_private_data() override
Definition: table_impl.h:196
void set_comment(const String_type &comment) override
Definition: table_impl.h:175
uint m_last_checked_for_upgrade_version_id
Definition: table_impl.h:559
void drop_all_triggers() override
Drop all the trigger on this dd::Table object.
Definition: table_impl.cc:958
bool restore_children(Open_dictionary_tables_ctx *otx) override
Definition: table_impl.cc:253
void set_partition_expression_utf8(const String_type &partition_expression_utf8) override
Definition: table_impl.h:282
void set_last_altered(ulonglong last_altered) override
Definition: table_impl.h:459
Trigger_collection * triggers() override
Get non-const pointer to Trigger_collection.
Definition: table_impl.h:502
void set_secondary_engine_attribute(LEX_CSTRING a) override
Definition: table_impl.h:232
void mark_as_checked_for_upgrade() override
Definition: table_impl.h:184
Index_collection * indexes() override
Definition: table_impl.h:349
bool store_triggers(Open_dictionary_tables_ctx *otx)
Store the trigger object in DD table.
Definition: table_impl.cc:297
bool set_se_private_data(const String_type &se_private_data_raw) override
Definition: table_impl.h:198
String_type m_subpartition_expression_utf8
Definition: table_impl.h:578
Index * add_index() override
Definition: table_impl.cc:723
void set_partition_type(enum_partition_type partition_type) override
Definition: table_impl.h:244
bool is_temporary() const override
Definition: table_impl.h:119
void debug_print(String_type &outb) const override
Definition: table_impl.cc:637
const Trigger * get_trigger(const char *name) const override
Get dd::Trigger object for the given trigger name.
Definition: table_impl.cc:843
String_type m_comment
Definition: table_impl.h:553
LEX_CSTRING engine_attribute() const override
Definition: table_impl.h:220
const Entity_object_impl * impl() const override
Definition: table_impl.h:418
bool is_explicit_tablespace() const override
Definition: table_impl.h:144
const String_type & comment() const override
Definition: table_impl.h:173
Object_id m_se_private_id
Definition: table_impl.h:550
enum_partition_type partition_type() const override
Definition: table_impl.h:240
String_type m_subpartition_expression
Definition: table_impl.h:577
bool store_children(Open_dictionary_tables_ctx *otx) override
Definition: table_impl.cc:359
bool set_options(const String_type &options_raw) override
Definition: table_impl.h:447
Trigger_impl * create_trigger()
Definition: table_impl.cc:815
Object_id schema_id() const override
Definition: table_impl.h:431
void set_default_partitioning(enum_default_partitioning default_partitioning) override
Definition: table_impl.h:256
Object_id m_tablespace_id
Definition: table_impl.h:594
bool validate() const override
Definition: table_impl.cc:111
void reorder_action_order(Trigger::enum_action_timing at, Trigger::enum_event_type et)
Definition: table_impl.cc:804
Column * get_column(const String_type &name)
Definition: table_impl.h:481
const Properties & se_private_data() const override
Definition: table_impl.h:192
Object_id collation_id() const override
Definition: table_impl.h:128
uint mysql_version_id() const override
Definition: table_impl.h:437
void set_name(const String_type &name) override
Definition: table_impl.h:428
Table_impl()
Definition: table_impl.cc:90
Object_id m_collation_id
Definition: table_impl.h:593
Object_id se_private_id() const override
Definition: table_impl.h:210
void set_hidden(enum_hidden_type hidden) override
Definition: table_impl.h:490
const String_type & engine() const override
Definition: table_impl.h:155
const Partition_collection & partitions() const override
Definition: table_impl.h:391
const String_type & partition_expression_utf8() const override
Definition: table_impl.h:278
Check_constraint_collection m_check_constraints
Definition: table_impl.h:589
Table_impl * clone() const override
Allocate a new object graph and invoke the copy constructor for each object.
Definition: table_impl.h:597
const String_type & partition_expression() const override
Definition: table_impl.h:265
Partition_collection m_partitions
Definition: table_impl.h:586
String_type m_partition_expression_utf8
Definition: table_impl.h:573
void set_collation_id(Object_id collation_id) override
Definition: table_impl.h:130
void set_subpartition_expression_utf8(const String_type &subpartition_expression_utf8) override
Definition: table_impl.h:334
Object_id id() const override
The unique dictionary object id.
Definition: table_impl.h:421
void set_subpartition_type(enum_subpartition_type subpartition_type) override
Definition: table_impl.h:295
void set_row_format(enum_row_format row_format) override
Definition: table_impl.h:165
Column * add_column() override
Definition: table_impl.h:462
const Index_collection & indexes() const override
Definition: table_impl.h:347
Object_id tablespace_id() const override
Definition: table_impl.h:138
Partition * add_partition() override
Definition: table_impl.cc:771
void set_engine(const String_type &engine) override
Definition: table_impl.h:157
void set_tablespace_id(Object_id tablespace_id) override
Definition: table_impl.h:140
bool store_attributes(Raw_record *r) override
Definition: table_impl.cc:467
bool has_trigger() const override
Check if table has any triggers.
Definition: table_impl.h:498
const Foreign_key_parent_collection & foreign_key_parents() const override
Definition: table_impl.h:381
Properties_impl m_se_private_data
Definition: table_impl.h:560
ulonglong last_altered(bool convert_time) const override
Definition: table_impl.h:456
void copy_triggers(const Table *tab_obj) override
Copy all the triggers from another dd::Table object.
Definition: table_impl.cc:909
Trigger * add_trigger_following(const Trigger *trigger, Trigger::enum_action_timing at, Trigger::enum_event_type et) override
Add new trigger just after the trigger specified in argument.
Definition: table_impl.cc:859
Foreign_key_parent_collection m_foreign_key_parents
Definition: table_impl.h:585
enum_partition_type m_partition_type
Definition: table_impl.h:571
enum_default_partitioning m_default_subpartitioning
Definition: table_impl.h:579
dd::String_type m_engine_attribute
Definition: table_impl.h:563
bool m_is_temporary
Definition: table_impl.h:567
String_type m_engine
Definition: table_impl.h:552
dd::String_type m_secondary_engine_attribute
Definition: table_impl.h:564
enum_default_partitioning default_subpartitioning() const override
Definition: table_impl.h:304
bool deserialize(Sdi_rcontext *rctx, const RJ_Value &val) override
Re-establishes the state of *this by reading sdi information from the rapidjson DOM subobject provide...
Definition: table_impl.cc:589
const Column_collection & columns() const override
Definition: table_impl.h:466
void add_leaf_partition(Partition *p)
Definition: table_impl.h:406
void set_engine_attribute(LEX_CSTRING a) override
Definition: table_impl.h:224
Properties & options() override
Definition: table_impl.h:443
const String_type & subpartition_expression() const override
Definition: table_impl.h:317
const Trigger_collection & triggers() const override
Get const reference to Trigger_collection.
Definition: table_impl.h:500
Partition_leaf_vector * leaf_partitions() override
Definition: table_impl.h:401
Trigger_collection m_triggers
Definition: table_impl.h:588
void set_default_subpartitioning(enum_default_partitioning default_subpartitioning) override
Definition: table_impl.h:308
Trigger * add_trigger_preceding(const Trigger *trigger, Trigger::enum_action_timing at, Trigger::enum_event_type et) override
Add new trigger just before the trigger specified in argument.
Definition: table_impl.cc:886
Index_collection m_indexes
Definition: table_impl.h:583
const String_type & subpartition_expression_utf8() const override
Definition: table_impl.h:330
const Column * get_column(Object_id column_id) const
Definition: table_impl.h:472
Partition_collection * partitions() override
Definition: table_impl.h:395
const Foreign_key_collection & foreign_keys() const override
Definition: table_impl.h:363
LEX_CSTRING secondary_engine_attribute() const override
Definition: table_impl.h:228
enum_subpartition_type subpartition_type() const override
Definition: table_impl.h:291
Foreign_key * add_foreign_key() override
Definition: table_impl.cc:751
const Properties & options() const override
Definition: table_impl.h:440
const Index * get_index(Object_id index_id) const
Definition: table_impl.h:351
Foreign_key_collection * foreign_keys() override
Definition: table_impl.h:367
Table_impl * clone_dropped_object_placeholder() const override
Allocate a new object which can serve as a placeholder for the original object in the Dictionary_clie...
Definition: table_impl.h:601
Column_collection * columns() override
Definition: table_impl.h:469
virtual Foreign_key_parent * add_foreign_key_parent()
Definition: table_impl.cc:761
uint last_checked_for_upgrade_version_id() const override
Definition: table_impl.h:180
void set_partition_expression(const String_type &partition_expression) override
Definition: table_impl.h:269
void set_se_private_id(Object_id se_private_id) override
Definition: table_impl.h:212
Column * get_column(Object_id column_id)
Definition: table_impl.h:475
Check_constraint * add_check_constraint() override
Definition: table_impl.cc:977
enum_hidden_type hidden() const override
Definition: table_impl.h:487
~Table_impl() override
Definition: table_impl.cc:107
const Partition * get_partition(Object_id partition_id) const
Definition: table_impl.h:408
enum_default_partitioning default_partitioning() const override
Definition: table_impl.h:252
uint get_max_action_order(Trigger::enum_action_timing at, Trigger::enum_event_type et) const
Definition: table_impl.cc:792
Partition_leaf_vector m_leaf_partitions
Definition: table_impl.h:587
bool drop_children(Open_dictionary_tables_ctx *otx) const override
Definition: table_impl.cc:378
bool set_options(const Properties &options) override
Definition: table_impl.h:444
static void register_tables(Open_dictionary_tables_ctx *otx)
Definition: table_impl.cc:1005
bool update_aux_key(Aux_key *key) const override
Definition: table_impl.h:484
enum_default_partitioning m_default_partitioning
Definition: table_impl.h:574
enum_row_format row_format() const override
Definition: table_impl.h:163
Check_constraint_collection * check_constraints() override
Definition: table_impl.h:543
void set_is_temporary(bool is_temporary) override
Definition: table_impl.h:120
const Check_constraint_collection & check_constraints() const override
Definition: table_impl.h:539
const String_type & name() const override
Definition: table_impl.h:425
bool is_persistent() const override
Is dictionary object persistent in dictionary tables ?
Definition: table_impl.h:422
bool reload_foreign_key_parents(THD *thd) override
Definition: table_impl.cc:231
void set_subpartition_expression(const String_type &subpartition_expression) override
Definition: table_impl.h:321
void serialize(Sdi_wcontext *wctx, Sdi_writer *w) const override
Converts *this into json.
Definition: table_impl.cc:547
void drop_trigger(const Trigger *trigger) override
Drop the given trigger object.
Definition: table_impl.cc:962
const Column * get_column(const String_type &name) const override
Definition: table_impl.h:478
Definition: table.h:47
std::vector< Foreign_key_parent * > Foreign_key_parent_collection
Definition: table.h:52
std::vector< Partition * > Partition_leaf_vector
Definition: table.h:65
enum_row_format
Definition: table.h:80
enum_partition_type
Definition: table.h:90
enum_subpartition_type
Definition: table.h:106
bool update_aux_key(Aux_key *key) const override
Definition: table.h:69
enum_default_partitioning
Definition: table.h:117
Definition: trigger_impl.h:54
Class representing a Trigger in DD framework.
Definition: trigger.h:54
enum_event_type
Definition: trigger.h:60
enum_action_timing
Definition: trigger.h:62
const char * p
Definition: ctype-mb.cc:1235
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
#define MYSQL_VERSION_ID
Definition: mysql_version.h:15
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
RJ_Writer Sdi_writer
Alias for the rapidjson Writer type to use in serialization.
Definition: sdi_fwd.h:64
unsigned long long Object_id
Definition: object_id.h:31
rapidjson::GenericValue< RJ_Encoding, RJ_Allocator > RJ_Value
Definition: sdi_fwd.h:49
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
enum_table_type
Definition: abstract_table.h:53
Definition: options.cc:57
static int exists(node_address *name, node_list const *nodes, u_int with_uid)
Definition: node_list.cc:106
partition_type
An enum and a struct to handle partitioning and subpartitioning.
Definition: partition_element.h:33
const mysql_service_registry_t * r
Definition: pfs_example_plugin_employee.cc:86
required string key
Definition: replication_asynchronous_connection_failover.proto:60
This header provides Rapidjson Type Aliases.
MYSQL_LEX_CSTRING lex_cstring_handle(const STDSTRINGLIKE_TYPE &s)
Return a LEX_CSTRING handle to a std::string like (meaning something which has the c_str() and length...
Definition: strfunc.h:74
Definition: mysql_lex_string.h:40
const char * str
Definition: mysql_lex_string.h:41
size_t length
Definition: mysql_lex_string.h:42