Debian Codegraph @

mysql-test/suite/innodb/r/innodb_timeout_rollback.result

raw
1 drop table if exists t1;
2 show variables like 'innodb_rollback_on_timeout';
3 Variable_name Value
4 innodb_rollback_on_timeout ON
5 create table t1 (a int unsigned not null primary key) engine = innodb;
6 insert into t1 values (1);
7 commit;
8 begin work;
9 insert into t1 values (2);
10 select * from t1;
11 a
12 1
13 2
14 begin work;
15 insert into t1 values (5);
16 select * from t1;
17 a
18 1
19 5
20 insert into t1 values (2);
21 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
22 select * from t1;
23 a
24 1
25 commit;
26 select * from t1;
27 a
28 1
29 2
30 commit;
31 select * from t1;
32 a
33 1
34 2
35 drop table t1;
36 End of 5.0 tests
37 #
38 # Bug#23753319: !M_THD->TRANSACTION_ROLLBACK_REQUEST' AT
39 # THD::ATTACHABLE_TRX::INIT IN SQL/SQL_C
40 #
41 create table t1 (i int);
42 insert into t1 values (42);
43 # Grab locks which will block another con from doing select in RR
44 BEGIN;
45 select * from t1 for update;
46 i
47 42
48 # Create competing connection using RR
49 BEGIN;
50 set session transaction isolation level repeatable read;
51 # Will fail and request rollback due to blocking for update
52 # (prior to fix this would trigger the assert).
53 create table t2 as select * from t1;
54 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
55 # Additional coverage for WL#7743 "New data dictionary: changes
56 # to DDL-related parts of SE API". Check how rollback is handled
57 # by similar CTS for non-transactional table.
58 BEGIN;
59 create table t2 engine=myisam as select * from t1;
60 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
61 # Cleanup
62 COMMIT;
63 drop table t1;