mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#23477773 OPTION TO TURN OFF/ON DEADLOCK CHECKER
Backport WL#9383 INNODB: ADD AN OPTION TO TURN OFF/ON DEADLOCK CHECKER (rb#12873) to 5.7.
This commit is contained in:
committed by
Marko Mäkelä
parent
1a5ca702b1
commit
d3a2f60e1a
30
mysql-test/suite/innodb/r/deadlock_detect.result
Normal file
30
mysql-test/suite/innodb/r/deadlock_detect.result
Normal file
@ -0,0 +1,30 @@
|
||||
SET GLOBAL innodb_deadlock_detect=OFF;
|
||||
SET GLOBAL innodb_lock_wait_timeout=2;
|
||||
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 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;
|
||||
SET GLOBAL innodb_lock_wait_timeout=default;
|
||||
SET GLOBAL innodb_deadlock_detect=default;
|
Reference in New Issue
Block a user