diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 12:24:36 +0000 |
commit | 06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/r/deadlock_victim_race.result | |
parent | Initial commit. (diff) | |
download | mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/r/deadlock_victim_race.result')
-rw-r--r-- | mysql-test/suite/innodb/r/deadlock_victim_race.result | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/deadlock_victim_race.result b/mysql-test/suite/innodb/r/deadlock_victim_race.result new file mode 100644 index 00000000..061edc77 --- /dev/null +++ b/mysql-test/suite/innodb/r/deadlock_victim_race.result @@ -0,0 +1,46 @@ +connect cancel_purge,localhost,root,,; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +connection default; +CREATE TABLE t (a int PRIMARY KEY, b int) engine = InnoDB; +CREATE TABLE t2 (a int PRIMARY KEY) engine = InnoDB; +INSERT INTO t VALUES (10, 10), (20, 20), (30, 30); +INSERT INTO t2 VALUES (10), (20), (30); +BEGIN; +SELECT * FROM t WHERE a = 20 FOR UPDATE; +a b +20 20 +connect con_2,localhost,root,,; +SET TRANSACTION ISOLATION LEVEL READ COMMITTED; +BEGIN; +SET DEBUG_SYNC = 'lock_trx_handle_wait_enter SIGNAL upd_locked WAIT_FOR upd_cont EXECUTE 2'; +UPDATE t SET b = 100; +connect con_3,localhost,root,,; +BEGIN; +UPDATE t2 SET a = a + 100; +SELECT * FROM t WHERE a = 30 FOR UPDATE; +a b +30 30 +SET DEBUG_SYNC='now WAIT_FOR upd_locked'; +SET DEBUG_SYNC = 'lock_wait_start SIGNAL sel_locked'; +SELECT * FROM t WHERE a = 20 FOR UPDATE; +connection default; +SET DEBUG_SYNC='now WAIT_FOR sel_locked'; +ROLLBACK; +SET DEBUG_SYNC='now SIGNAL upd_cont'; +SET DEBUG_SYNC="now WAIT_FOR upd_locked"; +SET SESSION innodb_lock_wait_timeout=1; +SELECT * FROM t WHERE a = 10 FOR UPDATE; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +SET DEBUG_SYNC="now SIGNAL upd_cont"; +connection con_3; +a b +20 20 +connection con_2; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +disconnect con_3; +disconnect con_2; +connection default; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t; +DROP TABLE t2; +disconnect cancel_purge; |