~ubuntu-branches/ubuntu/karmic/mysql-dfsg-5.1/karmic

« back to all changes in this revision

Viewing changes to mysql-test/t/partition_innodb_semi_consistent.test

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-06-25 12:55:45 UTC
  • mfrom: (0.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090625125545-v27uqh8rlsj8uh2y
Tags: upstream-5.1.34
ImportĀ upstreamĀ versionĀ 5.1.34

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
connect (b,localhost,root,,);
15
15
connection a;
16
16
set binlog_format=mixed;
17
 
set session transaction isolation level read committed;
 
17
set session transaction isolation level repeatable read;
18
18
create table t1(a int not null)
19
19
engine=innodb
20
20
DEFAULT CHARSET=latin1
27
27
select * from t1 where a=3 lock in share mode;
28
28
connection b;
29
29
set binlog_format=mixed;
30
 
set session transaction isolation level read committed;
 
30
set session transaction isolation level repeatable read;
31
31
set autocommit=0;
32
32
-- error ER_LOCK_WAIT_TIMEOUT
33
33
update t1 set a=10 where a=5;
35
35
#DELETE FROM t1 WHERE a=5;
36
36
commit;
37
37
connection b;
 
38
# perform a semi-consisent read (and unlock non-matching rows)
 
39
set session transaction isolation level read committed;
38
40
update t1 set a=10 where a=5;
39
41
connection a;
40
42
-- error ER_LOCK_WAIT_TIMEOUT
42
44
# this should lock the records (1),(2)
43
45
select * from t1 where a=2 limit 1 for update;
44
46
connection b;
 
47
# semi-consistent read will skip non-matching locked rows a=1, a=2
45
48
update t1 set a=11 where a=6;
46
49
-- error ER_LOCK_WAIT_TIMEOUT
47
50
update t1 set a=12 where a=2;