summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb/r/deadlock_detect.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb/r/deadlock_detect.result')
-rw-r--r--mysql-test/suite/innodb/r/deadlock_detect.result24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/deadlock_detect.result b/mysql-test/suite/innodb/r/deadlock_detect.result
new file mode 100644
index 00000000..8131585a
--- /dev/null
+++ b/mysql-test/suite/innodb/r/deadlock_detect.result
@@ -0,0 +1,24 @@
+connection default;
+CREATE TABLE t1(
+id INT,
+PRIMARY KEY(id)
+) ENGINE=InnoDB;
+INSERT INTO t1 VALUES(1), (2), (3);
+BEGIN;
+SELECT * FROM t1 WHERE id = 1 LOCK IN SHARE MODE;
+connect con1,localhost,root,,;
+BEGIN;
+SELECT * FROM t1 WHERE id = 2 LOCK IN SHARE MODE;
+connect con2,localhost,root,,;
+BEGIN;
+SELECT * FROM t1 WHERE id = 2 LOCK IN SHARE MODE;
+SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
+connection default;
+SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
+connection con2;
+disconnect con1;
+ROLLBACK;
+disconnect con2;
+connection default;
+ROLLBACK;
+DROP TABLE t1;