From 9edfc00697b6b97e838d517cdb1883ea115c4746 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 23 Jun 2017 18:15:07 +0200 Subject: [PATCH] MDEV-11930 Unexpected ER_ERROR_EVALUATING_EXPRESSION warning upon dropping database with a bad table DBUG_EXECUTE_IF was wrong, it used my_error, but didn't do error=1. It's not clear what it was actually testing, what it was supposed to be testing, and what it has to do with bug#43138, so I removed it. --- mysql-test/r/drop_debug.result | 25 ---------------------- mysql-test/t/drop_debug.test | 38 ---------------------------------- sql/sql_table.cc | 4 ---- 3 files changed, 67 deletions(-) delete mode 100644 mysql-test/r/drop_debug.result delete mode 100644 mysql-test/t/drop_debug.test diff --git a/mysql-test/r/drop_debug.result b/mysql-test/r/drop_debug.result deleted file mode 100644 index 852b3ac2163..00000000000 --- a/mysql-test/r/drop_debug.result +++ /dev/null @@ -1,25 +0,0 @@ - -# -- -# -- Bug#43138: DROP DATABASE failure does not clean up message list. -# -- - -DROP DATABASE IF EXISTS mysql_test; - -CREATE DATABASE mysql_test; -CREATE TABLE mysql_test.t1(a INT); -CREATE TABLE mysql_test.t2(b INT); -CREATE TABLE mysql_test.t3(c INT); - -SET SESSION debug_dbug= "+d,bug43138"; - -DROP DATABASE mysql_test; -Warnings: -Error 1051 Unknown table 't1' -Error 1051 Unknown table 't2' -Error 1051 Unknown table 't3' - -SET SESSION debug_dbug= "-d,bug43138"; - -# -- -# -- End of Bug#43138. -# -- diff --git a/mysql-test/t/drop_debug.test b/mysql-test/t/drop_debug.test deleted file mode 100644 index 21069b57285..00000000000 --- a/mysql-test/t/drop_debug.test +++ /dev/null @@ -1,38 +0,0 @@ -# -# DROP-related tests which execution requires debug server. -# ---source include/have_debug.inc - -########################################################################### ---echo ---echo # -- ---echo # -- Bug#43138: DROP DATABASE failure does not clean up message list. ---echo # -- ---echo - ---disable_warnings -DROP DATABASE IF EXISTS mysql_test; ---enable_warnings - ---echo -CREATE DATABASE mysql_test; -CREATE TABLE mysql_test.t1(a INT); -CREATE TABLE mysql_test.t2(b INT); -CREATE TABLE mysql_test.t3(c INT); - ---echo -SET SESSION debug_dbug= "+d,bug43138"; - ---echo ---sorted_result -DROP DATABASE mysql_test; - ---echo -SET SESSION debug_dbug= "-d,bug43138"; - ---echo ---echo # -- ---echo # -- End of Bug#43138. ---echo # -- - -########################################################################### diff --git a/sql/sql_table.cc b/sql/sql_table.cc index dcae5435d57..db708ff613c 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2522,10 +2522,6 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, DBUG_PRINT("table", ("table: 0x%lx s: 0x%lx", (long) table->table, table->table ? (long) table->table->s : (long) -1)); - - DBUG_EXECUTE_IF("bug43138", - my_error(ER_BAD_TABLE_ERROR, MYF(0), - table->table_name);); } DEBUG_SYNC(thd, "rm_table_no_locks_before_binlog"); thd->thread_specific_used|= (trans_tmp_table_deleted ||