summaryrefslogtreecommitdiff
path: root/mysql-test/r/delayed.result
diff options
context:
space:
mode:
authorDmitry Lenev <dlenev@mysql.com>2010-09-16 18:06:46 +0400
committerDmitry Lenev <dlenev@mysql.com>2010-09-16 18:06:46 +0400
commitbe2061c0517af34a482b08af93e5040115d87c7b (patch)
tree65d95735d10536112af178e0b44946a718aaec95 /mysql-test/r/delayed.result
parenta302953bf77cceb0fec5097b7a5a7a937b8157c3 (diff)
downloadmariadb-git-be2061c0517af34a482b08af93e5040115d87c7b.tar.gz
Fix for merge.test failures in mysql-5.5-runtime
tree for embedded server Test case for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables" can't be run against embedded server. Embedded server converts all DELAYED INSERTs into ordinary INSERTs and this test can't work properly if such conversion happens. Moved this test from merge.test to delayed.test which is skipped if test suite is run with --embedded-server option.
Diffstat (limited to 'mysql-test/r/delayed.result')
-rw-r--r--mysql-test/r/delayed.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/delayed.result b/mysql-test/r/delayed.result
index 4cb97719ff2..77aa0d49407 100644
--- a/mysql-test/r/delayed.result
+++ b/mysql-test/r/delayed.result
@@ -422,3 +422,31 @@ UNLOCK TABLES;
# Connection con1
# Connection default
DROP TABLE t1, t2, t3;
+#
+# Test for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables".
+#
+drop table if exists t1, t2, tm;
+create table t1(a int);
+create table t2(a int);
+create table tm(a int) engine=merge union=(t1, t2);
+begin;
+select * from t1;
+a
+# Connection 'con1'.
+# Sending:
+alter table t1 comment 'test';
+# Connection 'default'.
+# Wait until ALTER TABLE blocks and starts waiting
+# for connection 'default'. It should wait with a
+# pending SNW lock on 't1'.
+# Attempt to perform delayed insert into 'tm' should not lead
+# to a deadlock. Instead error ER_DELAYED_NOT_SUPPORTED should
+# be emitted.
+insert delayed into tm values (1);
+ERROR HY000: DELAYED option not supported for table 'tm'
+# Unblock ALTER TABLE.
+commit;
+# Connection 'con1'.
+# Reaping ALTER TABLE:
+# Connection 'default'.
+drop tables tm, t1, t2;