summaryrefslogtreecommitdiff
path: root/storage/rocksdb/mysql-test/rocksdb/r/xa.result
blob: 8cb6f39bbacccdf813dd63cde8202653b73c0351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# MDEV-742 fixes
#   MDEV-13155: XA recovery not supported for RocksDB
# as well.
call mtr.add_suppression("Found .* prepared XA transactions");
connect  con1,localhost,root,,test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT) ENGINE=RocksDB;
XA START 'xa1';
INSERT INTO t1 (a) VALUES (1),(2);
XA END 'xa1';
XA PREPARE 'xa1';
connect  con2,localhost,root,,test;
XA START 'xa2';
INSERT INTO t1 (a) VALUES (3);
INSERT INTO t1 (a) VALUES (4);
XA END 'xa2';
XA PREPARE 'xa2';
connect  con3,localhost,root,,test;
XA START 'xa3';
INSERT INTO t1 (a) VALUES (5);
INSERT INTO t1 (a) VALUES (6);
XA END 'xa3';
XA PREPARE 'xa3';
disconnect con3;
connection default;
SELECT * FROM t1;
a
Must be all three XA:s in
XA RECOVER;
formatID	gtrid_length	bqual_length	data
1	3	0	xa3
1	3	0	xa1
1	3	0	xa2
# restart
connect  con3,localhost,root,,test;
XA RECOVER;
formatID	gtrid_length	bqual_length	data
1	3	0	xa3
1	3	0	xa1
1	3	0	xa2
XA ROLLBACK 'xa1';
XA COMMIT 'xa2';
XA ROLLBACK 'xa3';
SELECT a FROM t1;
a
3
4
connect  con4,localhost,root,,test;
XA START 'xa4';
INSERT INTO t1 (a) VALUES (7);
INSERT INTO t1 (a) VALUES (8);
XA END 'xa4';
XA PREPARE 'xa4';
connection default;
# Now restart through graceful shutdown
# restart
connect  con5,localhost,root,,test;
Must have 'xa4'
XA RECOVER;
formatID	gtrid_length	bqual_length	data
1	3	0	xa4
XA COMMIT 'xa4';
SELECT a FROM t1;
a
3
4
7
8
DROP TABLE t1;