~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/mysql-test/innodb-timeout.test

  • Committer: Monty Taylor
  • Date: 2008-08-02 01:03:15 UTC
  • mto: (236.1.42 codestyle)
  • mto: This revision was merged to the branch mainline in revision 261.
  • Revision ID: monty@inaugust.com-20080802010315-65h5938pymg9d99z
Moved m4 macros to top-level m4 dir, per GNU standards (and where gettext wanted it :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
let $timeout=`select @@innodb_lock_wait_timeout`;
3
 
set global innodb_lock_wait_timeout=42;
4
 
 
5
 
connect (a,localhost,root,,);
6
 
connect (b,localhost,root,,);
7
 
 
8
 
connection a;
9
 
select @@innodb_lock_wait_timeout;
10
 
set innodb_lock_wait_timeout=1;
11
 
select @@innodb_lock_wait_timeout;
12
 
 
13
 
connection b;
14
 
select @@innodb_lock_wait_timeout;
15
 
set global innodb_lock_wait_timeout=347;
16
 
select @@innodb_lock_wait_timeout;
17
 
set innodb_lock_wait_timeout=1;
18
 
select @@innodb_lock_wait_timeout;
19
 
 
20
 
connect (c,localhost,root,,);
21
 
connection c;
22
 
select @@innodb_lock_wait_timeout;
23
 
connection default;
24
 
disconnect c;
25
 
 
26
 
connection a;
27
 
create table t1(a int primary key)engine=innodb;
28
 
begin;
29
 
insert into t1 values(1),(2),(3);
30
 
 
31
 
connection b;
32
 
--send
33
 
select * from t1 for update;
34
 
 
35
 
connection a;
36
 
commit;
37
 
 
38
 
connection b;
39
 
reap;
40
 
 
41
 
connection a;
42
 
begin;
43
 
insert into t1 values(4);
44
 
 
45
 
connection b;
46
 
--send
47
 
select * from t1 for update;
48
 
 
49
 
connection a;
50
 
sleep 2;
51
 
commit;
52
 
 
53
 
connection b;
54
 
--error ER_LOCK_WAIT_TIMEOUT
55
 
reap;
56
 
drop table t1;
57
 
 
58
 
connection default;
59
 
 
60
 
disconnect a;
61
 
disconnect b;
62
 
 
63
 
eval set global innodb_lock_wait_timeout=$timeout;