summaryrefslogtreecommitdiff
path: root/mysql-test/r/flush.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/flush.result')
-rw-r--r--mysql-test/r/flush.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result
index b978304f59d..2136bcd92f1 100644
--- a/mysql-test/r/flush.result
+++ b/mysql-test/r/flush.result
@@ -33,6 +33,9 @@ flush tables with read lock;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
lock table t1 read;
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;
+flush tables with read lock;
lock table t1 write;
ERROR HY000: Can't execute the query because you have a conflicting read lock
lock table t1 read;
@@ -46,6 +49,7 @@ flush tables with read lock;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
lock table t1 read, t2 read, t3 read;
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, t2, t3;
create table t1 (c1 int);
@@ -69,6 +73,7 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
unlock tables;
lock tables t1 read;
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, t2;
set session low_priority_updates=default;
@@ -89,3 +94,20 @@ unlock tables;
set global general_log= @old_general_log;
set global read_only= @old_read_only;
End of 5.1 tests
+#
+# Additional test for bug #51136 "Crash in pthread_rwlock_rdlock
+# on TEMPORARY + HANDLER + LOCK + SP".
+# Also see the main test for this bug in include/handler.inc.
+#
+drop tables if exists t1, t2;
+create table t1 (i int);
+create temporary table t2 (j int);
+flush tables with read lock;
+lock table t2 read;
+# This commit should not release any MDL locks.
+commit;
+# The below statement crashed before the bug fix as it
+# has attempted to release global shared metadata lock
+# which was already released by commit.
+unlock tables;
+drop tables t1, t2;