drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
dict0boot.h File Reference
#include "univ.i"
#include "mtr0mtr.h"
#include "mtr0log.h"
#include "ut0byte.h"
#include "buf0buf.h"
#include "fsp0fsp.h"
#include "dict0dict.h"
Include dependency graph for dict0boot.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define dict0boot_h
#define DICT_HDR_SPACE   0 /* the SYSTEM tablespace */
#define DICT_HDR_PAGE_NO   FSP_DICT_HDR_PAGE_NO
#define DICT_TABLES_ID   1
#define DICT_COLUMNS_ID   2
#define DICT_INDEXES_ID   3
#define DICT_FIELDS_ID   4
#define DICT_TABLE_IDS_ID   5
#define DICT_HDR_FIRST_ID
#define DICT_IBUF_ID_MIN   0xFFFFFFFF00000000ULL
#define DICT_HDR   FSEG_PAGE_DATA
#define DICT_HDR_ROW_ID   0 /* The latest assigned row id */
#define DICT_HDR_TABLE_ID   8 /* The latest assigned table id */
#define DICT_HDR_INDEX_ID   16 /* The latest assigned index id */
#define DICT_HDR_MAX_SPACE_ID   24 /* The latest assigned space id, or 0*/
#define DICT_HDR_MIX_ID_LOW   28 /* Obsolete,always DICT_HDR_FIRST_ID */
#define DICT_HDR_TABLES   32 /* Root of the table index tree */
#define DICT_HDR_TABLE_IDS   36 /* Root of the table index tree */
#define DICT_HDR_COLUMNS   40 /* Root of the column index tree */
#define DICT_HDR_INDEXES   44 /* Root of the index index tree */
#define DICT_HDR_FIELDS
#define DICT_HDR_FSEG_HEADER
#define DICT_SYS_INDEXES_PAGE_NO_FIELD   8
#define DICT_SYS_INDEXES_SPACE_NO_FIELD   7
#define DICT_SYS_INDEXES_TYPE_FIELD   6
#define DICT_SYS_INDEXES_NAME_FIELD   4
#define DICT_HDR_ROW_ID_WRITE_MARGIN   256

Typedefs

typedef byte dict_hdr_t

Functions

UNIV_INTERN dict_hdr_t * dict_hdr_get (mtr_t *mtr)
UNIV_INTERN void dict_hdr_get_new_id (table_id_t *table_id, index_id_t *index_id, ulint *space_id)
UNIV_INLINE row_id_t dict_sys_get_new_row_id (void)
UNIV_INLINE row_id_t dict_sys_read_row_id (const byte *field)
UNIV_INLINE void dict_sys_write_row_id (byte *field, row_id_t row_id)
UNIV_INTERN void dict_boot (void)
UNIV_INTERN void dict_create (void)

Detailed Description

Data dictionary creation and booting

Created 4/18/1996 Heikki Tuuri

Definition in file dict0boot.h.

Macro Definition Documentation

◆ dict0boot_h

#define dict0boot_h

Definition at line 28 of file dict0boot.h.

◆ DICT_COLUMNS_ID

#define DICT_COLUMNS_ID   2

Definition at line 105 of file dict0boot.h.

◆ DICT_FIELDS_ID

#define DICT_FIELDS_ID   4

Definition at line 107 of file dict0boot.h.

◆ DICT_HDR

#define DICT_HDR   FSEG_PAGE_DATA

Definition at line 115 of file dict0boot.h.

◆ DICT_HDR_COLUMNS

#define DICT_HDR_COLUMNS   40 /* Root of the column index tree */

Definition at line 126 of file dict0boot.h.

◆ DICT_HDR_FIELDS

#define DICT_HDR_FIELDS
Value:
48 /* Root of the index field
index tree */

Definition at line 128 of file dict0boot.h.

◆ DICT_HDR_FIRST_ID

#define DICT_HDR_FIRST_ID
Value:
10 /* 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 */

Definition at line 111 of file dict0boot.h.

◆ DICT_HDR_FSEG_HEADER

#define DICT_HDR_FSEG_HEADER
Value:
56 /* Segment header for the tablespace
segment into which the dictionary
header is created */

Definition at line 130 of file dict0boot.h.

◆ DICT_HDR_INDEX_ID

#define DICT_HDR_INDEX_ID   16 /* The latest assigned index id */

Definition at line 121 of file dict0boot.h.

◆ DICT_HDR_INDEXES

#define DICT_HDR_INDEXES   44 /* Root of the index index tree */

Definition at line 127 of file dict0boot.h.

◆ DICT_HDR_MAX_SPACE_ID

#define DICT_HDR_MAX_SPACE_ID   24 /* The latest assigned space id, or 0*/

Definition at line 122 of file dict0boot.h.

◆ DICT_HDR_MIX_ID_LOW

#define DICT_HDR_MIX_ID_LOW   28 /* Obsolete,always DICT_HDR_FIRST_ID */

Definition at line 123 of file dict0boot.h.

◆ DICT_HDR_PAGE_NO

#define DICT_HDR_PAGE_NO   FSP_DICT_HDR_PAGE_NO

Definition at line 101 of file dict0boot.h.

◆ DICT_HDR_ROW_ID

#define DICT_HDR_ROW_ID   0 /* The latest assigned row id */

Definition at line 119 of file dict0boot.h.

◆ DICT_HDR_ROW_ID_WRITE_MARGIN

#define DICT_HDR_ROW_ID_WRITE_MARGIN   256

Definition at line 143 of file dict0boot.h.

◆ DICT_HDR_SPACE

#define DICT_HDR_SPACE   0 /* the SYSTEM tablespace */

Definition at line 100 of file dict0boot.h.

◆ DICT_HDR_TABLE_ID

#define DICT_HDR_TABLE_ID   8 /* The latest assigned table id */

Definition at line 120 of file dict0boot.h.

◆ DICT_HDR_TABLE_IDS

#define DICT_HDR_TABLE_IDS   36 /* Root of the table index tree */

Definition at line 125 of file dict0boot.h.

◆ DICT_HDR_TABLES

#define DICT_HDR_TABLES   32 /* Root of the table index tree */

Definition at line 124 of file dict0boot.h.

◆ DICT_IBUF_ID_MIN

#define DICT_IBUF_ID_MIN   0xFFFFFFFF00000000ULL

Definition at line 112 of file dict0boot.h.

◆ DICT_INDEXES_ID

#define DICT_INDEXES_ID   3

Definition at line 106 of file dict0boot.h.

◆ DICT_SYS_INDEXES_NAME_FIELD

#define DICT_SYS_INDEXES_NAME_FIELD   4

Definition at line 138 of file dict0boot.h.

◆ DICT_SYS_INDEXES_PAGE_NO_FIELD

#define DICT_SYS_INDEXES_PAGE_NO_FIELD   8

Definition at line 135 of file dict0boot.h.

◆ DICT_SYS_INDEXES_SPACE_NO_FIELD

#define DICT_SYS_INDEXES_SPACE_NO_FIELD   7

Definition at line 136 of file dict0boot.h.

◆ DICT_SYS_INDEXES_TYPE_FIELD

#define DICT_SYS_INDEXES_TYPE_FIELD   6

Definition at line 137 of file dict0boot.h.

◆ DICT_TABLE_IDS_ID

#define DICT_TABLE_IDS_ID   5

Definition at line 109 of file dict0boot.h.

◆ DICT_TABLES_ID

#define DICT_TABLES_ID   1

Definition at line 104 of file dict0boot.h.

Typedef Documentation

◆ dict_hdr_t

typedef byte dict_hdr_t

Definition at line 39 of file dict0boot.h.

Function Documentation

◆ dict_boot()

UNIV_INTERN void 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.

Definition at line 247 of file dict0boot.cc.

◆ dict_create()

UNIV_INTERN void dict_create ( void )

Creates and initializes the data dictionary at the database creation.

Definition at line 473 of file dict0boot.cc.

◆ dict_hdr_get()

UNIV_INTERN 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

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

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

Definition at line 48 of file dict0boot.cc.

◆ dict_hdr_get_new_id()

UNIV_INTERN void dict_hdr_get_new_id ( table_id_t * table_id,
index_id_t * index_id,
ulint * space_id )

Returns a new table, index, or space id. out: space id (not assigned if NULL)

Returns a new table, index, or space id.

Parameters
table_idout: table id (not assigned if NULL)
index_idout: index id (not assigned if NULL)
space_idout: space id (not assigned if NULL)

Definition at line 68 of file dict0boot.cc.

◆ dict_sys_get_new_row_id()

UNIV_INLINE row_id_t dict_sys_get_new_row_id ( void )

Returns a new row id.

Returns
the new id

◆ dict_sys_read_row_id()

UNIV_INLINE row_id_t dict_sys_read_row_id ( const byte * field)

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

Returns
row id in: record field

◆ dict_sys_write_row_id()

UNIV_INLINE 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. in: row id

Parameters
fieldin: record field