summaryrefslogtreecommitdiff
path: root/mysql-test/t/show_check.test
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-12-03 14:07:46 +0200
committerGeorgi Kodinov <joro@sun.com>2009-12-03 14:07:46 +0200
commit9091535c5fc914aecaa51acf6e558ccd9800fd88 (patch)
tree05e1b50d13cd309dfc81bea28417c8ce580d7293 /mysql-test/t/show_check.test
parent7622134333ef91e5e88e981288aaf09f7202d54a (diff)
downloadmariadb-git-9091535c5fc914aecaa51acf6e558ccd9800fd88.tar.gz
Bug #48985: show create table crashes if previous access to the table was killed
When checking for an error after removing the special view error handler the code was not taking into account that open_tables() may fail because of the current statement being killed. Added a check for thd->killed. Added a client program to test it.
Diffstat (limited to 'mysql-test/t/show_check.test')
-rw-r--r--mysql-test/t/show_check.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 0ce807ae73e..d46261f38d2 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -1207,6 +1207,28 @@ connection default;
DROP USER test_u@localhost;
+--echo #
+--echo # Bug #48985: show create table crashes if previous access to the table
+--echo # was killed
+--echo #
+
+connect(con1,localhost,root,,);
+CONNECTION con1;
+LET $ID= `SELECT connection_id()`;
+
+CONNECTION default;
+--disable_query_log
+eval KILL QUERY $ID;
+--enable_query_log
+
+CONNECTION con1;
+--error ER_QUERY_INTERRUPTED
+SHOW CREATE TABLE non_existent;
+
+CONNECTION default;
+DISCONNECT con1;
+
+
--echo End of 5.1 tests
# Wait till all disconnects are completed