| 1 |
# |
| 2 |
# verify that DELETE IGNORE does not ignore deadlocks |
| 3 |
# |
| 4 |
|
| 5 |
--source include/have_innodb.inc |
| 6 |
|
| 7 |
SET GLOBAL innodb_lock_wait_timeout=3; |
| 8 |
|
| 9 |
CREATE TABLE t1 (col_int_key INT, KEY (col_int_key)) ENGINE=InnoDB; |
| 10 |
INSERT INTO t1 VALUES (6); |
| 11 |
|
| 12 |
--connect (con1,localhost,root,,test) |
| 13 |
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE; |
| 14 |
SET AUTOCOMMIT=OFF; |
| 15 |
SELECT col_int_key FROM t1; |
| 16 |
|
| 17 |
--connection default |
| 18 |
--send DELETE IGNORE FROM t1; |
| 19 |
|
| 20 |
--connection con1 |
| 21 |
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT |
| 22 |
DELETE FROM t1 WHERE col_int_key IN (1, 40000000); |
| 23 |
|
| 24 |
--connection default |
| 25 |
--disable_warnings |
| 26 |
--error 0,ER_LOCK_DEADLOCK,ER_LOCK_WAIT_TIMEOUT |
| 27 |
--reap |
| 28 |
--enable_warnings |
| 29 |
|
| 30 |
--disconnect con1 |
| 31 |
drop table t1; |
| 32 |
SET GLOBAL innodb_lock_wait_timeout=default; |
| 33 |
|
| 34 |
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); |