summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-12-27 11:23:28 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-12-27 11:23:28 +0200
commit16bce0f6fe6bcad0091dc45a97a8ac7b33fe9d44 (patch)
treeff61478a1f4fbfda6a7796c48e65147f63142efe
parent891609b571a6c134d308bf7fb6f9683eb716f157 (diff)
downloadmariadb-git-16bce0f6fe6bcad0091dc45a97a8ac7b33fe9d44.tar.gz
Cleanup: Remove dict_delete_tablespace_and_datafiles()
The function was only called by innobase_drop_tablespace(), which was removed in commit 494e4b99a4a6c2f933c7e663cbb6ad5b17e8f84a and added in commit 2e814d4702d71a04388386a9f591d14a35980bfe.
-rw-r--r--storage/innobase/dict/dict0crea.cc43
-rw-r--r--storage/innobase/include/dict0crea.h10
2 files changed, 0 insertions, 53 deletions
diff --git a/storage/innobase/dict/dict0crea.cc b/storage/innobase/dict/dict0crea.cc
index 4ef87dae22d..54d2eca245f 100644
--- a/storage/innobase/dict/dict0crea.cc
+++ b/storage/innobase/dict/dict0crea.cc
@@ -2460,49 +2460,6 @@ dict_replace_tablespace_in_dictionary(
return(error);
}
-/** Delete records from SYS_TABLESPACES and SYS_DATAFILES associated
-with a particular tablespace ID.
-@param[in] space Tablespace ID
-@param[in,out] trx Current transaction
-@return DB_SUCCESS if OK, dberr_t if the operation failed */
-
-dberr_t
-dict_delete_tablespace_and_datafiles(
- ulint space,
- trx_t* trx)
-{
- dberr_t err = DB_SUCCESS;
-
- ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_X));
- ut_ad(mutex_own(&dict_sys->mutex));
- ut_ad(srv_sys_tablespaces_open);
-
- trx->op_info = "delete tablespace and datafiles from dictionary";
-
- pars_info_t* info = pars_info_create();
- ut_a(!is_system_tablespace(space));
- pars_info_add_int4_literal(info, "space", space);
-
- err = que_eval_sql(info,
- "PROCEDURE P () IS\n"
- "BEGIN\n"
- "DELETE FROM SYS_TABLESPACES\n"
- "WHERE SPACE = :space;\n"
- "DELETE FROM SYS_DATAFILES\n"
- "WHERE SPACE = :space;\n"
- "END;\n",
- FALSE, trx);
-
- if (err != DB_SUCCESS) {
- ib::warn() << "Could not delete space_id "
- << space << " from data dictionary";
- }
-
- trx->op_info = "";
-
- return(err);
-}
-
/** Assign a new table ID and put it into the table cache and the transaction.
@param[in,out] table Table that needs an ID
@param[in,out] trx Transaction */
diff --git a/storage/innobase/include/dict0crea.h b/storage/innobase/include/dict0crea.h
index 7d87686e010..359d9f556e5 100644
--- a/storage/innobase/include/dict0crea.h
+++ b/storage/innobase/include/dict0crea.h
@@ -238,16 +238,6 @@ dict_replace_tablespace_in_dictionary(
const char* path,
trx_t* trx);
-/** Delete records from SYS_TABLESPACES and SYS_DATAFILES associated
-with a particular tablespace ID.
-@param[in] space Tablespace ID
-@param[in,out] trx Current transaction
-@return DB_SUCCESS if OK, dberr_t if the operation failed */
-dberr_t
-dict_delete_tablespace_and_datafiles(
- ulint space,
- trx_t* trx);
-
/********************************************************************//**
Add a foreign key definition to the data dictionary tables.
@return error code or DB_SUCCESS */