summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb/t/deadlock_detect.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb/t/deadlock_detect.test')
-rw-r--r--mysql-test/suite/innodb/t/deadlock_detect.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/t/deadlock_detect.test b/mysql-test/suite/innodb/t/deadlock_detect.test
index 85d8c1f67f2..babdb54719f 100644
--- a/mysql-test/suite/innodb/t/deadlock_detect.test
+++ b/mysql-test/suite/innodb/t/deadlock_detect.test
@@ -18,6 +18,8 @@ CREATE TABLE t1(
INSERT INTO t1 VALUES(1), (2), (3);
+# We are not interested query results, only errors
+--disable_result_log
BEGIN;
SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
@@ -39,12 +41,22 @@ reap;
ROLLBACK;
+#
+# Note here that con1 is the older transaction as it
+# query started wait first. Thus, con1 gets lock
+# wait timeout first. There is possibility that
+# default connection gets lock timeout also or
+# as con1 is rolled back it gets the locks it waited
+# and does the update.
+#
connection default;
---error ER_LOCK_WAIT_TIMEOUT
+--error 0,ER_LOCK_WAIT_TIMEOUT
reap;
ROLLBACK;
+--enable_result_log
+
DROP TABLE t1;
disconnect con1;