summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@sun.com>2010-03-26 15:20:11 +0400
committerSergey Vojtovich <svoj@sun.com>2010-03-26 15:20:11 +0400
commit604ab4d274ab036acd1725707b436836e98699a0 (patch)
treee99eeb7bebefff690d819b9e0b886c6fcd148580 /mysql-test
parent3569fe776fbaf0a750b054b0684d37d7cefeaa94 (diff)
downloadmariadb-git-604ab4d274ab036acd1725707b436836e98699a0.tar.gz
Applying InnoDB snapshot
Detailed revision comments: r6884 | vdimov | 2010-03-26 13:05:03 +0200 (Fri, 26 Mar 2010) | 6 lines branches/5.1: Fix a non-determinism in innodb_bug38231. Reported by: Sergey Vojtovich <svoj@Sun.COM> r6884 | vdimov | 2010-03-26 13:05:03 +0200 (Fri, 26 Mar 2010) | 6 lines branches/5.1: Fix a non-determinism in innodb_bug38231. Reported by: Sergey Vojtovich <svoj@Sun.COM>
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/t/innodb_bug38231.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/innodb_bug38231.test b/mysql-test/t/innodb_bug38231.test
index 54f58844c42..1611cb56203 100644
--- a/mysql-test/t/innodb_bug38231.test
+++ b/mysql-test/t/innodb_bug38231.test
@@ -27,6 +27,21 @@ SET autocommit=0;
-- send
LOCK TABLE bug38231 WRITE;
+# When con1 does UNLOCK below this will release either con2 or con3 which are
+# both waiting on LOCK. At the end we must first --reap and UNLOCK the
+# connection that has been released, otherwise it will wait forever. We assume
+# that the released connection will be the first one that has gained the LOCK,
+# thus we force the order here - con2 does LOCK first, then con3. In other
+# words we wait for LOCK from con2 above to be exected before doing LOCK in
+# con3.
+-- connection con1
+let $wait_condition =
+ SELECT COUNT(*) = 1 FROM information_schema.processlist
+ WHERE info = 'LOCK TABLE bug38231 WRITE';
+-- source include/wait_condition.inc
+# the above enables query log, re-disable it
+-- disable_query_log
+
-- connection con3
SET autocommit=0;
-- send