From 40c0ae812965d86406f8e44fc0c4af0914858d46 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin Date: Thu, 22 Oct 2009 23:32:12 +0400 Subject: [PATCH] Adding forgotten files for test case for Bug#43138. --- mysql-test/r/drop_debug.result | 25 +++++++++++++++++++++++ mysql-test/t/drop_debug.test | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 mysql-test/r/drop_debug.result create mode 100644 mysql-test/t/drop_debug.test diff --git a/mysql-test/r/drop_debug.result b/mysql-test/r/drop_debug.result new file mode 100644 index 00000000000..5fa8b8cb3de --- /dev/null +++ b/mysql-test/r/drop_debug.result @@ -0,0 +1,25 @@ + +# -- +# -- 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 = "+d,bug43138"; + +DROP DATABASE mysql_test; +Warnings: +Error 1051 Unknown table 't3' +Error 1051 Unknown table 't2' +Error 1051 Unknown table 't1' + +SET SESSION DEBUG = "-d,bug43138"; + +# -- +# -- End of Bug#43138. +# -- diff --git a/mysql-test/t/drop_debug.test b/mysql-test/t/drop_debug.test new file mode 100644 index 00000000000..3e29d0f1308 --- /dev/null +++ b/mysql-test/t/drop_debug.test @@ -0,0 +1,37 @@ +# +# 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 = "+d,bug43138"; + +--echo +DROP DATABASE mysql_test; + +--echo +SET SESSION DEBUG = "-d,bug43138"; + +--echo +--echo # -- +--echo # -- End of Bug#43138. +--echo # -- + +###########################################################################