MySQL  8.0.18
Source Code Documentation
dd::Entity_object_table_impl Class Reference

#include <entity_object_table_impl.h>

Inheritance diagram for dd::Entity_object_table_impl:
dd::Object_table_impl dd::Entity_object_table dd::Object_table dd::Object_table dd::tables::Character_sets dd::tables::Collations dd::tables::Column_statistics dd::tables::Events dd::tables::Index_stats dd::tables::Resource_groups dd::tables::Routines dd::tables::Schemata dd::tables::Spatial_reference_systems dd::tables::Table_stats dd::tables::Tables dd::tables::Tablespaces

Public Member Functions

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

Additional Inherited Members

- Public Types inherited from dd::Object_table_impl
enum  Common_option {
  Common_option::ENGINE, Common_option::CHARSET, Common_option::COLLATION, Common_option::ROW_FORMAT,
  Common_option::STATS_PERSISTENT, Common_option::TABLESPACE
}
 
enum  Common_index { Common_index::PK_ID, Common_index::UK_NAME }
 
enum  Common_field { Common_field::ID }
 
- Static Public Member Functions inherited from dd::Object_table
static Object_tablecreate_object_table ()
 Allocate a new Object_table instance on the heap. More...
 
- Protected Attributes inherited from dd::Object_table_impl
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
 

Constructor & Destructor Documentation

◆ ~Entity_object_table_impl()

virtual dd::Entity_object_table_impl::~Entity_object_table_impl ( )
inlinevirtual

Member Function Documentation

◆ actual_table_definition()

virtual const Object_table_definition_impl* dd::Entity_object_table_impl::actual_table_definition ( ) const
inlinevirtual

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.

Reimplemented from dd::Object_table_impl.

◆ field_number() [1/2]

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

Reimplemented from dd::Object_table_impl.

◆ field_number() [2/2]

virtual int dd::Entity_object_table_impl::field_number ( const String_type field_label) const
inlinevirtual

Get the field ordinal position in the object table.

Returns
Integer ordinal position.

Reimplemented from dd::Object_table_impl.

◆ is_abandoned()

virtual bool dd::Entity_object_table_impl::is_abandoned ( ) const
inlinevirtual

Check if the dictionary table is abandoned.

Returns
true if the table is abandoned.

Reimplemented from dd::Object_table_impl.

◆ is_hidden()

virtual bool dd::Entity_object_table_impl::is_hidden ( ) const
inlinevirtual

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.

Reimplemented from dd::Object_table_impl.

◆ name()

virtual const String_type& dd::Entity_object_table_impl::name ( ) const
inlinevirtual

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

Returns
table name.

Reimplemented from dd::Object_table_impl.

◆ populate()

virtual bool dd::Entity_object_table_impl::populate ( THD thd) const
inlinevirtual

Execute low level code for populating the table.

Returns
Boolean operation outcome, false if success.

Reimplemented from dd::Object_table_impl.

Reimplemented in dd::tables::Collations, and dd::tables::Character_sets.

◆ restore_object_from_record()

bool dd::Entity_object_table_impl::restore_object_from_record ( Open_dictionary_tables_ctx otx,
const Raw_record record,
Entity_object **  o 
) const
virtual

Prepare a DD object by given raw record.

Parameters
otx- Context with information about open tables.
record- raw record from which the object is to be prepare.
o(OUT) - The object that is prepared.
Returns
true - on failure and error is reported.
false - on success.

Implements dd::Entity_object_table.

◆ set_abandoned()

virtual void dd::Entity_object_table_impl::set_abandoned ( uint  last_dd_version) const
inlinevirtual

Mark the target definition for the dictionary table as abandoned.

Parameters
last_dd_versionLast version where this object table was used.

Reimplemented from dd::Object_table_impl.

◆ set_actual_table_definition()

virtual bool dd::Entity_object_table_impl::set_actual_table_definition ( const Properties table_def_properties) const
inlinevirtual

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.

Reimplemented from dd::Object_table_impl.

◆ set_hidden()

virtual void dd::Entity_object_table_impl::set_hidden ( bool  hidden)
inlinevirtual

Mark the dictionary table as hidden or visible.

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

Reimplemented from dd::Object_table_impl.

◆ target_table_definition() [1/2]

virtual Object_table_definition_impl* dd::Entity_object_table_impl::target_table_definition ( )
inlinevirtual

Get the target definition for the dictionary table.

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

Reimplemented from dd::Object_table_impl.

◆ target_table_definition() [2/2]

virtual const Object_table_definition_impl* dd::Entity_object_table_impl::target_table_definition ( ) const
inlinevirtual

Reimplemented from dd::Object_table_impl.


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