MySQL 8.4.2
Source Code Documentation
entity_object_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__ENTITY_OBJECT_TABLE_IMPL_INCLUDED
25#define DD__ENTITY_OBJECT_TABLE_IMPL_INCLUDED
26
27#include <sys/types.h>
28
29#include "my_compiler.h"
30#include "sql/dd/impl/types/object_table_impl.h" // Object_table_impl
31#include "sql/dd/types/entity_object_table.h" // dd::Entity_object_table
32
33class THD;
34
35namespace dd {
36
37///////////////////////////////////////////////////////////////////////////
38
39class Entity_object;
40class Object_table_definition;
41class Open_dictionary_tables_ctx;
42class Properties;
43class Raw_record;
44
46 public Entity_object_table {
47 public:
48 ~Entity_object_table_impl() override = default;
49
51 const Raw_record &record,
52 Entity_object **o) const override;
53
54 // Fix "inherits ... via dominance" warnings
55
56 const String_type &name() const override { return Object_table_impl::name(); }
57
60 }
61
64 }
65
66 void set_abandoned(uint last_dd_version) const override {
67 return Object_table_impl::set_abandoned(last_dd_version);
68 }
69
70 bool is_abandoned() const override {
72 }
73
76 }
77
79 const Properties &table_def_properties) const override {
80 return Object_table_impl::set_actual_table_definition(table_def_properties);
81 }
82
83 int field_number(int target_field_number,
84 const String_type &field_label) const override {
85 return Object_table_impl::field_number(target_field_number, field_label);
86 }
87
88 int field_number(const String_type &field_label) const override {
89 return Object_table_impl::field_number(field_label);
90 }
91
92 bool populate(THD *thd) const override {
94 }
95
96 bool is_hidden() const override { return Object_table_impl::is_hidden(); }
97
98 void set_hidden(bool hidden) override {
99 return Object_table_impl::set_hidden(hidden);
100 }
101};
102
103///////////////////////////////////////////////////////////////////////////
104
105} // namespace dd
106
107#endif // DD__ENTITY_OBJECT_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: entity_object_table_impl.h:46
Object_table_definition_impl * target_table_definition() override
Get the target definition for the dictionary table.
Definition: entity_object_table_impl.h:58
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:51
~Entity_object_table_impl() override=default
const Object_table_definition_impl * target_table_definition() const override
Definition: entity_object_table_impl.h:62
bool is_abandoned() const override
Check if the dictionary table is abandoned.
Definition: entity_object_table_impl.h:70
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:88
const Object_table_definition_impl * actual_table_definition() const override
Get the actual definition for the dictionary table.
Definition: entity_object_table_impl.h:74
bool populate(THD *thd) const override
Execute low level code for populating the table.
Definition: entity_object_table_impl.h:92
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:78
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:56
bool is_hidden() const override
Check if the table should be hidden.
Definition: entity_object_table_impl.h:96
int field_number(int target_field_number, const String_type &field_label) const override
Definition: entity_object_table_impl.h:83
void set_hidden(bool hidden) override
Mark the dictionary table as hidden or visible.
Definition: entity_object_table_impl.h:98
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:66
This class represents DD table like mysql.schemata, mysql.tables, mysql.tablespaces and more.
Definition: entity_object_table.h:49
Base class for dictionary objects which has single column integer primary key.
Definition: entity_object.h:48
Definition: object_table_definition_impl.h:44
Definition: object_table_impl.h:36
Object_table_definition_impl * target_table_definition() override
Get the target definition for the dictionary table.
Definition: object_table_impl.h:94
void set_hidden(bool hidden) override
Mark the dictionary table as hidden or visible.
Definition: object_table_impl.h:124
void set_abandoned(uint last_dd_version) const override
Mark the target definition for the dictionary table as abandoned.
Definition: object_table_impl.h:102
bool populate(THD *) const override
Execute low level code for populating the table.
Definition: object_table_impl.h:120
bool is_abandoned() const override
Check if the dictionary table is abandoned.
Definition: object_table_impl.h:106
const Object_table_definition_impl * actual_table_definition() const override
Get the actual definition for the dictionary table.
Definition: object_table_impl.h:108
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:55
virtual int field_number(int target_field_number, const String_type &field_label) const
Definition: object_table_impl.cc:61
const String_type & name() const override
Get the table name used by the target definition for the dictionary table.
Definition: object_table_impl.h:90
bool is_hidden() const override
Check if the table should be hidden.
Definition: object_table_impl.h:122
Auxiliary class for opening dictionary tables.
Definition: transaction_impl.h:76
The Properties class defines an interface for storing key=value pairs, where both key and value may b...
Definition: properties.h:74
Definition: raw_record.h:46
Header for compiler-dependent features.
static int record
Definition: mysqltest.cc:195
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51