MySQL 9.1.0
Source Code Documentation
|
#include <dict0dict.h>
Public Types | |
using | Table_LRU_list_base = UT_LIST_BASE_NODE_T(dict_table_t, table_LRU) |
Public Member Functions | |
template<typename Functor > | |
void | for_each_table (Functor &functor) |
Iterate each table. More... | |
Static Public Member Functions | |
static bool | is_reserved (space_id_t space) |
Check if a tablespace id is a reserved tablespace ID. More... | |
static bool | is_dd_table_id (table_id_t id) |
Check if a table is hardcoded. More... | |
Public Attributes | |
DictSysMutex | mutex |
mutex protecting the data dictionary; protects also the disk-based dictionary system tables; this mutex serializes CREATE TABLE and DROP TABLE, as well as reading the dictionary data for a table from system tables More... | |
row_id_t | row_id |
the next row id to assign; NOTE that at a checkpoint this must be written to the dict system header and flushed to a file; in recovery this must be derived from the log records More... | |
hash_table_t * | table_hash |
hash table of the tables, based on name More... | |
hash_table_t * | table_id_hash |
hash table of the tables, based on id More... | |
size_t | size |
varying space in bytes occupied by the data dictionary table and index objects More... | |
dict_table_t * | sys_tables |
Handler to sys_* tables, they're only for upgrade. More... | |
dict_table_t * | sys_columns |
SYS_COLUMNS table. More... | |
dict_table_t * | sys_indexes |
SYS_INDEXES table. More... | |
dict_table_t * | sys_fields |
SYS_FIELDS table. More... | |
dict_table_t * | sys_virtual |
SYS_VIRTUAL table. More... | |
dict_table_t * | table_stats |
Permanent handle to mysql.innodb_table_stats. More... | |
dict_table_t * | index_stats |
Permanent handle to mysql.innodb_index_stats. More... | |
dict_table_t * | ddl_log |
Permanent handle to mysql.innodb_ddl_log. More... | |
dict_table_t * | dynamic_metadata |
Permanent handle to mysql.innodb_dynamic_metadata. More... | |
Table_LRU_list_base | table_LRU |
List of tables that can be evicted from the cache. More... | |
Table_LRU_list_base | table_non_LRU |
List of tables that can't be evicted from the cache. More... | |
Static Public Attributes | |
static std::set< dd::Object_id > | s_dd_table_ids = {} |
Set of ids of DD tables. More... | |
static constexpr space_id_t | s_log_space_id = 0xFFFFFFF0UL |
The first ID of the redo log pseudo-tablespace. More... | |
static constexpr space_id_t | s_invalid_space_id = 0xFFFFFFFF |
Use maximum UINT value to indicate invalid space ID. More... | |
static constexpr space_id_t | s_dict_space_id = 0xFFFFFFFE |
The data dictionary tablespace ID. More... | |
static constexpr space_id_t | s_temp_space_id = 0xFFFFFFFD |
The innodb_temporary tablespace ID. More... | |
static constexpr space_id_t | s_undo_space_id_range = 400000 |
The number of space IDs dedicated to each undo tablespace. More... | |
static constexpr space_id_t | s_min_undo_space_id |
The lowest undo tablespace ID. More... | |
static constexpr space_id_t | s_max_undo_space_id = s_log_space_id - 1 |
The highest undo tablespace ID. More... | |
static constexpr space_id_t | s_max_temp_space_id = s_min_undo_space_id - 1 |
Start space_ids for temporary tablespaces. More... | |
static constexpr space_id_t | s_temp_space_id_range = 400000 |
The number of space IDs dedicated to temporary tablespaces. More... | |
static constexpr space_id_t | s_min_temp_space_id |
Lowest temporary general space id. More... | |
static constexpr space_id_t | s_reserved_space_id = s_min_temp_space_id |
The first reserved tablespace ID. More... | |
static constexpr dd::Object_id | s_dd_dict_space_id = 1 |
The dd::Tablespace::id of the dictionary tablespace. More... | |
static constexpr dd::Object_id | s_dd_sys_space_id = 2 |
The dd::Tablespace::id of innodb_system. More... | |
static constexpr dd::Object_id | s_dd_temp_space_id = 3 |
The dd::Tablespace::id of innodb_temporary. More... | |
static const char * | s_dd_space_name = "mysql" |
The name of the data dictionary tablespace. More... | |
static const char * | s_dd_space_file_name = "mysql.ibd" |
The file name of the data dictionary tablespace. More... | |
static const char * | s_sys_space_name = "innodb_system" |
The name of the hard-coded system tablespace. More... | |
static const char * | s_temp_space_name = "innodb_temporary" |
The name of the predefined temporary tablespace. More... | |
static const char * | s_temp_space_file_name = "ibtmp1" |
The file name of the predefined temporary tablespace. More... | |
static const char * | s_file_per_table_name = "innodb_file_per_table" |
The hard-coded tablespace name innodb_file_per_table. More... | |
static const char * | s_default_undo_space_name_1 = "innodb_undo_001" |
These two undo tablespaces cannot be dropped. More... | |
static const char * | s_default_undo_space_name_2 = "innodb_undo_002" |
static constexpr table_id_t | s_dynamic_meta_table_id = 2 |
The table ID of mysql.innodb_dynamic_metadata. More... | |
static constexpr space_index_t | s_dynamic_meta_index_id = 2 |
The clustered index ID of mysql.innodb_dynamic_metadata. More... | |
|
inline |
Iterate each table.
Functor | visitor |
[in,out] | functor | to be invoked on each table |
|
inlinestatic |
Check if a table is hardcoded.
it only includes the dd tables
[in] | id | table ID |
true | if the table is a persistent hard-coded table (dict_table_t::is_temporary() will not hold) |
false | if the table is not hard-coded (it can be persistent or temporary) |
|
inlinestatic |
Check if a tablespace id is a reserved tablespace ID.
[in] | space | tablespace id to check |
dict_table_t* dict_sys_t::ddl_log |
Permanent handle to mysql.innodb_ddl_log.
dict_table_t* dict_sys_t::dynamic_metadata |
Permanent handle to mysql.innodb_dynamic_metadata.
dict_table_t* dict_sys_t::index_stats |
Permanent handle to mysql.innodb_index_stats.
DictSysMutex dict_sys_t::mutex |
mutex protecting the data dictionary; protects also the disk-based dictionary system tables; this mutex serializes CREATE TABLE and DROP TABLE, as well as reading the dictionary data for a table from system tables
row_id_t dict_sys_t::row_id |
the next row id to assign; NOTE that at a checkpoint this must be written to the dict system header and flushed to a file; in recovery this must be derived from the log records
|
staticconstexpr |
The dd::Tablespace::id of the dictionary tablespace.
|
static |
The file name of the data dictionary tablespace.
|
static |
The name of the data dictionary tablespace.
|
staticconstexpr |
The dd::Tablespace::id of innodb_system.
|
static |
Set of ids of DD tables.
The set of SE private IDs of DD tables.
Used to tell whether a table is a DD table. Since the DD tables can be rebuilt with new SE private IDs, this set replaces checks based on ranges of IDs.
|
staticconstexpr |
The dd::Tablespace::id of innodb_temporary.
|
static |
These two undo tablespaces cannot be dropped.
|
static |
|
staticconstexpr |
The data dictionary tablespace ID.
|
staticconstexpr |
The clustered index ID of mysql.innodb_dynamic_metadata.
|
staticconstexpr |
The table ID of mysql.innodb_dynamic_metadata.
|
static |
The hard-coded tablespace name innodb_file_per_table.
|
staticconstexpr |
Use maximum UINT value to indicate invalid space ID.
|
staticconstexpr |
The first ID of the redo log pseudo-tablespace.
|
staticconstexpr |
Start space_ids for temporary tablespaces.
|
staticconstexpr |
The highest undo tablespace ID.
|
staticconstexpr |
Lowest temporary general space id.
|
staticconstexpr |
The lowest undo tablespace ID.
|
staticconstexpr |
The first reserved tablespace ID.
|
static |
The name of the hard-coded system tablespace.
|
static |
The file name of the predefined temporary tablespace.
|
staticconstexpr |
The innodb_temporary tablespace ID.
|
staticconstexpr |
The number of space IDs dedicated to temporary tablespaces.
|
static |
The name of the predefined temporary tablespace.
|
staticconstexpr |
The number of space IDs dedicated to each undo tablespace.
size_t dict_sys_t::size |
varying space in bytes occupied by the data dictionary table and index objects
dict_table_t* dict_sys_t::sys_columns |
SYS_COLUMNS table.
dict_table_t* dict_sys_t::sys_fields |
SYS_FIELDS table.
dict_table_t* dict_sys_t::sys_indexes |
SYS_INDEXES table.
dict_table_t* dict_sys_t::sys_tables |
Handler to sys_* tables, they're only for upgrade.
SYS_TABLES table
dict_table_t* dict_sys_t::sys_virtual |
SYS_VIRTUAL table.
hash_table_t* dict_sys_t::table_hash |
hash table of the tables, based on name
hash_table_t* dict_sys_t::table_id_hash |
hash table of the tables, based on id
Table_LRU_list_base dict_sys_t::table_LRU |
List of tables that can be evicted from the cache.
Table_LRU_list_base dict_sys_t::table_non_LRU |
List of tables that can't be evicted from the cache.
dict_table_t* dict_sys_t::table_stats |
Permanent handle to mysql.innodb_table_stats.