1 set global innodb_table_locks=1;
2 select @@innodb_table_locks;
5 drop table if exists t1;
6 set @@innodb_table_locks=1;
7 create table t1 (id integer, x integer) engine=INNODB;
8 insert into t1 values(0, 0);
10 SELECT * from t1 where id = 0 FOR UPDATE;
15 update t1 set x=1 where id = 0;
20 update t1 set x=2 where id = 0;
28 set @@innodb_table_locks=0;
29 create table t1 (id integer primary key, x integer) engine=INNODB;
30 insert into t1 values(0, 0),(1,1),(2,2);
32 SELECT * from t1 where id = 0 FOR UPDATE;
36 set @@innodb_table_locks=0;
38 update t1 set x=10 where id = 2;
39 SELECT * from t1 where id = 2;
42 UPDATE t1 set x=3 where id = 2;
59 #Bug#12842206 INNODB LOCKING REGRESSION FOR INSERT IGNORE
60 #fixed by re-fixing Bug#7975
61 #aka Bug#11759688 52020: InnoDB can still deadlock on just INSERT...
63 CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB;
64 INSERT INTO t1 VALUES(3,1);
66 INSERT IGNORE INTO t1 VALUES(3,14);
68 INSERT IGNORE INTO t1 VALUES(3,23);
69 SELECT * FROM t1 FOR UPDATE;