diff options
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/dict0boot.h | 31 | ||||
-rw-r--r-- | storage/innobase/include/dict0crea.h | 24 | ||||
-rw-r--r-- | storage/innobase/include/dict0dict.h | 14 | ||||
-rw-r--r-- | storage/innobase/include/dict0load.h | 57 | ||||
-rw-r--r-- | storage/innobase/include/fil0fil.h | 2 | ||||
-rw-r--r-- | storage/innobase/include/srv0start.h | 2 |
6 files changed, 3 insertions, 127 deletions
diff --git a/storage/innobase/include/dict0boot.h b/storage/innobase/include/dict0boot.h index 0f96df8fd9f..857342b18bd 100644 --- a/storage/innobase/include/dict0boot.h +++ b/storage/innobase/include/dict0boot.h @@ -267,37 +267,6 @@ enum dict_fld_sys_foreign_cols_enum { DICT_FLD__SYS_FOREIGN_COLS__REF_COL_NAME = 5, DICT_NUM_FIELDS__SYS_FOREIGN_COLS = 6 }; -/* The columns in SYS_TABLESPACES */ -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 -}; -/* The field numbers in the SYS_TABLESPACES clustered index */ -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 -}; -/* The columns in SYS_DATAFILES */ -enum dict_col_sys_datafiles_enum { - DICT_COL__SYS_DATAFILES__SPACE = 0, - DICT_COL__SYS_DATAFILES__PATH = 1, - DICT_NUM_COLS__SYS_DATAFILES = 2 -}; -/* The field numbers in the SYS_DATAFILES clustered index */ -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 -}; - /* The columns in SYS_VIRTUAL */ enum dict_col_sys_virtual_enum { DICT_COL__SYS_VIRTUAL__TABLE_ID = 0, diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h index 13706d6bfad..72108614f14 100644 --- a/storage/innobase/include/dict0crea.h +++ b/storage/innobase/include/dict0crea.h @@ -167,14 +167,6 @@ dict_foreigns_has_s_base_col( const dict_foreign_set& local_fk_set, const dict_table_t* table); -/****************************************************************//** -Creates the tablespaces and datafiles system tables inside InnoDB -at server bootstrap or server start if they are not found or are -not of the right form. -@return DB_SUCCESS or error code */ -dberr_t -dict_create_or_check_sys_tablespace(void); -/*=====================================*/ /** Creates the virtual column system tables inside InnoDB at server bootstrap or server start if they are not found or are not of the right form. @@ -182,22 +174,6 @@ not of the right form. dberr_t dict_create_or_check_sys_virtual(); -/** Put a tablespace definition into the data dictionary, -replacing what was there previously. -@param[in] space Tablespace id -@param[in] name Tablespace name -@param[in] flags Tablespace flags -@param[in] path Tablespace path -@param[in] trx Transaction -@return error code or DB_SUCCESS */ -dberr_t -dict_replace_tablespace_in_dictionary( - ulint space_id, - const char* name, - ulint flags, - const char* path, - trx_t* trx); - /********************************************************************//** Add a foreign key definition to the data dictionary tables. @return error code or DB_SUCCESS */ diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index 276252e625c..9667ad7a731 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -1803,20 +1803,6 @@ dict_table_decode_n_col( ulint* n_col, ulint* n_v_col); -/** Look for any dictionary objects that are found in the given tablespace. -@param[in] space_id Tablespace ID to search for. -@return true if tablespace is empty. */ -bool -dict_space_is_empty( - ulint space_id); - -/** Find the space_id for the given name in sys_tablespaces. -@param[in] name Tablespace name to search for. -@return the tablespace ID. */ -ulint -dict_space_get_id( - const char* name); - /** Free the virtual column template @param[in,out] vc_templ virtual column template */ UNIV_INLINE diff --git a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict0load.h index f067571ca5b..1a777c7d1a0 100644 --- a/storage/innobase/include/dict0load.h +++ b/storage/innobase/include/dict0load.h @@ -47,8 +47,6 @@ enum dict_system_id_t { SYS_FIELDS, SYS_FOREIGN, SYS_FOREIGN_COLS, - SYS_TABLESPACES, - SYS_DATAFILES, SYS_VIRTUAL, /* This must be last item. Defines the number of system tables. */ @@ -56,13 +54,11 @@ enum dict_system_id_t { }; /** Check each tablespace found in the data dictionary. -Look at each table defined in SYS_TABLES that has a space_id > 0. -If the tablespace is not yet in the fil_system cache, look up the -tablespace in SYS_DATAFILES to ensure the correct path. +Then look at each table defined in SYS_TABLES that has a space_id > 0 +to find all the file-per-table tablespaces. In a crash recovery we already have some tablespace objects created from -processing the REDO log. Any other tablespace in SYS_TABLESPACES not -previously used in recovery will be opened here. We will compare the +processing the REDO log. We will compare the space_id information in the data dictionary to what we find in the tablespace file. In addition, more validation will be done if recovery was needed and force_recovery is not set. @@ -80,7 +76,6 @@ dict_get_first_table_name_in_db( const char* name); /*!< in: database name which ends to '/' */ /** Make sure the data_file_name is saved in dict_table_t if needed. -Try to read it from the fil_system first, then from SYS_DATAFILES. @param[in] table Table object @param[in] dict_mutex_own true if dict_sys.mutex is owned already */ void @@ -259,51 +254,5 @@ dict_process_sys_foreign_col_rec( const char** ref_col_name, /*!< out: referenced column name in referenced table */ ulint* pos); /*!< out: column position */ -/********************************************************************//** -This function parses a SYS_TABLESPACES record, extracts necessary -information from the record and returns to caller. -@return error message, or NULL on success */ -const char* -dict_process_sys_tablespaces( -/*=========================*/ - mem_heap_t* heap, /*!< in/out: heap memory */ - const rec_t* rec, /*!< in: current SYS_TABLESPACES rec */ - uint32_t* space, /*!< out: tablespace identifier */ - const char** name, /*!< out: tablespace name */ - ulint* flags); /*!< out: tablespace flags */ -/********************************************************************//** -This function parses a SYS_DATAFILES record, extracts necessary -information from the record and returns to caller. -@return error message, or NULL on success */ -const char* -dict_process_sys_datafiles( -/*=======================*/ - mem_heap_t* heap, /*!< in/out: heap memory */ - const rec_t* rec, /*!< in: current SYS_DATAFILES rec */ - uint32_t* space, /*!< out: tablespace identifier */ - const char** path); /*!< out: datafile path */ - -/** Update the record for space_id in SYS_TABLESPACES to this filepath. -@param[in] space_id Tablespace ID -@param[in] filepath Tablespace filepath -@return DB_SUCCESS if OK, dberr_t if the insert failed */ -dberr_t -dict_update_filepath( - ulint space_id, - const char* filepath); - -/** Replace records in SYS_TABLESPACES and SYS_DATAFILES associated with -the given space_id using an independent transaction. -@param[in] space_id Tablespace ID -@param[in] name Tablespace name -@param[in] filepath First filepath -@param[in] fsp_flags Tablespace flags -@return DB_SUCCESS if OK, dberr_t if the insert failed */ -dberr_t -dict_replace_tablespace_and_filepath( - ulint space_id, - const char* name, - const char* filepath, - ulint fsp_flags); #endif diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h index e645ce31232..e5424aca038 100644 --- a/storage/innobase/include/fil0fil.h +++ b/storage/innobase/include/fil0fil.h @@ -1624,7 +1624,6 @@ If the fix_dict boolean is set, then it is safe to use an internal SQL statement to update the dictionary tables if they are incorrect. @param[in] validate true if we should validate the tablespace -@param[in] fix_dict true if the dictionary is available to be fixed @param[in] purpose FIL_TYPE_TABLESPACE or FIL_TYPE_TEMPORARY @param[in] id tablespace ID @param[in] flags expected FSP_SPACE_FLAGS @@ -1637,7 +1636,6 @@ If file-per-table, it is the table name in the databasename/tablename format fil_space_t* fil_ibd_open( bool validate, - bool fix_dict, fil_type_t purpose, ulint id, ulint flags, diff --git a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0start.h index 324e3f0478d..9033cd916c3 100644 --- a/storage/innobase/include/srv0start.h +++ b/storage/innobase/include/srv0start.h @@ -96,8 +96,6 @@ extern lsn_t srv_shutdown_lsn; /** TRUE if the server is being started */ extern bool srv_is_being_started; -/** TRUE if SYS_TABLESPACES is available for lookups */ -extern bool srv_sys_tablespaces_open; /** TRUE if the server is being started, before rolling back any incomplete transactions */ extern bool srv_startup_is_before_trx_rollback_phase; |