Commit 7f5849a8 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18309: Remove unused code

parent 867617a9
......@@ -1449,7 +1449,7 @@ static ulint dict_check_sys_tables()
/* Now that we have the proper name for this tablespace,
look to see if it is already in the tablespace cache. */
if (fil_space_for_table_exists_in_mem(
space_id, table_name.m_name, NULL, flags)) {
space_id, table_name.m_name, flags)) {
/* Recovery can open a datafile that does not
match SYS_DATAFILES. If they don't match, update
SYS_DATAFILES. */
......@@ -2817,13 +2817,11 @@ dict_load_table(
/** Opens a tablespace for dict_load_table_one()
@param[in,out] table A table that refers to the tablespace to open
@param[in] heap A memory heap
@param[in] ignore_err Whether to ignore an error. */
UNIV_INLINE
void
dict_load_tablespace(
dict_table_t* table,
mem_heap_t* heap,
dict_err_ignore_t ignore_err)
{
ut_ad(!dict_table_is_temporary(table));
......@@ -2844,7 +2842,7 @@ dict_load_tablespace(
/* The tablespace may already be open. */
if (fil_space_for_table_exists_in_mem(
table->space, space_name, heap, table->flags)) {
table->space, space_name, table->flags)) {
return;
}
......@@ -2994,7 +2992,7 @@ dict_load_table_one(
btr_pcur_close(&pcur);
mtr_commit(&mtr);
dict_load_tablespace(table, heap, ignore_err);
dict_load_tablespace(table, ignore_err);
dict_load_columns(table, heap);
......
......@@ -4482,22 +4482,6 @@ fil_file_readdir_next_file(
return(-1);
}
/*******************************************************************//**
Report that a tablespace for a table was not found. */
static
void
fil_report_missing_tablespace(
/*===========================*/
const char* name, /*!< in: table name */
ulint space_id) /*!< in: table's space id */
{
ib::error() << "Table " << name
<< " in the InnoDB data dictionary has tablespace id "
<< space_id << ","
" but tablespace with that id or name does not exist. Have"
" you deleted or moved .ibd files?";
}
/** Try to adjust FSP_SPACE_FLAGS if they differ from the expectations.
(Typically when upgrading from MariaDB 10.1.0..10.1.20.)
@param[in] space_id tablespace ID
......@@ -4540,14 +4524,12 @@ memory cache. Note that if we have not done a crash recovery at the database
startup, there may be many tablespaces which are not yet in the memory cache.
@param[in] id Tablespace ID
@param[in] name Tablespace name used in fil_space_create().
@param[in] heap Heap memory
@param[in] table_flags table flags
@return true if a matching tablespace exists in the memory cache */
bool
fil_space_for_table_exists_in_mem(
ulint id,
const char* name,
mem_heap_t* heap,
ulint table_flags)
{
fil_space_t* space;
......
......@@ -1162,14 +1162,12 @@ memory cache. Note that if we have not done a crash recovery at the database
startup, there may be many tablespaces which are not yet in the memory cache.
@param[in] id Tablespace ID
@param[in] name Tablespace name used in fil_space_create().
@param[in] heap Heap memory
@param[in] table_flags table flags
@return true if a matching tablespace exists in the memory cache */
bool
fil_space_for_table_exists_in_mem(
ulint id,
const char* name,
mem_heap_t* heap,
ulint table_flags);
/** Try to extend a tablespace if it is smaller than the specified size.
......
......@@ -3231,7 +3231,7 @@ row_drop_single_table_tablespace(
/* If the tablespace is not in the cache, just delete the file. */
if (!fil_space_for_table_exists_in_mem(
space_id, tablename, NULL, table_flags)) {
space_id, tablename, table_flags)) {
/* Force a delete of any discarded or temporary files. */
fil_delete_file(filepath);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment