summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-07 12:05:12 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-07 12:05:12 +0300
commit7f5849a809670c6466a71dc93133ca0a1504de05 (patch)
tree4c52d71e6569e711e18a47b1ae06ce3058b33ba9
parent867617a97684cdf2c8df326d9a986c2cae779796 (diff)
downloadmariadb-git-7f5849a809670c6466a71dc93133ca0a1504de05.tar.gz
MDEV-18309: Remove unused code
-rw-r--r--storage/innobase/dict/dict0load.cc8
-rw-r--r--storage/innobase/fil/fil0fil.cc18
-rw-r--r--storage/innobase/include/fil0fil.h2
-rw-r--r--storage/innobase/row/row0mysql.cc2
4 files changed, 4 insertions, 26 deletions
diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc
index fc399faaea3..508dde92269 100644
--- a/storage/innobase/dict/dict0load.cc
+++ b/storage/innobase/dict/dict0load.cc
@@ -1449,7 +1449,7 @@ next:
/* 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 @@ err_exit:
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);
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 3c9546b0304..0e6f1b05cd6 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -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;
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index 1096b990146..30b2d205cf8 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -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.
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index 76024bbe170..e19501edea4 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -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);