mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-13262: innodb.deadlock_detect failed in buildbot
There is a race condition on a test. con1 is the older transaction as it query started wait first. Test continues so that 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. Fixed by removing query outputs as they could vary and accepting success from default connection query.
This commit is contained in:
@ -8,21 +8,15 @@ PRIMARY KEY(id)
|
||||
INSERT INTO t1 VALUES(1), (2), (3);
|
||||
BEGIN;
|
||||
SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
|
||||
id
|
||||
1
|
||||
connect con1,localhost,root,,;
|
||||
BEGIN;
|
||||
SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
|
||||
id
|
||||
2
|
||||
SELECT * FROM t1 WHERE id = 1 FOR UPDATE;
|
||||
connection default;
|
||||
SELECT * FROM t1 WHERE id = 2 FOR UPDATE;
|
||||
connection con1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
ROLLBACK;
|
||||
connection default;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
ROLLBACK;
|
||||
DROP TABLE t1;
|
||||
disconnect con1;
|
||||
|
Reference in New Issue
Block a user