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 binlog_format=mixed;
12
set session transaction isolation level read committed;
13
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
14
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
16
# this should lock the entire table
17
select * from t1 where a=3 lock in share mode;
19
set binlog_format=mixed;
20
set session transaction isolation level read committed;
22
update t1 set a=10 where a=5;
26
update t1 set a=10 where a=5;
28
select * from t1 where a=2 for update;
29
# this should lock the records (1),(2)
30
select * from t1 where a=2 limit 1 for update;
32
update t1 set a=11 where a=6;
33
update t1 set a=12 where a=2;
34
update t1 set a=13 where a=1;
38
update t1 set a=14 where a=1;