~vjsamuel/drizzle/fix-bug-651256

« back to all changes in this revision

Viewing changes to plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/t/lock_in_shared_mode.test

  • Committer: Monty Taylor
  • Date: 2010-09-29 04:27:16 UTC
  • mfrom: (1800.1.9 build)
  • Revision ID: mordred@inaugust.com-20100929042716-q9sb3re31iwti87z
Merged doc fixes, lock fixes, path fixes and bath fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Test case where no locks should be released (because we are not
 
3
# using READ COMMITTED isolation level)
 
4
#
 
5
 
 
6
connect (a,localhost,root,,);
 
7
connect (b,localhost,root,,);
 
8
connection a;
 
9
create table t1(a int not null, b int, primary key(a)) engine=innodb;
 
10
insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2);
 
11
commit;
 
12
set autocommit = 0;
 
13
select * from t1 lock in share mode;
 
14
update t1 set b = 5 where b = 1;
 
15
connection b;
 
16
set autocommit = 0;
 
17
#
 
18
# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
 
19
#
 
20
--error ER_LOCK_WAIT_TIMEOUT
 
21
select * from t1 where a = 2 and b = 2 for update;
 
22
#
 
23
# X-lock to record (1,1),(3,1),(5,1) should not be released in a update
 
24
#
 
25
--error ER_LOCK_WAIT_TIMEOUT
 
26
connection a;
 
27
commit;
 
28
connection b;
 
29
commit;
 
30
connection default;
 
31
disconnect a;
 
32
disconnect b;
 
33
drop table t1;
 
34