~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: 2009-03-08 23:45:12 UTC
  • mto: (923.2.1 mordred)
  • mto: This revision was merged to the branch mainline in revision 921.
  • Revision ID: mordred@inaugust.com-20090308234512-tqkygxtu1iaig23s
Removed C99 isnan() usage, which allows us to remove the util/math.{cc,h} workarounds. Yay for standards!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/not_embedded.inc
 
2
-- source include/have_innodb.inc
 
3
 
 
4
--disable_warnings
 
5
drop table if exists t1;
 
6
--enable_warnings
 
7
 
 
8
# basic tests of semi-consistent reads
 
9
 
 
10
connect (a,localhost,root,,);
 
11
connect (b,localhost,root,,);
 
12
connection a;
 
13
set binlog_format=mixed;
 
14
set session transaction isolation level read committed;
 
15
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
 
16
insert into t1 values (1),(2),(3),(4),(5),(6),(7);
 
17
set autocommit=0;
 
18
# this should lock the entire table
 
19
select * from t1 where a=3 lock in share mode;
 
20
connection b;
 
21
set binlog_format=mixed;
 
22
set session transaction isolation level read committed;
 
23
set autocommit=0;
 
24
-- error ER_LOCK_WAIT_TIMEOUT
 
25
update t1 set a=10 where a=5;
 
26
connection a;
 
27
commit;
 
28
connection b;
 
29
update t1 set a=10 where a=5;
 
30
connection a;
 
31
-- error ER_LOCK_WAIT_TIMEOUT
 
32
select * from t1 where a=2 for update;
 
33
# this should lock the records (1),(2)
 
34
select * from t1 where a=2 limit 1 for update;
 
35
connection b;
 
36
update t1 set a=11 where a=6;
 
37
-- error ER_LOCK_WAIT_TIMEOUT
 
38
update t1 set a=12 where a=2;
 
39
-- error ER_LOCK_WAIT_TIMEOUT
 
40
update t1 set a=13 where a=1;
 
41
connection a;
 
42
commit;
 
43
connection b;
 
44
update t1 set a=14 where a=1;
 
45
commit;
 
46
connection a;
 
47
select * from t1;
 
48
drop table t1;
 
49
 
 
50
connection default;
 
51
disconnect a;
 
52
disconnect b;