2
# Test case where no locks should be released (because we are not
3
# using READ COMMITTED isolation level)
6
connect (a,localhost,root,,);
7
connect (b,localhost,root,,);
9
create table t1(a int not null, b int, primary key(a)) engine=innodb;
10
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2);
13
select * from t1 lock in share mode;
14
update t1 set b = 5 where b = 1;
18
# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
20
--error ER_LOCK_WAIT_TIMEOUT
21
select * from t1 where a = 2 and b = 2 for update;
23
# X-lock to record (1,1),(3,1),(5,1) should not be released in a update
25
--error ER_LOCK_WAIT_TIMEOUT