2012-03-01 16:24:59 +01:00
|
|
|
SET GLOBAL innodb_lock_wait_timeout=3;
|
|
|
|
CREATE TABLE t1 (col_int_key INT, KEY (col_int_key)) ENGINE=InnoDB;
|
|
|
|
INSERT INTO t1 VALUES (6);
|
2016-03-25 20:51:22 +04:00
|
|
|
connect con1,localhost,root,,test;
|
2012-03-01 16:24:59 +01:00
|
|
|
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
|
|
|
SET AUTOCOMMIT=OFF;
|
|
|
|
SELECT col_int_key FROM t1;
|
|
|
|
col_int_key
|
|
|
|
6
|
2016-03-25 20:51:22 +04:00
|
|
|
connection default;
|
2012-03-01 16:24:59 +01:00
|
|
|
DELETE IGNORE FROM t1;;
|
2016-03-25 20:51:22 +04:00
|
|
|
connection con1;
|
2012-03-01 16:24:59 +01:00
|
|
|
DELETE FROM t1 WHERE col_int_key IN (1, 40000000);
|
2016-03-25 20:51:22 +04:00
|
|
|
connection default;
|
|
|
|
disconnect con1;
|
2012-03-01 16:24:59 +01:00
|
|
|
drop table t1;
|
|
|
|
SET GLOBAL innodb_lock_wait_timeout=default;
|
2016-12-19 17:32:45 -05:00
|
|
|
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
|