summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <dlenev@jabberwock.site>2006-07-08 01:33:50 +0400
committerunknown <dlenev@jabberwock.site>2006-07-08 01:33:50 +0400
commite8699b56140571305b898c29bdc45a5bab117a45 (patch)
tree4e5948bcd0de3d1413ffb8836eabba042b6f211d /mysql-test
parent15436eca73fc3001a70da81db4498abcecdc1b0b (diff)
parentb72a72aa0bf2f4cf7804687c4d4eeb3b8c8e24a3 (diff)
downloadmariadb-git-e8699b56140571305b898c29bdc45a5bab117a45.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into jabberwock.site:/home/dlenev/mysql-5.1-bg18437
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/lock.result7
-rw-r--r--mysql-test/t/lock.test15
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result
index 079b0253ff6..7cd223197e7 100644
--- a/mysql-test/r/lock.result
+++ b/mysql-test/r/lock.result
@@ -68,3 +68,10 @@ ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
delete t2 from t1,t2 where t1.a=t2.a;
ERROR HY000: Table 't2' was locked with a READ lock and can't be updated
drop table t1,t2;
+drop table if exists t1;
+create table t1 (a int);
+lock table t1 write;
+flush tables with read lock;
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+unlock tables;
+drop table t1;
diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test
index 8300219b3d4..fb5e45433e9 100644
--- a/mysql-test/t/lock.test
+++ b/mysql-test/t/lock.test
@@ -93,3 +93,18 @@ delete t2 from t1,t2 where t1.a=t2.a;
drop table t1,t2;
# End of 4.1 tests
+
+#
+# Bug#18884 "lock table + global read lock = crash"
+# The bug is not repeatable, just add the test case.
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int);
+lock table t1 write;
+--error ER_LOCK_OR_ACTIVE_TRANSACTION
+flush tables with read lock;
+unlock tables;
+drop table t1;
+