1 # MRR tests that are special for InnoDB
4 --echo # Bug#41029
"MRR: SELECT FOR UPDATE fails to lock gaps (InnoDB table)"
7 # This test verifies that a SELECT FOR UPDATE statement executed in
8 # REPEATABLE READ isolation will lock the entire read interval by verifying
9 # that a second transaction trying to update data within this interval will
12 connect (con1,localhost,root,,);
13 connect (con2,localhost,root,,);
20 dummy INT PRIMARY
KEY,
25 INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
28 SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
29 SELECT @@tx_isolation;
32 EXPLAIN SELECT * FROM t1 WHERE a > 2 FOR UPDATE;
34 SELECT * FROM t1 WHERE a > 2 FOR UPDATE;
41 --error ER_LOCK_WAIT_TIMEOUT
42 INSERT INTO t1 VALUES (2,2,2);
55 --echo # Bug#54286
"Server crash at lock timeout with MRR"
58 connect (con1,localhost,root,,);
59 connect (con2,localhost,root,,);
66 dummy INT PRIMARY
KEY,
73 INSERT INTO t1 VALUES (1,1,1),(3,3,3),(5,5,5);
79 --error ER_LOCK_WAIT_TIMEOUT
80 SELECT * FROM t1 WHERE a > 2 FOR UPDATE;