mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
d1485aad0e
Multiple tablespaces for InnoDB sql_table.cc: Tell explicitly that InnoDB should retrieve all columns in CHECKSUM TABLE sql_update.cc, sql_select.cc, my_base.h: More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS include/my_base.h: More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS sql/sql_select.cc: More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS sql/sql_update.cc: More descriptive flag name HA_EXTRA_RETRIEVE_ALL_COLS sql/sql_table.cc: Tell explicitly that InnoDB should retrieve all columns in CHECKSUM TABLE sql/sql_db.cc: Multiple tablespaces for InnoDB sql/ha_innodb.cc: Multiple tablespaces for InnoDB sql/mysqld.cc: Multiple tablespaces for InnoDB sql/set_var.cc: Multiple tablespaces for InnoDB sql/sql_cache.cc: Multiple tablespaces for InnoDB sql/ha_innodb.h: Multiple tablespaces for InnoDB innobase/include/btr0btr.ic: Multiple tablespaces for InnoDB innobase/include/btr0pcur.ic: Multiple tablespaces for InnoDB innobase/include/data0type.ic: Multiple tablespaces for InnoDB innobase/include/dyn0dyn.ic: Multiple tablespaces for InnoDB innobase/include/fut0lst.ic: Multiple tablespaces for InnoDB innobase/include/log0log.ic: Multiple tablespaces for InnoDB innobase/include/mach0data.ic: Multiple tablespaces for InnoDB innobase/include/mtr0log.ic: Multiple tablespaces for InnoDB innobase/include/rem0rec.ic: Multiple tablespaces for InnoDB innobase/include/ut0byte.ic: Multiple tablespaces for InnoDB innobase/include/ut0ut.ic: Multiple tablespaces for InnoDB innobase/include/buf0buf.h: Multiple tablespaces for InnoDB innobase/include/buf0lru.h: Multiple tablespaces for InnoDB innobase/include/buf0rea.h: Multiple tablespaces for InnoDB innobase/include/data0type.h: Multiple tablespaces for InnoDB innobase/include/db0err.h: Multiple tablespaces for InnoDB innobase/include/dict0boot.h: Multiple tablespaces for InnoDB innobase/include/dict0dict.h: Multiple tablespaces for InnoDB innobase/include/dict0load.h: Multiple tablespaces for InnoDB innobase/include/dict0mem.h: Multiple tablespaces for InnoDB innobase/include/fil0fil.h: Multiple tablespaces for InnoDB innobase/include/fsp0fsp.h: Multiple tablespaces for InnoDB innobase/include/ibuf0ibuf.h: Multiple tablespaces for InnoDB innobase/include/lock0lock.h: Multiple tablespaces for InnoDB innobase/include/log0log.h: Multiple tablespaces for InnoDB innobase/include/log0recv.h: Multiple tablespaces for InnoDB innobase/include/os0file.h: Multiple tablespaces for InnoDB innobase/include/page0page.h: Multiple tablespaces for InnoDB innobase/include/que0types.h: Multiple tablespaces for InnoDB innobase/include/rem0rec.h: Multiple tablespaces for InnoDB innobase/include/srv0srv.h: Multiple tablespaces for InnoDB innobase/include/srv0start.h: Multiple tablespaces for InnoDB innobase/include/sync0sync.h: Multiple tablespaces for InnoDB innobase/include/trx0sys.h: Multiple tablespaces for InnoDB innobase/include/ut0byte.h: Multiple tablespaces for InnoDB innobase/include/univ.i: Multiple tablespaces for InnoDB innobase/btr/btr0cur.c: Multiple tablespaces for InnoDB innobase/btr/btr0sea.c: Multiple tablespaces for InnoDB innobase/buf/buf0buf.c: Multiple tablespaces for InnoDB innobase/buf/buf0flu.c: Multiple tablespaces for InnoDB innobase/buf/buf0lru.c: Multiple tablespaces for InnoDB innobase/buf/buf0rea.c: Multiple tablespaces for InnoDB innobase/data/data0type.c: Multiple tablespaces for InnoDB innobase/dict/dict0boot.c: Multiple tablespaces for InnoDB innobase/dict/dict0crea.c: Multiple tablespaces for InnoDB innobase/dict/dict0dict.c: Multiple tablespaces for InnoDB innobase/dict/dict0load.c: Multiple tablespaces for InnoDB innobase/dict/dict0mem.c: Multiple tablespaces for InnoDB innobase/fil/fil0fil.c: Multiple tablespaces for InnoDB innobase/fsp/fsp0fsp.c: Multiple tablespaces for InnoDB innobase/ha/ha0ha.c: Multiple tablespaces for InnoDB innobase/ibuf/ibuf0ibuf.c: Multiple tablespaces for InnoDB innobase/log/log0log.c: Multiple tablespaces for InnoDB innobase/log/log0recv.c: Multiple tablespaces for InnoDB innobase/mach/mach0data.c: Multiple tablespaces for InnoDB innobase/mem/mem0dbg.c: Multiple tablespaces for InnoDB innobase/mem/mem0pool.c: Multiple tablespaces for InnoDB innobase/mtr/mtr0log.c: Multiple tablespaces for InnoDB innobase/os/os0file.c: Multiple tablespaces for InnoDB innobase/os/os0proc.c: Multiple tablespaces for InnoDB innobase/page/page0cur.c: Multiple tablespaces for InnoDB innobase/que/que0que.c: Multiple tablespaces for InnoDB innobase/row/row0ins.c: Multiple tablespaces for InnoDB innobase/row/row0mysql.c: Multiple tablespaces for InnoDB innobase/row/row0sel.c: Multiple tablespaces for InnoDB innobase/row/row0upd.c: Multiple tablespaces for InnoDB innobase/srv/srv0srv.c: Multiple tablespaces for InnoDB innobase/srv/srv0start.c: Multiple tablespaces for InnoDB innobase/sync/sync0rw.c: Multiple tablespaces for InnoDB innobase/sync/sync0sync.c: Multiple tablespaces for InnoDB innobase/trx/trx0sys.c: Multiple tablespaces for InnoDB innobase/trx/trx0trx.c: Multiple tablespaces for InnoDB innobase/trx/trx0undo.c: Multiple tablespaces for InnoDB innobase/ut/ut0byte.c: Multiple tablespaces for InnoDB innobase/ut/ut0ut.c: Multiple tablespaces for InnoDB
132 lines
4.3 KiB
C
132 lines
4.3 KiB
C
/******************************************************
|
|
Data dictionary creation and booting
|
|
|
|
(c) 1996 Innobase Oy
|
|
|
|
Created 4/18/1996 Heikki Tuuri
|
|
*******************************************************/
|
|
|
|
#ifndef dict0boot_h
|
|
#define dict0boot_h
|
|
|
|
#include "univ.i"
|
|
|
|
#include "mtr0mtr.h"
|
|
#include "mtr0log.h"
|
|
#include "ut0byte.h"
|
|
#include "buf0buf.h"
|
|
#include "fsp0fsp.h"
|
|
#include "dict0dict.h"
|
|
|
|
typedef byte dict_hdr_t;
|
|
|
|
/**************************************************************************
|
|
Gets a pointer to the dictionary header and x-latches its page. */
|
|
|
|
dict_hdr_t*
|
|
dict_hdr_get(
|
|
/*=========*/
|
|
/* out: pointer to the dictionary header,
|
|
page x-latched */
|
|
mtr_t* mtr); /* in: mtr */
|
|
/**************************************************************************
|
|
Returns a new row, table, index, or tree id. */
|
|
|
|
dulint
|
|
dict_hdr_get_new_id(
|
|
/*================*/
|
|
/* out: the new id */
|
|
ulint type); /* in: DICT_HDR_ROW_ID, ... */
|
|
/**************************************************************************
|
|
Returns a new row id. */
|
|
UNIV_INLINE
|
|
dulint
|
|
dict_sys_get_new_row_id(void);
|
|
/*=========================*/
|
|
/* out: the new id */
|
|
/**************************************************************************
|
|
Reads a row id from a record or other 6-byte stored form. */
|
|
UNIV_INLINE
|
|
dulint
|
|
dict_sys_read_row_id(
|
|
/*=================*/
|
|
/* out: row id */
|
|
byte* field); /* in: record field */
|
|
/**************************************************************************
|
|
Writes a row id to a record or other 6-byte stored form. */
|
|
UNIV_INLINE
|
|
void
|
|
dict_sys_write_row_id(
|
|
/*==================*/
|
|
byte* field, /* in: record field */
|
|
dulint row_id);/* in: row id */
|
|
/*********************************************************************
|
|
Initializes the data dictionary memory structures when the database is
|
|
started. This function is also called when the data dictionary is created. */
|
|
|
|
void
|
|
dict_boot(void);
|
|
/*===========*/
|
|
/*********************************************************************
|
|
Creates and initializes the data dictionary at the database creation. */
|
|
|
|
void
|
|
dict_create(void);
|
|
/*=============*/
|
|
|
|
|
|
/* Space id and page no where the dictionary header resides */
|
|
#define DICT_HDR_SPACE 0 /* the SYSTEM tablespace */
|
|
#define DICT_HDR_PAGE_NO FSP_DICT_HDR_PAGE_NO
|
|
|
|
/* The ids for the basic system tables and their indexes */
|
|
#define DICT_TABLES_ID ut_dulint_create(0, 1)
|
|
#define DICT_COLUMNS_ID ut_dulint_create(0, 2)
|
|
#define DICT_INDEXES_ID ut_dulint_create(0, 3)
|
|
#define DICT_FIELDS_ID ut_dulint_create(0, 4)
|
|
/* The following is a secondary index on SYS_TABLES */
|
|
#define DICT_TABLE_IDS_ID ut_dulint_create(0, 5)
|
|
|
|
#define DICT_HDR_FIRST_ID 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 */
|
|
#define DICT_IBUF_ID_MIN ut_dulint_create(0xFFFFFFFFUL, 0)
|
|
|
|
/* The offset of the dictionary header on the page */
|
|
#define DICT_HDR FSEG_PAGE_DATA
|
|
|
|
/*-------------------------------------------------------------*/
|
|
/* Dictionary header offsets */
|
|
#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_MIX_ID 24 /* The latest assigned mix 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 48 /* Root of the index field index tree */
|
|
|
|
#define DICT_HDR_FSEG_HEADER 56 /* Segment header for the tablespace
|
|
segment into which the dictionary
|
|
header is created */
|
|
/*-------------------------------------------------------------*/
|
|
|
|
/* The field number of the page number field in the sys_indexes table
|
|
clustered index */
|
|
#define DICT_SYS_INDEXES_PAGE_NO_FIELD 8
|
|
#define DICT_SYS_INDEXES_SPACE_NO_FIELD 7
|
|
|
|
/* When a row id which is zero modulo this number (which must be a power of
|
|
two) is assigned, the field DICT_HDR_ROW_ID on the dictionary header page is
|
|
updated */
|
|
#define DICT_HDR_ROW_ID_WRITE_MARGIN 256
|
|
|
|
#ifndef UNIV_NONINL
|
|
#include "dict0boot.ic"
|
|
#endif
|
|
|
|
#endif
|