MySQL  8.0.22
Source Code Documentation
entity_object_table_impl.h
Go to the documentation of this file.
1 /* Copyright (c) 2014, 2020, 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 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 DD__ENTITY_OBJECT_TABLE_IMPL_INCLUDED
24 #define DD__ENTITY_OBJECT_TABLE_IMPL_INCLUDED
25 
26 #include <sys/types.h>
27 
28 #include "my_compiler.h"
29 #include "sql/dd/impl/types/object_table_impl.h" // Object_table_impl
30 #include "sql/dd/types/entity_object_table.h" // dd::Entity_object_table
31 
32 class THD;
33 
34 namespace dd {
35 
36 ///////////////////////////////////////////////////////////////////////////
37 
38 class Entity_object;
39 class Object_table_definition;
40 class Open_dictionary_tables_ctx;
41 class Properties;
42 class Raw_record;
43 
45  public Entity_object_table {
46  public:
48 
50  const Raw_record &record,
51  Entity_object **o) const override;
52 
53  // Fix "inherits ... via dominance" warnings
54 
55  const String_type &name() const override { return Object_table_impl::name(); }
56 
59  }
60 
63  }
64 
65  void set_abandoned(uint last_dd_version) const override {
66  return Object_table_impl::set_abandoned(last_dd_version);
67  }
68 
69  bool is_abandoned() const override {
71  }
72 
75  }
76 
78  const Properties &table_def_properties) const override {
79  return Object_table_impl::set_actual_table_definition(table_def_properties);
80  }
81 
82  int field_number(int target_field_number,
83  const String_type &field_label) const override {
84  return Object_table_impl::field_number(target_field_number, field_label);
85  }
86 
87  int field_number(const String_type &field_label) const override {
88  return Object_table_impl::field_number(field_label);
89  }
90 
91  bool populate(THD *thd) const override {
92  return Object_table_impl::populate(thd);
93  }
94 
95  bool is_hidden() const override { return Object_table_impl::is_hidden(); }
96 
97  void set_hidden(bool hidden) override {
98  return Object_table_impl::set_hidden(hidden);
99  }
100 };
101 
102 ///////////////////////////////////////////////////////////////////////////
103 
104 } // namespace dd
105 
106 #endif // DD__ENTITY_OBJECT_TABLE_IMPL_INCLUDED
virtual int field_number(int target_field_number, const String_type &field_label) const
Definition: object_table_impl.cc:60
bool populate(THD *) const override
Execute low level code for populating the table.
Definition: object_table_impl.h:119
Object_table_definition_impl * target_table_definition() override
Get the target definition for the dictionary table.
Definition: entity_object_table_impl.h:57
Definition: mi_test3.cc:54
bool restore_object_from_record(Open_dictionary_tables_ctx *otx, const Raw_record &record, Entity_object **o) const override
Prepare a DD object by given raw record.
Definition: entity_object_table_impl.cc:50
bool is_abandoned() const override
Check if the dictionary table is abandoned.
Definition: entity_object_table_impl.h:69
This class represents DD table like mysql.schemata, mysql.tables, mysql.tablespaces and more...
Definition: entity_object_table.h:48
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:50
const Object_table_definition_impl * actual_table_definition() const override
Get the actual definition for the dictionary table.
Definition: entity_object_table_impl.h:73
Base class for dictionary objects which has single column integer primary key.
Definition: entity_object.h:47
Definition: object_table_impl.h:35
bool populate(THD *thd) const override
Execute low level code for populating the table.
Definition: entity_object_table_impl.h:91
bool is_hidden() const override
Check if the table should be hidden.
Definition: object_table_impl.h:121
int field_number(int target_field_number, const String_type &field_label) const override
Definition: entity_object_table_impl.h:82
void set_abandoned(uint last_dd_version) const override
Mark the target definition for the dictionary table as abandoned.
Definition: object_table_impl.h:101
Object_table_definition_impl * target_table_definition() override
Get the target definition for the dictionary table.
Definition: object_table_impl.h:93
bool set_actual_table_definition(const Properties &table_def_properties) const override
Set the actual definition for the dictionary table.
Definition: object_table_impl.cc:54
void set_hidden(bool hidden) override
Mark the dictionary table as hidden or visible.
Definition: object_table_impl.h:123
Header for compiler-dependent features.
unsigned int uint
Definition: uca-dump.cc:29
void set_abandoned(uint last_dd_version) const override
Mark the target definition for the dictionary table as abandoned.
Definition: entity_object_table_impl.h:65
The Properties class defines an interface for storing key=value pairs, where both key and value may b...
Definition: properties.h:73
~Entity_object_table_impl() override
Definition: entity_object_table_impl.h:47
void set_hidden(bool hidden) override
Mark the dictionary table as hidden or visible.
Definition: entity_object_table_impl.h:97
Auxiliary class for opening dictionary tables.
Definition: transaction_impl.h:75
const String_type & name() const override
Get the table name used by the target definition for the dictionary table.
Definition: entity_object_table_impl.h:55
bool is_abandoned() const override
Check if the dictionary table is abandoned.
Definition: object_table_impl.h:105
bool is_hidden() const override
Check if the table should be hidden.
Definition: entity_object_table_impl.h:95
bool set_actual_table_definition(const Properties &table_def_properties) const override
Set the actual definition for the dictionary table.
Definition: entity_object_table_impl.h:77
const Object_table_definition_impl * target_table_definition() const override
Definition: entity_object_table_impl.h:61
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:40
int field_number(const String_type &field_label) const override
Get the field ordinal position in the object table.
Definition: entity_object_table_impl.h:87
Definition: raw_record.h:53
const Object_table_definition_impl * actual_table_definition() const override
Get the actual definition for the dictionary table.
Definition: object_table_impl.h:107
Definition: object_table_definition_impl.h:41
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_class.h:803
const String_type & name() const override
Get the table name used by the target definition for the dictionary table.
Definition: object_table_impl.h:89
Definition: entity_object_table_impl.h:44