MySQL 8.4.2
Source Code Documentation
dd::Dictionary_impl Class Reference

#include <dictionary_impl.h>

Inheritance diagram for dd::Dictionary_impl:
[legend]

Public Member Functions

 ~Dictionary_impl () override=default
 
virtual uint get_actual_dd_version (THD *thd)
 
virtual uint get_actual_I_S_version (THD *thd)
 
virtual uint get_actual_P_S_version (THD *thd)
 
virtual bool get_actual_ndbinfo_schema_version (THD *thd, uint *version)
 
uint set_I_S_version (THD *thd, uint version)
 
uint set_P_S_version (THD *thd, uint version)
 
uint set_ndbinfo_schema_version (THD *thd, uint version)
 
const Object_tableget_dd_table (const String_type &schema_name, const String_type &table_name) const override
 Get dictionary object for a given dictionary table name. More...
 
bool is_dd_schema_name (const String_type &schema_name) const override
 Check if the given schema name is 'mysql', which where the DD tables are stored. More...
 
bool is_dd_table_name (const String_type &schema_name, const String_type &table_name) const override
 Check if given table name is a dictionary table name. More...
 
bool is_system_table_name (const String_type &schema_name, const String_type &table_name) const override
 Check if given table name is a system table name. More...
 
int table_type_error_code (const String_type &schema_name, const String_type &table_name) const override
 Get the error code representing the type name string for a dictionary or system table. More...
 
bool is_dd_table_access_allowed (bool is_dd_internal_thread, bool is_ddl_statement, const char *schema_name, size_t schema_length, const char *table_name) const override
 Check if given table name can be accessed by the given thread type. More...
 
bool is_system_view_name (const char *schema_name, const char *table_name, bool *hidden) const override
 Check if given table name is a system view name. More...
 
bool is_system_view_name (const char *schema_name, const char *table_name) const override
 Check if given table name is a system view name. More...
 
- Public Member Functions inherited from dd::Dictionary
virtual ~Dictionary ()=default
 

Static Public Member Functions

static bool init (enum_dd_init_type dd_init)
 
static bool shutdown ()
 
static Dictionary_implinstance ()
 
static uint get_target_dd_version ()
 
static uint get_target_I_S_version ()
 
static uint get_target_P_S_version ()
 
static Object_id default_catalog_id ()
 
static Object_id dd_tablespace_id ()
 
static const String_typedefault_catalog_name ()
 

Private Member Functions

 Dictionary_impl ()=default
 

Static Private Attributes

static Dictionary_impls_instance = nullptr
 
static Object_id DEFAULT_CATALOG_ID = 1
 
static Object_id DD_TABLESPACE_ID = 1
 
static const String_type DEFAULT_CATALOG_NAME
 

Friends

class dd_schema_unittest::SchemaTest
 
class my_testing::DD_initializer
 
template<typename T >
class dd_column_statistics_unittest::ColumnStatisticsTest
 

Constructor & Destructor Documentation

◆ Dictionary_impl()

dd::Dictionary_impl::Dictionary_impl ( )
privatedefault

◆ ~Dictionary_impl()

dd::Dictionary_impl::~Dictionary_impl ( )
overridedefault

Member Function Documentation

◆ dd_tablespace_id()

static Object_id dd::Dictionary_impl::dd_tablespace_id ( )
inlinestatic

◆ default_catalog_id()

static Object_id dd::Dictionary_impl::default_catalog_id ( )
inlinestatic

◆ default_catalog_name()

static const String_type & dd::Dictionary_impl::default_catalog_name ( )
inlinestatic

◆ get_actual_dd_version()

uint dd::Dictionary_impl::get_actual_dd_version ( THD thd)
virtual

◆ get_actual_I_S_version()

uint dd::Dictionary_impl::get_actual_I_S_version ( THD thd)
virtual

◆ get_actual_ndbinfo_schema_version()

bool dd::Dictionary_impl::get_actual_ndbinfo_schema_version ( THD thd,
uint *  version 
)
virtual

◆ get_actual_P_S_version()

uint dd::Dictionary_impl::get_actual_P_S_version ( THD thd)
virtual

◆ get_dd_table()

const Object_table * dd::Dictionary_impl::get_dd_table ( const String_type schema_name,
const String_type table_name 
) const
overridevirtual

Get dictionary object for a given dictionary table name.

If the given schema_name and table_name is not a dictionary table name, then the function returns NULL.

Returns
Pointer to dictionary object for the given dictionary table name, else NULL.

Implements dd::Dictionary.

◆ get_target_dd_version()

uint dd::Dictionary_impl::get_target_dd_version ( )
static

◆ get_target_I_S_version()

uint dd::Dictionary_impl::get_target_I_S_version ( )
static

◆ get_target_P_S_version()

uint dd::Dictionary_impl::get_target_P_S_version ( )
static

◆ init()

bool dd::Dictionary_impl::init ( enum_dd_init_type  dd_init)
static

◆ instance()

Dictionary_impl * dd::Dictionary_impl::instance ( )
static

◆ is_dd_schema_name()

bool dd::Dictionary_impl::is_dd_schema_name ( const String_type schema_name) const
inlineoverridevirtual

Check if the given schema name is 'mysql', which where the DD tables are stored.

Parameters
schema_nameSchema name to check.
Returns
true - If schema_name is 'mysql'
false - If schema_name is not 'mysql'

Implements dd::Dictionary.

◆ is_dd_table_access_allowed()

bool dd::Dictionary_impl::is_dd_table_access_allowed ( bool  is_dd_internal_thread,
bool  is_ddl_statement,
const char *  schema_name,
size_t  schema_length,
const char *  table_name 
) const
overridevirtual

Check if given table name can be accessed by the given thread type.

Parameters
is_dd_internal_thread'true' if this is a DD internal thread.
is_ddl_statement'true' if this is a DDL statement.
schema_nameSchema name to check.
schema_lengthLength of schema name to check.
table_nameTable name to check.
Returns
true - If given table name is accessible by the thread type.
false - If table name is not accessible.

Implements dd::Dictionary.

◆ is_dd_table_name()

bool dd::Dictionary_impl::is_dd_table_name ( const String_type schema_name,
const String_type table_name 
) const
overridevirtual

Check if given table name is a dictionary table name.

Parameters
schema_nameSchema name to check.
table_nameTable name to check.
Returns
true - If given table name is a dictionary table.
false - If table name is not a dictionary table.

Implements dd::Dictionary.

◆ is_system_table_name()

bool dd::Dictionary_impl::is_system_table_name ( const String_type schema_name,
const String_type table_name 
) const
overridevirtual

Check if given table name is a system table name.

Parameters
schema_nameSchema name to check.
table_nameTable name to check.
Returns
true - If given table name is a system table.
false - If table name is not a system table.

Implements dd::Dictionary.

◆ is_system_view_name() [1/2]

bool dd::Dictionary_impl::is_system_view_name ( const char *  schema_name,
const char *  table_name 
) const
inlineoverridevirtual

Check if given table name is a system view name.

Parameters
schema_nameSchema name to check.
table_nameTable name to check.
Returns
true - If given table name is a system view.
false - If table name is not a system view.

Implements dd::Dictionary.

◆ is_system_view_name() [2/2]

bool dd::Dictionary_impl::is_system_view_name ( const char *  schema_name,
const char *  table_name,
bool *  hidden 
) const
overridevirtual

Check if given table name is a system view name.

Parameters
schema_nameSchema name to check.
table_nameTable name to check.
[out]hiddenPointer to boolean flag indicating if the object is hidden.
Returns
true - If given table name is a system view.
false - If table name is not a system view.

Implements dd::Dictionary.

◆ set_I_S_version()

uint dd::Dictionary_impl::set_I_S_version ( THD thd,
uint  version 
)

◆ set_ndbinfo_schema_version()

uint dd::Dictionary_impl::set_ndbinfo_schema_version ( THD thd,
uint  version 
)

◆ set_P_S_version()

uint dd::Dictionary_impl::set_P_S_version ( THD thd,
uint  version 
)

◆ shutdown()

bool dd::Dictionary_impl::shutdown ( )
static

◆ table_type_error_code()

int dd::Dictionary_impl::table_type_error_code ( const String_type schema_name,
const String_type table_name 
) const
overridevirtual

Get the error code representing the type name string for a dictionary or system table.

Necessary to support localization of error messages.

Parameters
schema_nameSchema name to check.
table_nameTable name to check.
Returns
The error code representing the type name associated with the table, for being used in error messages.

Implements dd::Dictionary.

Friends And Related Function Documentation

◆ dd_column_statistics_unittest::ColumnStatisticsTest

template<typename T >
friend class dd_column_statistics_unittest::ColumnStatisticsTest
friend

◆ dd_schema_unittest::SchemaTest

friend class dd_schema_unittest::SchemaTest
friend

◆ my_testing::DD_initializer

friend class my_testing::DD_initializer
friend

Member Data Documentation

◆ DD_TABLESPACE_ID

Object_id dd::Dictionary_impl::DD_TABLESPACE_ID = 1
staticprivate

◆ DEFAULT_CATALOG_ID

Object_id dd::Dictionary_impl::DEFAULT_CATALOG_ID = 1
staticprivate

◆ DEFAULT_CATALOG_NAME

const String_type dd::Dictionary_impl::DEFAULT_CATALOG_NAME
staticprivate

◆ s_instance

Dictionary_impl * dd::Dictionary_impl::s_instance = nullptr
staticprivate

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