MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
innodb_rollback_on_timeout.inc
1 #
2 # Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
3 # transaction timeout"
4 #
5 --disable_warnings
6 drop table if exists t1;
7 --enable_warnings
8 
9 show variables like 'innodb_rollback_on_timeout';
10 create table t1 (a int unsigned not null primary key) engine = innodb;
11 insert into t1 values (1);
12 commit;
13 connect (con1,localhost,root,,);
14 connect (con2,localhost,root,,);
15 
16 connection con2;
17 begin work;
18 insert into t1 values (2);
19 select * from t1;
20 
21 connection con1;
22 begin work;
23 insert into t1 values (5);
24 select * from t1;
25 # Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this
26 # statement will time out; in 5.0.13+, it will not roll back transaction.
27 --error ER_LOCK_WAIT_TIMEOUT
28 insert into t1 values (2);
29 # On 5.0.13+, this should give ==> 1, 5
30 select * from t1;
31 commit;
32 
33 connection con2;
34 select * from t1;
35 commit;
36 
37 connection default;
38 select * from t1;
39 drop table t1;
40 disconnect con1;
41 disconnect con2;