3
drop table if exists t1;
6
# basic tests of semi-consistent reads
8
connect (a,localhost,root,,);
9
connect (b,localhost,root,,);
11
set session transaction isolation level read committed;
12
create table t1(a int not null) engine=innodb;
13
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
15
# this should lock the entire table
16
select * from t1 where a=3 lock in share mode;
18
set session transaction isolation level read committed;
20
update t1 set a=10 where a=5;
24
update t1 set a=10 where a=5;
26
select * from t1 where a=2 for update;
27
# this should lock the records (1),(2)
28
select * from t1 where a=2 limit 1 for update;
30
update t1 set a=11 where a=6;
31
update t1 set a=12 where a=2;
32
update t1 set a=13 where a=1;
36
update t1 set a=14 where a=1;