From adb0fdb268c6b461a130c27f53a5244a3aa217e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 17 May 2021 09:03:06 +0300 Subject: [PATCH] Cleanup: Remove unused DB_TABLE_IS_BEING_USED The error code DB_TABLE_IS_BEING_USED was orphaned in commit ddc663efa5b60c7e9d15daf3cf3625d694602ef9 (MySQL 3.23.37). Let us finally remove it. --- mysql-test/suite/innodb/r/innodb-wl5522-debug.result | 4 ++-- mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result | 4 ++-- storage/innobase/handler/ha_innodb.cc | 3 --- storage/innobase/include/db0err.h | 1 - storage/innobase/ut/ut0ut.cc | 2 -- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result index 0d4ee52743c..4d312e59115 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result +++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result @@ -453,7 +453,7 @@ restore: t1 .ibd and .cfg files SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Got error 44 'Tablespace not found' from ./test/t1.ibd +ERROR HY000: Got error 43 'Tablespace not found' from ./test/t1.ibd SET SESSION debug_dbug=@saved_debug_dbug; restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; @@ -922,7 +922,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Got error 39 'Data structure corruption' from ./test/t1.ibd +ERROR HY000: Got error 38 'Data structure corruption' from ./test/t1.ibd SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; unlink: t1.ibd diff --git a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result index c3b6b85ba8e..92ca5a10bb1 100644 --- a/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result +++ b/mysql-test/suite/innodb_zip/r/wl5522_debug_zip.result @@ -88,7 +88,7 @@ restore: t1 .ibd and .cfg files SET SESSION debug_dbug=@saved_debug_dbug; SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Got error 44 'Tablespace not found' from ./test/t1.ibd +ERROR HY000: Got error 43 'Tablespace not found' from ./test/t1.ibd SET SESSION debug_dbug=@saved_debug_dbug; restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure"; @@ -388,7 +388,7 @@ ERROR HY000: Tablespace has been discarded for table `t1` restore: t1 .ibd and .cfg files SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure"; ALTER TABLE t1 IMPORT TABLESPACE; -ERROR HY000: Got error 39 'Data structure corruption' from ./test/t1.ibd +ERROR HY000: Got error 38 'Data structure corruption' from ./test/t1.ibd SET SESSION debug_dbug=@saved_debug_dbug; DROP TABLE t1; unlink: t1.ibd diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index ffe9e2e8b44..5b5f07e3ce2 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -1758,9 +1758,6 @@ convert_error_code_to_mysql( case DB_TABLE_IN_FK_CHECK: return(HA_ERR_TABLE_IN_FK_CHECK); - case DB_TABLE_IS_BEING_USED: - return(HA_ERR_WRONG_COMMAND); - case DB_TABLE_NOT_FOUND: return(HA_ERR_NO_SUCH_TABLE); diff --git a/storage/innobase/include/db0err.h b/storage/innobase/include/db0err.h index 6cfc63f4a9e..caf85113e51 100644 --- a/storage/innobase/include/db0err.h +++ b/storage/innobase/include/db0err.h @@ -51,7 +51,6 @@ enum dberr_t { DB_TABLE_NOT_FOUND, DB_MUST_GET_MORE_FILE_SPACE, /*!< the database has to be stopped and restarted with more file space */ - DB_TABLE_IS_BEING_USED, DB_TOO_BIG_RECORD, /*!< a record in an index would not fit on a compressed page, or it would become bigger than 1/2 free space in diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc index b6ad91babe4..aad3e0d2815 100644 --- a/storage/innobase/ut/ut0ut.cc +++ b/storage/innobase/ut/ut0ut.cc @@ -366,8 +366,6 @@ ut_strerr( return("Table not found"); case DB_MUST_GET_MORE_FILE_SPACE: return("More file space needed"); - case DB_TABLE_IS_BEING_USED: - return("Table is being used"); case DB_TOO_BIG_RECORD: return("Record too big"); case DB_TOO_BIG_INDEX_COL: