summaryrefslogtreecommitdiff
path: root/mysql-test/t/lock_multi.test
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2005-06-03 15:29:05 +0200
committerunknown <msvensson@neptunus.(none)>2005-06-03 15:29:05 +0200
commitb8fa02c4d20628cad9aaf2635110ea3b3ad37466 (patch)
tree983a4cae6e8952f8b852454f83261a2f9dd2bab7 /mysql-test/t/lock_multi.test
parent2dc4e0485cee5fd139162b01514953832b81557d (diff)
downloadmariadb-git-b8fa02c4d20628cad9aaf2635110ea3b3ad37466.tar.gz
BUG#9998 MySQL client hangs on "USE database"
Use open_normal_and_derived_tables instead of open_and_lock_tables when reading metadata for a table. Add two test cases, one for "USE database" and one for "SHOW COLUMNS FROM table" mysql-test/r/lock_multi.result: Updated test results for test case for bug9998 mysql-test/r/mysql.result: Updated results for test case for bug9998 mysql-test/t/lock_multi.test: Test that "show columsn from t1" is not locked by another thread having a write lock on t1 mysql-test/t/mysql.test: Add test case for BUG9998 - lock table t1 for write from mysql-test, then execute 'mysql' and call "USE test". This will test exactly what caused the bug. sql/sql_show.cc: Open tables without locking when reading metadata
Diffstat (limited to 'mysql-test/t/lock_multi.test')
-rw-r--r--mysql-test/t/lock_multi.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index cbda47ac864..43cff90332b 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -94,3 +94,15 @@ connection reader;
reap;
connection locker;
drop table t1;
+
+
+#
+# BUG#9998 - MySQL client hangs on USE "database"
+
+create table t1(a int);
+lock tables t1 write;
+connection reader;
+show columns from t1;
+connection locker;
+unlock tables;
+drop table t1;