summaryrefslogtreecommitdiff
path: root/mysql-test/t/delayed.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/delayed.test')
-rw-r--r--mysql-test/t/delayed.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test
index b8ab4fe31c0..ead1d0dfd14 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -341,4 +341,28 @@ drop table t1;
set global low_priority_updates = @old_delayed_updates;
+
+--echo #
+--echo # Bug #47682 strange behaviour of INSERT DELAYED
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+--enable_warnings
+
+CREATE TABLE t1 (f1 integer);
+CREATE TABLE t2 (f1 integer);
+
+FLUSH TABLES WITH READ LOCK;
+LOCK TABLES t1 READ;
+
+# ER_CANT_UPDATE_WITH_READLOCK with normal execution
+# ER_TABLE_NOT_LOCKED when executed as prepared statement
+--error ER_CANT_UPDATE_WITH_READLOCK, ER_TABLE_NOT_LOCKED
+INSERT DELAYED INTO t2 VALUES (1);
+
+UNLOCK TABLES;
+DROP TABLE t1, t2;
+
+
--echo End of 5.1 tests