MySQL 8.0.39
Source Code Documentation
dd::Object_table_impl Class Reference

#include <object_table_impl.h>

Inheritance diagram for dd::Object_table_impl:
[legend]

Public Types

enum class  Common_option {
  ENGINE , CHARSET , COLLATION , ROW_FORMAT ,
  STATS_PERSISTENT , TABLESPACE
}
 
enum class  Common_index { PK_ID , UK_NAME }
 
enum class  Common_field { ID }
 

Public Member Functions

 Object_table_impl (const String_type &schema_name, const String_type &table_name, const String_type &ddl_statement)
 
 Object_table_impl ()
 
const String_typename () const override
 Get the table name used by the target definition for the dictionary table. More...
 
Object_table_definition_impltarget_table_definition () override
 Get the target definition for the dictionary table. More...
 
const Object_table_definition_impltarget_table_definition () const override
 
void set_abandoned (uint last_dd_version) const override
 Mark the target definition for the dictionary table as abandoned. More...
 
bool is_abandoned () const override
 Check if the dictionary table is abandoned. More...
 
const Object_table_definition_implactual_table_definition () const override
 Get the actual definition for the dictionary table. More...
 
bool set_actual_table_definition (const Properties &table_def_properties) const override
 Set the actual definition for the dictionary table. More...
 
virtual int field_number (int target_field_number, const String_type &field_label) const
 
int field_number (const String_type &field_label) const override
 Get the field ordinal position in the object table. More...
 
bool populate (THD *) const override
 Execute low level code for populating the table. More...
 
bool is_hidden () const override
 Check if the table should be hidden. More...
 
void set_hidden (bool hidden) override
 Mark the dictionary table as hidden or visible. More...
 
 ~Object_table_impl () override=default
 
- Public Member Functions inherited from dd::Object_table
virtual ~Object_table ()=default
 

Protected Attributes

uint m_last_dd_version
 
Object_table_definition_impl m_target_def
 
bool m_actual_present
 
Object_table_definition_impl m_actual_def
 
bool m_hidden
 

Additional Inherited Members

- Static Public Member Functions inherited from dd::Object_table
static Object_tablecreate_object_table ()
 Allocate a new Object_table instance on the heap. More...
 

Member Enumeration Documentation

◆ Common_field

Enumerator
ID 

◆ Common_index

Enumerator
PK_ID 
UK_NAME 

◆ Common_option

Enumerator
ENGINE 
CHARSET 
COLLATION 
ROW_FORMAT 
STATS_PERSISTENT 
TABLESPACE 

Constructor & Destructor Documentation

◆ Object_table_impl() [1/2]

dd::Object_table_impl::Object_table_impl ( const String_type schema_name,
const String_type table_name,
const String_type ddl_statement 
)
inline

◆ Object_table_impl() [2/2]

dd::Object_table_impl::Object_table_impl ( )

◆ ~Object_table_impl()

dd::Object_table_impl::~Object_table_impl ( )
overridedefault

Member Function Documentation

◆ actual_table_definition()

const Object_table_definition_impl * dd::Object_table_impl::actual_table_definition ( ) const
inlineoverridevirtual

Get the actual definition for the dictionary table.

The actual definition is the definition which is used by a DD table which is stored persistently. Normally, for an ordinary running server, the actual table definitions are equal to the target table definitions. In an upgrade context, they may differ.

Returns
Pointer to the definition of the table.

Implements dd::Object_table.

◆ field_number() [1/2]

int dd::Object_table_impl::field_number ( const String_type field_label) const
overridevirtual

Get the field ordinal position in the object table.

Returns
Integer ordinal position.

Implements dd::Object_table.

◆ field_number() [2/2]

int dd::Object_table_impl::field_number ( int  target_field_number,
const String_type field_label 
) const
virtual

Reimplemented in dd::Entity_object_table_impl.

◆ is_abandoned()

bool dd::Object_table_impl::is_abandoned ( ) const
inlineoverridevirtual

Check if the dictionary table is abandoned.

Returns
true if the table is abandoned.

Implements dd::Object_table.

◆ is_hidden()

bool dd::Object_table_impl::is_hidden ( ) const
inlineoverridevirtual

Check if the table should be hidden.

Most of Object tables (alias DD tables) are hidden from users, but some of them are expected to be visible (not hidden) to user and be able to update them, e.g., innodb_index_stats/innodb_table_stats.

Returns
true if the table should be hidden.

Implements dd::Object_table.

◆ name()

const String_type & dd::Object_table_impl::name ( ) const
inlineoverridevirtual

Get the table name used by the target definition for the dictionary table.

Returns
table name.

Implements dd::Object_table.

◆ populate()

bool dd::Object_table_impl::populate ( THD thd) const
inlineoverridevirtual

Execute low level code for populating the table.

Returns
Boolean operation outcome, false if success.

Implements dd::Object_table.

◆ set_abandoned()

void dd::Object_table_impl::set_abandoned ( uint  last_dd_version) const
inlineoverridevirtual

Mark the target definition for the dictionary table as abandoned.

Parameters
last_dd_versionLast version where this object table was used.

Implements dd::Object_table.

◆ set_actual_table_definition()

bool dd::Object_table_impl::set_actual_table_definition ( const Properties table_def_properties) const
overridevirtual

Set the actual definition for the dictionary table.

Parameters
table_def_propertiesActual table definition represented as a set of properties.
Returns
false if no error.

Implements dd::Object_table.

◆ set_hidden()

void dd::Object_table_impl::set_hidden ( bool  hidden)
inlineoverridevirtual

Mark the dictionary table as hidden or visible.

Parameters
hiddenSet to 'true' if the table should be hidden.

Implements dd::Object_table.

◆ target_table_definition() [1/2]

const Object_table_definition_impl * dd::Object_table_impl::target_table_definition ( ) const
inlineoverridevirtual

Implements dd::Object_table.

◆ target_table_definition() [2/2]

Object_table_definition_impl * dd::Object_table_impl::target_table_definition ( )
inlineoverridevirtual

Get the target definition for the dictionary table.

Note
There are const and non-const variants.
Returns
Pointer to the definition of the table.

Implements dd::Object_table.

Member Data Documentation

◆ m_actual_def

Object_table_definition_impl dd::Object_table_impl::m_actual_def
mutableprotected

◆ m_actual_present

bool dd::Object_table_impl::m_actual_present
mutableprotected

◆ m_hidden

bool dd::Object_table_impl::m_hidden
protected

◆ m_last_dd_version

uint dd::Object_table_impl::m_last_dd_version
mutableprotected

◆ m_target_def

Object_table_definition_impl dd::Object_table_impl::m_target_def
protected

The documentation for this class was generated from the following files: