MySQL 9.0.0
Source Code Documentation
dict0boot.h File Reference

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
 

Enumerations

enum  dict_col_sys_tables_enum {
  DICT_COL__SYS_TABLES__NAME = 0 , DICT_COL__SYS_TABLES__ID = 1 , DICT_COL__SYS_TABLES__N_COLS = 2 , DICT_COL__SYS_TABLES__TYPE = 3 ,
  DICT_COL__SYS_TABLES__MIX_ID = 4 , DICT_COL__SYS_TABLES__MIX_LEN = 5 , DICT_COL__SYS_TABLES__CLUSTER_ID = 6 , DICT_COL__SYS_TABLES__SPACE = 7 ,
  DICT_NUM_COLS__SYS_TABLES = 8
}
 
enum  dict_fld_sys_tables_enum {
  DICT_FLD__SYS_TABLES__NAME = 0 , DICT_FLD__SYS_TABLES__DB_TRX_ID = 1 , DICT_FLD__SYS_TABLES__DB_ROLL_PTR = 2 , DICT_FLD__SYS_TABLES__ID = 3 ,
  DICT_FLD__SYS_TABLES__N_COLS = 4 , DICT_FLD__SYS_TABLES__TYPE = 5 , DICT_FLD__SYS_TABLES__MIX_ID = 6 , DICT_FLD__SYS_TABLES__MIX_LEN = 7 ,
  DICT_FLD__SYS_TABLES__CLUSTER_ID = 8 , DICT_FLD__SYS_TABLES__SPACE = 9 , DICT_NUM_FIELDS__SYS_TABLES = 10
}
 
enum  dict_fld_sys_table_ids_enum { DICT_FLD__SYS_TABLE_IDS__ID = 0 , DICT_FLD__SYS_TABLE_IDS__NAME = 1 , DICT_NUM_FIELDS__SYS_TABLE_IDS = 2 }
 
enum  dict_col_sys_columns_enum {
  DICT_COL__SYS_COLUMNS__TABLE_ID = 0 , DICT_COL__SYS_COLUMNS__POS = 1 , DICT_COL__SYS_COLUMNS__NAME = 2 , DICT_COL__SYS_COLUMNS__MTYPE = 3 ,
  DICT_COL__SYS_COLUMNS__PRTYPE = 4 , DICT_COL__SYS_COLUMNS__LEN = 5 , DICT_COL__SYS_COLUMNS__PREC = 6 , DICT_NUM_COLS__SYS_COLUMNS = 7
}
 
enum  dict_fld_sys_columns_enum {
  DICT_FLD__SYS_COLUMNS__TABLE_ID = 0 , DICT_FLD__SYS_COLUMNS__POS = 1 , DICT_FLD__SYS_COLUMNS__DB_TRX_ID = 2 , DICT_FLD__SYS_COLUMNS__DB_ROLL_PTR = 3 ,
  DICT_FLD__SYS_COLUMNS__NAME = 4 , DICT_FLD__SYS_COLUMNS__MTYPE = 5 , DICT_FLD__SYS_COLUMNS__PRTYPE = 6 , DICT_FLD__SYS_COLUMNS__LEN = 7 ,
  DICT_FLD__SYS_COLUMNS__PREC = 8 , DICT_NUM_FIELDS__SYS_COLUMNS = 9
}
 
enum  dict_col_sys_indexes_enum {
  DICT_COL__SYS_INDEXES__TABLE_ID = 0 , DICT_COL__SYS_INDEXES__ID = 1 , DICT_COL__SYS_INDEXES__NAME = 2 , DICT_COL__SYS_INDEXES__N_FIELDS = 3 ,
  DICT_COL__SYS_INDEXES__TYPE = 4 , DICT_COL__SYS_INDEXES__SPACE = 5 , DICT_COL__SYS_INDEXES__PAGE_NO = 6 , DICT_COL__SYS_INDEXES__MERGE_THRESHOLD = 7 ,
  DICT_NUM_COLS__SYS_INDEXES = 8
}
 
enum  dict_fld_sys_indexes_enum {
  DICT_FLD__SYS_INDEXES__TABLE_ID = 0 , DICT_FLD__SYS_INDEXES__ID = 1 , DICT_FLD__SYS_INDEXES__DB_TRX_ID = 2 , DICT_FLD__SYS_INDEXES__DB_ROLL_PTR = 3 ,
  DICT_FLD__SYS_INDEXES__NAME = 4 , DICT_FLD__SYS_INDEXES__N_FIELDS = 5 , DICT_FLD__SYS_INDEXES__TYPE = 6 , DICT_FLD__SYS_INDEXES__SPACE = 7 ,
  DICT_FLD__SYS_INDEXES__PAGE_NO = 8 , DICT_FLD__SYS_INDEXES__MERGE_THRESHOLD = 9 , DICT_NUM_FIELDS__SYS_INDEXES = 10
}
 
enum  dict_col_sys_fields_enum { DICT_COL__SYS_FIELDS__INDEX_ID = 0 , DICT_COL__SYS_FIELDS__POS = 1 , DICT_COL__SYS_FIELDS__COL_NAME = 2 , DICT_NUM_COLS__SYS_FIELDS = 3 }
 
enum  dict_fld_sys_fields_enum {
  DICT_FLD__SYS_FIELDS__INDEX_ID = 0 , DICT_FLD__SYS_FIELDS__POS = 1 , DICT_FLD__SYS_FIELDS__DB_TRX_ID = 2 , DICT_FLD__SYS_FIELDS__DB_ROLL_PTR = 3 ,
  DICT_FLD__SYS_FIELDS__COL_NAME = 4 , DICT_NUM_FIELDS__SYS_FIELDS = 5
}
 
enum  dict_col_sys_foreign_enum {
  DICT_COL__SYS_FOREIGN__ID = 0 , DICT_COL__SYS_FOREIGN__FOR_NAME = 1 , DICT_COL__SYS_FOREIGN__REF_NAME = 2 , DICT_COL__SYS_FOREIGN__N_COLS = 3 ,
  DICT_NUM_COLS__SYS_FOREIGN = 4
}
 
enum  dict_fld_sys_foreign_enum {
  DICT_FLD__SYS_FOREIGN__ID = 0 , DICT_FLD__SYS_FOREIGN__DB_TRX_ID = 1 , DICT_FLD__SYS_FOREIGN__DB_ROLL_PTR = 2 , DICT_FLD__SYS_FOREIGN__FOR_NAME = 3 ,
  DICT_FLD__SYS_FOREIGN__REF_NAME = 4 , DICT_FLD__SYS_FOREIGN__N_COLS = 5 , DICT_NUM_FIELDS__SYS_FOREIGN = 6
}
 
enum  dict_fld_sys_foreign_for_name_enum { DICT_FLD__SYS_FOREIGN_FOR_NAME__NAME = 0 , DICT_FLD__SYS_FOREIGN_FOR_NAME__ID = 1 , DICT_NUM_FIELDS__SYS_FOREIGN_FOR_NAME = 2 }
 
enum  dict_col_sys_foreign_cols_enum {
  DICT_COL__SYS_FOREIGN_COLS__ID = 0 , DICT_COL__SYS_FOREIGN_COLS__POS = 1 , DICT_COL__SYS_FOREIGN_COLS__FOR_COL_NAME = 2 , DICT_COL__SYS_FOREIGN_COLS__REF_COL_NAME = 3 ,
  DICT_NUM_COLS__SYS_FOREIGN_COLS = 4
}
 
enum  dict_fld_sys_foreign_cols_enum {
  DICT_FLD__SYS_FOREIGN_COLS__ID = 0 , DICT_FLD__SYS_FOREIGN_COLS__POS = 1 , DICT_FLD__SYS_FOREIGN_COLS__DB_TRX_ID = 2 , DICT_FLD__SYS_FOREIGN_COLS__DB_ROLL_PTR = 3 ,
  DICT_FLD__SYS_FOREIGN_COLS__FOR_COL_NAME = 4 , DICT_FLD__SYS_FOREIGN_COLS__REF_COL_NAME = 5 , DICT_NUM_FIELDS__SYS_FOREIGN_COLS = 6
}
 
enum  dict_col_sys_tablespaces_enum { DICT_COL__SYS_TABLESPACES__SPACE = 0 , DICT_COL__SYS_TABLESPACES__NAME = 1 , DICT_COL__SYS_TABLESPACES__FLAGS = 2 , DICT_NUM_COLS__SYS_TABLESPACES = 3 }
 
enum  dict_fld_sys_tablespaces_enum {
  DICT_FLD__SYS_TABLESPACES__SPACE = 0 , DICT_FLD__SYS_TABLESPACES__DB_TRX_ID = 1 , DICT_FLD__SYS_TABLESPACES__DB_ROLL_PTR = 2 , DICT_FLD__SYS_TABLESPACES__NAME = 3 ,
  DICT_FLD__SYS_TABLESPACES__FLAGS = 4 , DICT_NUM_FIELDS__SYS_TABLESPACES = 5
}
 
enum  dict_col_sys_datafiles_enum { DICT_COL__SYS_DATAFILES__SPACE = 0 , DICT_COL__SYS_DATAFILES__PATH = 1 , DICT_NUM_COLS__SYS_DATAFILES = 2 }
 
enum  dict_fld_sys_datafiles_enum {
  DICT_FLD__SYS_DATAFILES__SPACE = 0 , DICT_FLD__SYS_DATAFILES__DB_TRX_ID = 1 , DICT_FLD__SYS_DATAFILES__DB_ROLL_PTR = 2 , DICT_FLD__SYS_DATAFILES__PATH = 3 ,
  DICT_NUM_FIELDS__SYS_DATAFILES = 4
}
 
enum  dict_col_sys_virtual_enum { DICT_COL__SYS_VIRTUAL__TABLE_ID = 0 , DICT_COL__SYS_VIRTUAL__POS = 1 , DICT_COL__SYS_VIRTUAL__BASE_POS = 2 , DICT_NUM_COLS__SYS_VIRTUAL = 3 }
 
enum  dict_fld_sys_virtual_enum {
  DICT_FLD__SYS_VIRTUAL__TABLE_ID = 0 , DICT_FLD__SYS_VIRTUAL__POS = 1 , DICT_FLD__SYS_VIRTUAL__BASE_POS = 2 , DICT_FLD__SYS_VIRTUAL__DB_TRX_ID = 3 ,
  DICT_FLD__SYS_VIRTUAL__DB_ROLL_PTR = 4 , DICT_NUM_FIELDS__SYS_VIRTUAL = 5
}
 

Functions

dict_hdr_tdict_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
 

Detailed Description

Data dictionary creation and booting.

Created 4/18/1996 Heikki Tuuri

Typedef Documentation

◆ dict_hdr_t

typedef byte dict_hdr_t

Enumeration Type Documentation

◆ dict_col_sys_columns_enum

Enumerator
DICT_COL__SYS_COLUMNS__TABLE_ID 
DICT_COL__SYS_COLUMNS__POS 
DICT_COL__SYS_COLUMNS__NAME 
DICT_COL__SYS_COLUMNS__MTYPE 
DICT_COL__SYS_COLUMNS__PRTYPE 
DICT_COL__SYS_COLUMNS__LEN 
DICT_COL__SYS_COLUMNS__PREC 
DICT_NUM_COLS__SYS_COLUMNS 

◆ dict_col_sys_datafiles_enum

Enumerator
DICT_COL__SYS_DATAFILES__SPACE 
DICT_COL__SYS_DATAFILES__PATH 
DICT_NUM_COLS__SYS_DATAFILES 

◆ dict_col_sys_fields_enum

Enumerator
DICT_COL__SYS_FIELDS__INDEX_ID 
DICT_COL__SYS_FIELDS__POS 
DICT_COL__SYS_FIELDS__COL_NAME 
DICT_NUM_COLS__SYS_FIELDS 

◆ dict_col_sys_foreign_cols_enum

Enumerator
DICT_COL__SYS_FOREIGN_COLS__ID 
DICT_COL__SYS_FOREIGN_COLS__POS 
DICT_COL__SYS_FOREIGN_COLS__FOR_COL_NAME 
DICT_COL__SYS_FOREIGN_COLS__REF_COL_NAME 
DICT_NUM_COLS__SYS_FOREIGN_COLS 

◆ dict_col_sys_foreign_enum

Enumerator
DICT_COL__SYS_FOREIGN__ID 
DICT_COL__SYS_FOREIGN__FOR_NAME 
DICT_COL__SYS_FOREIGN__REF_NAME 
DICT_COL__SYS_FOREIGN__N_COLS 
DICT_NUM_COLS__SYS_FOREIGN 

◆ dict_col_sys_indexes_enum

Enumerator
DICT_COL__SYS_INDEXES__TABLE_ID 
DICT_COL__SYS_INDEXES__ID 
DICT_COL__SYS_INDEXES__NAME 
DICT_COL__SYS_INDEXES__N_FIELDS 
DICT_COL__SYS_INDEXES__TYPE 
DICT_COL__SYS_INDEXES__SPACE 
DICT_COL__SYS_INDEXES__PAGE_NO 
DICT_COL__SYS_INDEXES__MERGE_THRESHOLD 
DICT_NUM_COLS__SYS_INDEXES 

◆ dict_col_sys_tables_enum

Enumerator
DICT_COL__SYS_TABLES__NAME 
DICT_COL__SYS_TABLES__ID 
DICT_COL__SYS_TABLES__N_COLS 
DICT_COL__SYS_TABLES__TYPE 
DICT_COL__SYS_TABLES__MIX_ID 
DICT_COL__SYS_TABLES__MIX_LEN 
DICT_COL__SYS_TABLES__CLUSTER_ID 
DICT_COL__SYS_TABLES__SPACE 
DICT_NUM_COLS__SYS_TABLES 

◆ dict_col_sys_tablespaces_enum

Enumerator
DICT_COL__SYS_TABLESPACES__SPACE 
DICT_COL__SYS_TABLESPACES__NAME 
DICT_COL__SYS_TABLESPACES__FLAGS 
DICT_NUM_COLS__SYS_TABLESPACES 

◆ dict_col_sys_virtual_enum

Enumerator
DICT_COL__SYS_VIRTUAL__TABLE_ID 
DICT_COL__SYS_VIRTUAL__POS 
DICT_COL__SYS_VIRTUAL__BASE_POS 
DICT_NUM_COLS__SYS_VIRTUAL 

◆ dict_fld_sys_columns_enum

Enumerator
DICT_FLD__SYS_COLUMNS__TABLE_ID 
DICT_FLD__SYS_COLUMNS__POS 
DICT_FLD__SYS_COLUMNS__DB_TRX_ID 
DICT_FLD__SYS_COLUMNS__DB_ROLL_PTR 
DICT_FLD__SYS_COLUMNS__NAME 
DICT_FLD__SYS_COLUMNS__MTYPE 
DICT_FLD__SYS_COLUMNS__PRTYPE 
DICT_FLD__SYS_COLUMNS__LEN 
DICT_FLD__SYS_COLUMNS__PREC 
DICT_NUM_FIELDS__SYS_COLUMNS 

◆ dict_fld_sys_datafiles_enum

Enumerator
DICT_FLD__SYS_DATAFILES__SPACE 
DICT_FLD__SYS_DATAFILES__DB_TRX_ID 
DICT_FLD__SYS_DATAFILES__DB_ROLL_PTR 
DICT_FLD__SYS_DATAFILES__PATH 
DICT_NUM_FIELDS__SYS_DATAFILES 

◆ dict_fld_sys_fields_enum

Enumerator
DICT_FLD__SYS_FIELDS__INDEX_ID 
DICT_FLD__SYS_FIELDS__POS 
DICT_FLD__SYS_FIELDS__DB_TRX_ID 
DICT_FLD__SYS_FIELDS__DB_ROLL_PTR 
DICT_FLD__SYS_FIELDS__COL_NAME 
DICT_NUM_FIELDS__SYS_FIELDS 

◆ dict_fld_sys_foreign_cols_enum

Enumerator
DICT_FLD__SYS_FOREIGN_COLS__ID 
DICT_FLD__SYS_FOREIGN_COLS__POS 
DICT_FLD__SYS_FOREIGN_COLS__DB_TRX_ID 
DICT_FLD__SYS_FOREIGN_COLS__DB_ROLL_PTR 
DICT_FLD__SYS_FOREIGN_COLS__FOR_COL_NAME 
DICT_FLD__SYS_FOREIGN_COLS__REF_COL_NAME 
DICT_NUM_FIELDS__SYS_FOREIGN_COLS 

◆ dict_fld_sys_foreign_enum

Enumerator
DICT_FLD__SYS_FOREIGN__ID 
DICT_FLD__SYS_FOREIGN__DB_TRX_ID 
DICT_FLD__SYS_FOREIGN__DB_ROLL_PTR 
DICT_FLD__SYS_FOREIGN__FOR_NAME 
DICT_FLD__SYS_FOREIGN__REF_NAME 
DICT_FLD__SYS_FOREIGN__N_COLS 
DICT_NUM_FIELDS__SYS_FOREIGN 

◆ dict_fld_sys_foreign_for_name_enum

Enumerator
DICT_FLD__SYS_FOREIGN_FOR_NAME__NAME 
DICT_FLD__SYS_FOREIGN_FOR_NAME__ID 
DICT_NUM_FIELDS__SYS_FOREIGN_FOR_NAME 

◆ dict_fld_sys_indexes_enum

Enumerator
DICT_FLD__SYS_INDEXES__TABLE_ID 
DICT_FLD__SYS_INDEXES__ID 
DICT_FLD__SYS_INDEXES__DB_TRX_ID 
DICT_FLD__SYS_INDEXES__DB_ROLL_PTR 
DICT_FLD__SYS_INDEXES__NAME 
DICT_FLD__SYS_INDEXES__N_FIELDS 
DICT_FLD__SYS_INDEXES__TYPE 
DICT_FLD__SYS_INDEXES__SPACE 
DICT_FLD__SYS_INDEXES__PAGE_NO 
DICT_FLD__SYS_INDEXES__MERGE_THRESHOLD 
DICT_NUM_FIELDS__SYS_INDEXES 

◆ dict_fld_sys_table_ids_enum

Enumerator
DICT_FLD__SYS_TABLE_IDS__ID 
DICT_FLD__SYS_TABLE_IDS__NAME 
DICT_NUM_FIELDS__SYS_TABLE_IDS 

◆ dict_fld_sys_tables_enum

Enumerator
DICT_FLD__SYS_TABLES__NAME 
DICT_FLD__SYS_TABLES__DB_TRX_ID 
DICT_FLD__SYS_TABLES__DB_ROLL_PTR 
DICT_FLD__SYS_TABLES__ID 
DICT_FLD__SYS_TABLES__N_COLS 
DICT_FLD__SYS_TABLES__TYPE 
DICT_FLD__SYS_TABLES__MIX_ID 
DICT_FLD__SYS_TABLES__MIX_LEN 
DICT_FLD__SYS_TABLES__CLUSTER_ID 
DICT_FLD__SYS_TABLES__SPACE 
DICT_NUM_FIELDS__SYS_TABLES 

◆ dict_fld_sys_tablespaces_enum

Enumerator
DICT_FLD__SYS_TABLESPACES__SPACE 
DICT_FLD__SYS_TABLESPACES__DB_TRX_ID 
DICT_FLD__SYS_TABLESPACES__DB_ROLL_PTR 
DICT_FLD__SYS_TABLESPACES__NAME 
DICT_FLD__SYS_TABLESPACES__FLAGS 
DICT_NUM_FIELDS__SYS_TABLESPACES 

◆ dict_fld_sys_virtual_enum

Enumerator
DICT_FLD__SYS_VIRTUAL__TABLE_ID 
DICT_FLD__SYS_VIRTUAL__POS 
DICT_FLD__SYS_VIRTUAL__BASE_POS 
DICT_FLD__SYS_VIRTUAL__DB_TRX_ID 
DICT_FLD__SYS_VIRTUAL__DB_ROLL_PTR 
DICT_NUM_FIELDS__SYS_VIRTUAL 

Function Documentation

◆ dict_boot()

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.

Returns
DB_SUCCESS or error code.

◆ dict_create()

dberr_t dict_create ( void  )

Creates and initializes the data dictionary at the server bootstrap.

Returns
DB_SUCCESS or error code.

◆ dict_hdr_flush_row_id()

void dict_hdr_flush_row_id ( void  )

Writes the current value of the row id counter to the dictionary header file page.

◆ dict_hdr_get()

dict_hdr_t * dict_hdr_get ( mtr_t mtr)

Gets a pointer to the dictionary header and x-latches its page.

Returns
pointer to the dictionary header, page x-latched in: mtr
pointer to the dictionary header, page x-latched
Parameters
mtrin: mtr

◆ dict_hdr_get_new_id()

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.

Parameters
[out]table_idTable id (not assigned if null)
[out]index_idIndex id (not assigned if null)
[out]space_idSpace id (not assigned if null)
[in]tableTable
[in]disable_redoIf true and table object is null then disable-redo

◆ dict_is_old_sys_table()

static bool dict_is_old_sys_table ( table_id_t  id)
inlinestatic

Check if a table id belongs to old innodb internal system table.

Parameters
[in]idtable id
Returns
true if the table id belongs to a system table.

◆ dict_sys_get_new_row_id()

static row_id_t dict_sys_get_new_row_id ( void  )
inlinestatic

Returns a new row id.

Returns
the new id

◆ dict_sys_read_row_id()

static row_id_t dict_sys_read_row_id ( const byte field)
inlinestatic

Reads a row id from a record or other 6-byte stored form.

Returns
row id in: record field

◆ dict_sys_write_row_id()

static void dict_sys_write_row_id ( byte field,
row_id_t  row_id 
)
inlinestatic

Writes a row id to a record or other 6-byte stored form.

Parameters
[in]fieldrecord field
[in]row_idrow id

Variable Documentation

◆ DICT_COLUMNS_ID

constexpr uint32_t DICT_COLUMNS_ID = 2
constexpr

◆ DICT_FIELDS_ID

constexpr uint32_t DICT_FIELDS_ID = 4
constexpr

◆ DICT_FLD_LEN_FLAGS

constexpr uint32_t DICT_FLD_LEN_FLAGS = 4
constexpr

◆ DICT_FLD_LEN_SPACE

constexpr uint32_t DICT_FLD_LEN_SPACE = 4
constexpr

◆ DICT_HDR

constexpr uint32_t DICT_HDR = FSEG_PAGE_DATA
constexpr

◆ DICT_HDR_COLUMNS

constexpr uint32_t DICT_HDR_COLUMNS = 40
constexpr

Root of SYS_COLUMNS clust index.

◆ DICT_HDR_FIELDS

constexpr uint32_t DICT_HDR_FIELDS = 48
constexpr

Root of SYS_FIELDS clust index.

◆ DICT_HDR_FIRST_ID

constexpr uint32_t DICT_HDR_FIRST_ID = 10
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

◆ DICT_HDR_FSEG_HEADER

constexpr uint32_t DICT_HDR_FSEG_HEADER = 56
constexpr

◆ DICT_HDR_INDEX_ID

constexpr uint32_t DICT_HDR_INDEX_ID = 16
constexpr

The latest assigned index id.

◆ DICT_HDR_INDEXES

constexpr uint32_t DICT_HDR_INDEXES = 44
constexpr

Root of SYS_INDEXES clust index.

◆ DICT_HDR_MAX_SPACE_ID

constexpr uint32_t DICT_HDR_MAX_SPACE_ID = 24
constexpr

The latest assigned space id,or 0.

◆ DICT_HDR_MIX_ID_LOW

constexpr uint32_t DICT_HDR_MIX_ID_LOW = 28
constexpr

Obsolete,always DICT_HDR_FIRST_ID.

◆ DICT_HDR_ROW_ID

constexpr uint32_t DICT_HDR_ROW_ID = 0
constexpr

The latest assigned row id.

◆ DICT_HDR_ROW_ID_WRITE_MARGIN

constexpr uint32_t DICT_HDR_ROW_ID_WRITE_MARGIN = 256
constexpr

◆ DICT_HDR_TABLE_ID

constexpr uint32_t DICT_HDR_TABLE_ID = 8
constexpr

The latest assigned table id.

◆ DICT_HDR_TABLE_IDS

constexpr uint32_t DICT_HDR_TABLE_IDS = 36
constexpr

Root of SYS_TABLE_IDS sec index.

◆ DICT_HDR_TABLES

constexpr uint32_t DICT_HDR_TABLES = 32
constexpr

Root of SYS_TABLES clust index.

◆ DICT_INDEXES_ID

constexpr uint32_t DICT_INDEXES_ID = 3
constexpr

◆ DICT_TABLE_IDS_ID

constexpr uint32_t DICT_TABLE_IDS_ID = 5
constexpr

◆ DICT_TABLES_ID

constexpr uint32_t DICT_TABLES_ID = 1
constexpr

The ids for the basic system tables and their indexes.