@@ -5,33 +5,30 @@ Note #### Storing MySQL user name or password information in the master info rep
5
5
[connection master]
6
6
[connection slave]
7
7
TRUNCATE TABLE performance_schema.events_transactions_current;
8
+ ---- Setup ----
8
9
[connection master]
9
10
CREATE TABLE t ( f INT) ENGINE=INNODB;
11
+ ---- XA PREPARE ----
10
12
XA START 'xatest';
11
13
INSERT INTO t VALUES (10);
12
14
XA END 'xatest';
13
15
XA PREPARE 'xatest';
14
- [connection slave]
15
- # Wait until SQL thread reaches desired master binlog position
16
- include/wait_for_slave_param.inc [Relay_Master_Log_File]
17
- include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
16
+ include/sync_slave_sql_with_master.inc
17
+ # Wait for XA_STATE to become PREPARED on slave
18
+ # Expecting one prepared transaction
18
19
XA RECOVER;
19
20
formatID gtrid_length bqual_length data
20
21
1 6 0 xatest
21
- ####################################################################
22
- # Asserting XA_STATE is PREPARED on Slave
23
- ####################################################################
24
- include/assert.inc [Verify that XA_STATE is set PREPARED.]
22
+ Waiting until gtid is MASTER_UUID:2
23
+ ---- XA COMMIT ----
25
24
[connection master]
26
25
XA COMMIT 'xatest';
27
26
include/sync_slave_sql_with_master.inc
27
+ # Wait for XA_STATE to become COMMITTED on slave
28
+ # Expecting no prepared transactions
28
29
XA RECOVER;
29
30
formatID gtrid_length bqual_length data
30
- ####################################################################
31
- # Asserting XA_STATE is COMMITTED on Slave
32
- ####################################################################
33
- include/assert.inc [Verify that XA_STATE is set COMMITTED.]
34
- include/assert.inc [Expected gtid is MASTER_UUID:3]
31
+ Waiting until gtid is MASTER_UUID:3
35
32
include/diff_tables.inc [master:t,slave:t]
36
33
[connection master]
37
34
DROP TABLE t;
@@ -52,33 +49,30 @@ SET GLOBAL slave_parallel_type='DATABASE';
52
49
include/start_slave.inc
53
50
[connection slave]
54
51
TRUNCATE TABLE performance_schema.events_transactions_current;
52
+ ---- Setup ----
55
53
[connection master]
56
54
CREATE TABLE t ( f INT) ENGINE=INNODB;
55
+ ---- XA PREPARE ----
57
56
XA START 'xatest';
58
57
INSERT INTO t VALUES (10);
59
58
XA END 'xatest';
60
59
XA PREPARE 'xatest';
61
- [connection slave]
62
- # Wait until SQL thread reaches desired master binlog position
63
- include/wait_for_slave_param.inc [Relay_Master_Log_File]
64
- include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
60
+ include/sync_slave_sql_with_master.inc
61
+ # Wait for XA_STATE to become PREPARED on slave
62
+ # Expecting one prepared transaction
65
63
XA RECOVER;
66
64
formatID gtrid_length bqual_length data
67
65
1 6 0 xatest
68
- ####################################################################
69
- # Asserting XA_STATE is PREPARED on Slave
70
- ####################################################################
71
- include/assert.inc [Verify that XA_STATE is set PREPARED.]
66
+ Waiting until gtid is MASTER_UUID:2
67
+ ---- XA COMMIT ----
72
68
[connection master]
73
69
XA COMMIT 'xatest';
74
70
include/sync_slave_sql_with_master.inc
71
+ # Wait for XA_STATE to become COMMITTED on slave
72
+ # Expecting no prepared transactions
75
73
XA RECOVER;
76
74
formatID gtrid_length bqual_length data
77
- ####################################################################
78
- # Asserting XA_STATE is COMMITTED on Slave
79
- ####################################################################
80
- include/assert.inc [Verify that XA_STATE is set COMMITTED.]
81
- include/assert.inc [Expected gtid is MASTER_UUID:3]
75
+ Waiting until gtid is MASTER_UUID:3
82
76
include/diff_tables.inc [master:t,slave:t]
83
77
[connection master]
84
78
DROP TABLE t;
@@ -96,33 +90,30 @@ SET GLOBAL slave_parallel_type='LOGICAL_CLOCK';
96
90
include/start_slave.inc
97
91
[connection slave]
98
92
TRUNCATE TABLE performance_schema.events_transactions_current;
93
+ ---- Setup ----
99
94
[connection master]
100
95
CREATE TABLE t ( f INT) ENGINE=INNODB;
96
+ ---- XA PREPARE ----
101
97
XA START 'xatest';
102
98
INSERT INTO t VALUES (10);
103
99
XA END 'xatest';
104
100
XA PREPARE 'xatest';
105
- [connection slave]
106
- # Wait until SQL thread reaches desired master binlog position
107
- include/wait_for_slave_param.inc [Relay_Master_Log_File]
108
- include/wait_for_slave_param.inc [Exec_Master_Log_Pos]
101
+ include/sync_slave_sql_with_master.inc
102
+ # Wait for XA_STATE to become PREPARED on slave
103
+ # Expecting one prepared transaction
109
104
XA RECOVER;
110
105
formatID gtrid_length bqual_length data
111
106
1 6 0 xatest
112
- ####################################################################
113
- # Asserting XA_STATE is PREPARED on Slave
114
- ####################################################################
115
- include/assert.inc [Verify that XA_STATE is set PREPARED.]
107
+ Waiting until gtid is MASTER_UUID:2
108
+ ---- XA COMMIT ----
116
109
[connection master]
117
110
XA COMMIT 'xatest';
118
111
include/sync_slave_sql_with_master.inc
112
+ # Wait for XA_STATE to become COMMITTED on slave
113
+ # Expecting no prepared transactions
119
114
XA RECOVER;
120
115
formatID gtrid_length bqual_length data
121
- ####################################################################
122
- # Asserting XA_STATE is COMMITTED on Slave
123
- ####################################################################
124
- include/assert.inc [Verify that XA_STATE is set COMMITTED.]
125
- include/assert.inc [Expected gtid is MASTER_UUID:3]
116
+ Waiting until gtid is MASTER_UUID:3
126
117
include/diff_tables.inc [master:t,slave:t]
127
118
[connection master]
128
119
DROP TABLE t;
0 commit comments