summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/galera_3nodes/t/MDEV-29171.test
blob: bfb7abf9a8ba427a7f2b64c8156423a248aec5b2 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#
# MDEV-29171: changing the value of wsrep_gtid_domain_id
# with full cluster restart fails on some nodes
#

--source include/galera_cluster.inc
--source include/galera_sst_method.inc
--source include/force_restart.inc

#
# Initially wsrep gtid domain id is 100
#

--connection node_1
select @@wsrep_gtid_domain_id,@@wsrep_node_name;

--connection node_2
select @@wsrep_gtid_domain_id,@@wsrep_node_name;

--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
select @@wsrep_gtid_domain_id,@@wsrep_node_name;


#
# Shutdown all nodes
#
--connection node_3
--source include/shutdown_mysqld.inc

--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--connection node_2
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--source include/shutdown_mysqld.inc

--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--source include/shutdown_mysqld.inc

--sleep 5

#
# Bootstrap from node_1 and change wsrep_gtid_domain_id to 200
#
--connection node_1
--let $restart_parameters = --wsrep_new_cluster --wsrep_gtid_domain_id=200
--source include/start_mysqld.inc
show variables like 'wsrep_gtid_domain_id';

#
# Restart node_2, expect that wsrep_gtid_domain_id has changed to 200
#
--connection node_2
--let $restart_parameters =
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
--source include/start_mysqld.inc
show variables like 'wsrep_gtid_domain_id';


#
# Restart node_3, select node_2 as donor
# If bug is present, node_3 remains on domain id 100
#
--connection node_3
--let $restart_parameters = --wsrep_sst_donor="node2"
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.3.expect
--source include/start_mysqld.inc
# Expect domain id 200
show variables like 'wsrep_gtid_domain_id';


#
# Cleanup
#
--connection node_1
set global wsrep_gtid_domain_id=100;

--connection node_2
set global wsrep_gtid_domain_id=100;
CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node.");

--connection node_3
set global wsrep_gtid_domain_id=100;
CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node.");