~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/mysql-test/innodb-semi-consistent.test

  • Committer: Monty Taylor
  • Date: 2008-08-16 21:06:22 UTC
  • Revision ID: monty@inaugust.com-20080816210622-zpnn13unyinqzn72
Updated po files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
--disable_warnings
3
 
drop table if exists t1;
4
 
--enable_warnings
5
 
 
6
 
# basic tests of semi-consistent reads
7
 
 
8
 
connect (a,localhost,root,,);
9
 
connect (b,localhost,root,,);
10
 
connection a;
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);
15
 
set autocommit=0;
16
 
# this should lock the entire table
17
 
select * from t1 where a=3 lock in share mode;
18
 
connection b;
19
 
set binlog_format=mixed;
20
 
set session transaction isolation level read committed;
21
 
set autocommit=0;
22
 
update t1 set a=10 where a=5;
23
 
connection a;
24
 
commit;
25
 
connection b;
26
 
update t1 set a=10 where a=5;
27
 
connection a;
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;
31
 
connection b;
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;
35
 
connection a;
36
 
commit;
37
 
connection b;
38
 
update t1 set a=14 where a=1;
39
 
commit;
40
 
connection a;
41
 
select * from t1;
42
 
drop table t1;
43
 
 
44
 
connection default;
45
 
disconnect a;
46
 
disconnect b;