![]() |
MySQL 8.0.40
Source Code Documentation
|
Data dictionary creation and booting. More...
#include "univ.i"
#include "buf0buf.h"
#include "dict0dict.h"
#include "fsp0fsp.h"
#include "mtr0log.h"
#include "mtr0mtr.h"
#include "ut0byte.h"
#include "dict0boot.ic"
Go to the source code of this file.
Typedefs | |
typedef byte | dict_hdr_t |
Functions | |
dict_hdr_t * | dict_hdr_get (mtr_t *mtr) |
Gets a pointer to the dictionary header and x-latches its page. More... | |
void | dict_hdr_get_new_id (table_id_t *table_id, space_index_t *index_id, space_id_t *space_id, const dict_table_t *table, bool disable_redo) |
Returns a new table, index, or space id. More... | |
void | dict_hdr_flush_row_id (void) |
Writes the current value of the row id counter to the dictionary header file page. More... | |
static row_id_t | dict_sys_get_new_row_id (void) |
Returns a new row id. More... | |
static row_id_t | dict_sys_read_row_id (const byte *field) |
Reads a row id from a record or other 6-byte stored form. More... | |
static void | dict_sys_write_row_id (byte *field, row_id_t row_id) |
Writes a row id to a record or other 6-byte stored form. More... | |
static bool | dict_is_old_sys_table (table_id_t id) |
Check if a table id belongs to old innodb internal system table. More... | |
dberr_t | dict_boot (void) |
Initializes the data dictionary memory structures when the database is started. More... | |
dberr_t | dict_create (void) |
Creates and initializes the data dictionary at the server bootstrap. More... | |
Variables | |
constexpr uint32_t | DICT_TABLES_ID = 1 |
The ids for the basic system tables and their indexes. More... | |
constexpr uint32_t | DICT_COLUMNS_ID = 2 |
constexpr uint32_t | DICT_INDEXES_ID = 3 |
constexpr uint32_t | DICT_FIELDS_ID = 4 |
constexpr uint32_t | DICT_TABLE_IDS_ID = 5 |
constexpr uint32_t | DICT_HDR_FIRST_ID = 10 |
the ids for tables etc. More... | |
constexpr uint32_t | DICT_HDR = FSEG_PAGE_DATA |
constexpr uint32_t | DICT_HDR_ROW_ID = 0 |
The latest assigned row id. More... | |
constexpr uint32_t | DICT_HDR_TABLE_ID = 8 |
The latest assigned table id. More... | |
constexpr uint32_t | DICT_HDR_INDEX_ID = 16 |
The latest assigned index id. More... | |
constexpr uint32_t | DICT_HDR_MAX_SPACE_ID = 24 |
The latest assigned space id,or 0. More... | |
constexpr uint32_t | DICT_HDR_MIX_ID_LOW = 28 |
Obsolete,always DICT_HDR_FIRST_ID. More... | |
constexpr uint32_t | DICT_HDR_TABLES = 32 |
Root of SYS_TABLES clust index. More... | |
constexpr uint32_t | DICT_HDR_TABLE_IDS = 36 |
Root of SYS_TABLE_IDS sec index. More... | |
constexpr uint32_t | DICT_HDR_COLUMNS = 40 |
Root of SYS_COLUMNS clust index. More... | |
constexpr uint32_t | DICT_HDR_INDEXES = 44 |
Root of SYS_INDEXES clust index. More... | |
constexpr uint32_t | DICT_HDR_FIELDS = 48 |
Root of SYS_FIELDS clust index. More... | |
constexpr uint32_t | DICT_HDR_FSEG_HEADER = 56 |
constexpr uint32_t | DICT_FLD_LEN_SPACE = 4 |
constexpr uint32_t | DICT_FLD_LEN_FLAGS = 4 |
constexpr uint32_t | DICT_HDR_ROW_ID_WRITE_MARGIN = 256 |
Data dictionary creation and booting.
Created 4/18/1996 Heikki Tuuri
typedef byte dict_hdr_t |
dberr_t dict_boot | ( | void | ) |
Initializes the data dictionary memory structures when the database is started.
This function is also called when the data dictionary is created.
dberr_t dict_create | ( | void | ) |
Creates and initializes the data dictionary at the server bootstrap.
void dict_hdr_flush_row_id | ( | void | ) |
Writes the current value of the row id counter to the dictionary header file page.
dict_hdr_t * dict_hdr_get | ( | mtr_t * | mtr | ) |
Gets a pointer to the dictionary header and x-latches its page.
mtr | in: mtr |
void dict_hdr_get_new_id | ( | table_id_t * | table_id, |
space_index_t * | index_id, | ||
space_id_t * | space_id, | ||
const dict_table_t * | table, | ||
bool | disable_redo | ||
) |
Returns a new table, index, or space id.
[out] | table_id | Table id (not assigned if null) |
[out] | index_id | Index id (not assigned if null) |
[out] | space_id | Space id (not assigned if null) |
[in] | table | Table |
[in] | disable_redo | If true and table object is null then disable-redo |
|
inlinestatic |
Check if a table id belongs to old innodb internal system table.
[in] | id | table id |
|
inlinestatic |
Returns a new row id.
Reads a row id from a record or other 6-byte stored form.
Writes a row id to a record or other 6-byte stored form.
[in] | field | record field |
[in] | row_id | row id |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
Root of SYS_COLUMNS clust index.
|
constexpr |
Root of SYS_FIELDS clust index.
|
constexpr |
the ids for tables etc.
start from this number, except for basic system tables and their above defined indexes; ibuf tables and indexes are assigned as the id the number DICT_IBUF_ID_MIN plus the space id
|
constexpr |
|
constexpr |
The latest assigned index id.
|
constexpr |
Root of SYS_INDEXES clust index.
|
constexpr |
The latest assigned space id,or 0.
|
constexpr |
Obsolete,always DICT_HDR_FIRST_ID.
|
constexpr |
The latest assigned row id.
|
constexpr |
|
constexpr |
The latest assigned table id.
|
constexpr |
Root of SYS_TABLE_IDS sec index.
|
constexpr |
Root of SYS_TABLES clust index.
|
constexpr |
|
constexpr |
|
constexpr |
The ids for the basic system tables and their indexes.