~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/innodb-semi-consistent.test

  • Committer: Lee
  • Date: 2008-10-30 22:02:01 UTC
  • mto: (572.1.2 devel)
  • mto: This revision was merged to the branch mainline in revision 573.
  • Revision ID: lbieber@lbieber-desktop-20081030220201-elb6qprbzpn7c5a4
add my name to the AUTHORS file

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
drop table if exists t1;
5
5
--enable_warnings
6
6
 
7
 
SET @orig_lock_wait_timeout= @@innodb_lock_wait_timeout; 
8
 
SET GLOBAL innodb_lock_wait_timeout=2;
9
 
 
10
7
# basic tests of semi-consistent reads
 
8
 
11
9
connect (a,localhost,root,,);
12
10
connect (b,localhost,root,,);
13
11
connection a;
15
13
create table t1(a int not null) engine=innodb;
16
14
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
17
15
set autocommit=0;
18
 
# we have locks_unsafe_for_binlog on by default. this should work.
 
16
# this should lock the entire table
19
17
select * from t1 where a=3 lock in share mode;
20
18
connection b;
21
19
set session transaction isolation level read committed;
22
20
set autocommit=0;
 
21
-- error ER_LOCK_WAIT_TIMEOUT
23
22
update t1 set a=10 where a=5;
24
23
connection a;
25
24
commit;
34
33
update t1 set a=11 where a=6;
35
34
-- error ER_LOCK_WAIT_TIMEOUT
36
35
update t1 set a=12 where a=2;
 
36
-- error ER_LOCK_WAIT_TIMEOUT
37
37
update t1 set a=13 where a=1;
38
38
connection a;
39
39
commit;
42
42
commit;
43
43
connection a;
44
44
select * from t1;
45
 
commit;
46
45
drop table t1;
 
46
 
47
47
connection default;
48
48
disconnect a;
49
49
disconnect b;
50
 
 
51
 
 
52
 
SET GLOBAL innodb_lock_wait_timeout=@orig_lock_wait_timeout ;
53