1# Test for @@wsrep_gtid_mode and @@wsrep_gtid_domain_id variables
2#
3# When @@wsrep_gtid_mode=ON, all DDL/DML commands and transactions that
4# are meant to be replicated over Galera cluster nodes are tagged with
5# galera gtid_domain_id (@@wsrep_gtid_domain_id), while others are tagged
6# with the local domain_id (@@gtid_domain_id).
7
8--source include/galera_cluster.inc
9--source include/have_innodb.inc
10
11--echo # On node_1
12--connection node_1
13# print initial GTIDs
14source include/print_gtid.inc;
15
16--echo # On node_2
17--connection node_2
18# print initial GTIDs
19source include/print_gtid.inc;
20
21--echo # On node_1
22--connection node_1
23CREATE TABLE t1(i INT) ENGINE=INNODB;
24CREATE TABLE t2(i INT) ENGINE=MEMORY;
25INSERT INTO t1 VALUES(1);
26SELECT * FROM t1;
27SELECT * FROM t2;
28source include/print_gtid.inc;
29
30--echo # On node_2
31--connection node_2
32SELECT * FROM t1;
33source include/print_gtid.inc;
34
35--echo # On node_1
36--connection node_1
37INSERT INTO t2 VALUES(1);
38SELECT * FROM t2;
39source include/print_gtid.inc;
40
41--echo # On node_2
42--connection node_2
43SELECT * FROM t2;
44source include/print_gtid.inc;
45
46--echo # On node_1
47--connection node_1
48# Cleanup
49DROP TABLE t1, t2;
50
51--echo #cleanup
52--connection node_1
53set global wsrep_on=OFF;
54reset master;
55set global wsrep_on=ON;
56
57--connection node_2
58set global wsrep_on=OFF;
59reset master;
60set global wsrep_on=ON;
61
62--source include/galera_end.inc
63--echo # End of test
64
65