~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2009-01-24 09:43:35 UTC
  • Revision ID: brian@gir-3.local-20090124094335-6qdtvc35gl5fvivz
Adding in an example singe thread scheduler

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
connect (b,localhost,root,,);
12
12
connection a;
13
13
set binlog_format=mixed;
14
 
set session transaction isolation level repeatable read;
 
14
set session transaction isolation level read committed;
15
15
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
16
16
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
17
17
set autocommit=0;
19
19
select * from t1 where a=3 lock in share mode;
20
20
connection b;
21
21
set binlog_format=mixed;
22
 
set session transaction isolation level repeatable read;
 
22
set session transaction isolation level read committed;
23
23
set autocommit=0;
24
24
-- error ER_LOCK_WAIT_TIMEOUT
25
25
update t1 set a=10 where a=5;
26
26
connection a;
27
27
commit;
28
28
connection b;
29
 
# perform a semi-consisent read (and unlock non-matching rows)
30
 
set session transaction isolation level read committed;
31
29
update t1 set a=10 where a=5;
32
30
connection a;
33
31
-- error ER_LOCK_WAIT_TIMEOUT
35
33
# this should lock the records (1),(2)
36
34
select * from t1 where a=2 limit 1 for update;
37
35
connection b;
38
 
# semi-consistent read will skip non-matching locked rows a=1, a=2
39
36
update t1 set a=11 where a=6;
40
37
-- error ER_LOCK_WAIT_TIMEOUT
41
38
update t1 set a=12 where a=2;
53
50
connection default;
54
51
disconnect a;
55
52
disconnect b;
56
 
 
57
 
# Bug 39320
58
 
create table t1 (a int, b int) engine=myisam;
59
 
create table t2 (c int, d int, key (c)) engine=innodb;
60
 
insert into t1 values (1,1);
61
 
insert into t2 values (1,2);
62
 
connect (a,localhost,root,,);
63
 
connection a;
64
 
set session transaction isolation level read committed;
65
 
delete from t1 using t1 join t2 on t1.a = t2.c where t2.d in (1);
66
 
connection default;
67
 
disconnect a;
68
 
drop table t1, t2;