Debian Codegraph @

mysql-test/suite/group_replication/r/gr_consistent_reads_after_xa.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6
7 ############################################################
8 # 1. Create a table on the group.
9 [connection server1]
10 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
11 include/rpl_sync.inc
12
13 ############################################################
14 # 2. Execute a XA transaction that does commit.
15 [connection server1]
16 XA START 'trx1';
17 INSERT INTO t1 VALUES (1);
18 XA END 'trx1';
19 XA PREPARE 'trx1';
20 XA COMMIT 'trx1';
21 include/rpl_sync.inc
22
23 # Check that GTID_EXECUTED on server 1 contains all
24 # transactions.
25 # Also check that data is on tables.
26 [connection server1]
27 include/assert.inc [GTID_EXECUTED must contain all committed GTIDs]
28 include/assert.inc ['There is a value 1 in table t1']
29
30 # Check that GTID_EXECUTED on server 2 contains all
31 # transactions.
32 # Also check that data is on tables.
33 [connection server2]
34 include/assert.inc [GTID_EXECUTED must contain all committed GTIDs]
35 include/assert.inc ['There is a value 1 in table t1']
36
37 ############################################################
38 # 3. Execute a XA transaction that does rollback.
39 [connection server1]
40 XA START 'trx2';
41 INSERT INTO t1 VALUES (2);
42 XA END 'trx2';
43 XA PREPARE 'trx2';
44 XA ROLLBACK 'trx2';
45 include/rpl_sync.inc
46
47 # Check that GTID_EXECUTED on server 1 contains all
48 # transactions.
49 # Also check that data is on tables.
50 [connection server1]
51 include/assert.inc [GTID_EXECUTED must contain all committed GTIDs]
52 include/assert.inc ['There is a value 1 in table t1']
53 include/assert.inc ['There is no value 2 in table t1']
54
55 # Check that GTID_EXECUTED on server 2 contains all
56 # transactions.
57 # Also check that data is on tables.
58 [connection server2]
59 include/assert.inc [GTID_EXECUTED must contain all committed GTIDs]
60 include/assert.inc ['There is a value 1 in table t1']
61 include/assert.inc ['There is no value 2 in table t1']
62
63 ############################################################
64 # 4. Clean up.
65 [connection server1]
66 DROP TABLE t1;
67 include/group_replication_end.inc