Debian Codegraph @

mysql-test/suite/innodb/t/innodb_bug59641.test

raw
1 --source include/have_innodb.inc
2 # Bug #59641 Prepared XA transaction causes shutdown hang after a crash
3
4 -- source include/not_embedded.inc
5
6 --disable_query_log
7 call mtr.add_suppression("Found 3 prepared XA transactions");
8 FLUSH TABLES;
9 --enable_query_log
10
11 CREATE TABLE t(a INT PRIMARY KEY, b INT)ENGINE=InnoDB;
12 INSERT INTO t VALUES(2,2),(4,4),(8,8),(16,16),(32,32);
13 COMMIT;
14 XA START '123';
15 INSERT INTO t VALUES(1,1);
16 XA END '123';
17 XA PREPARE '123';
18
19 CONNECT (con1,localhost,root,,);
20
21 XA START '456';
22 INSERT INTO t VALUES(3,47),(5,67);
23 UPDATE t SET b=2*b WHERE a BETWEEN 5 AND 8;
24 XA END '456';
25 XA PREPARE '456';
26
27 CONNECT (con2,localhost,root,,);
28
29 XA START '789';
30 UPDATE t SET b=4*a WHERE a=32;
31 XA END '789';
32 XA PREPARE '789';
33
34 CONNECT (con3,localhost,root,,);
35
36 --let $shutdown_timeout=0
37 --source include/restart_mysqld.inc
38 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
39 --disable_ps2_protocol
40 SELECT * FROM t;
41 --enable_ps2_protocol
42 COMMIT;
43
44 --source include/restart_mysqld.inc
45
46 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
47 --disable_ps2_protocol
48 SELECT * FROM t;
49 --enable_ps2_protocol
50 COMMIT;
51 --sorted_result
52 XA RECOVER;
53 XA ROLLBACK '123';
54 XA ROLLBACK '456';
55 XA COMMIT '789';
56 SELECT * FROM t;
57
58 DROP TABLE t;