Debian Codegraph @

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

raw
1 include/group_replication.inc [rpl_server_count=3]
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 [connection server3]
7 SET sql_log_bin = 0;
8 call mtr.add_suppression("This member is configured with a group_replication_paxos_single_leader option value of*");
9 SET sql_log_bin = 1;
10
11 ####
12 # 0) Verify that the default value of
13 # group_replication_paxos_single_leader is true
14 ####
15
16 [connection server1]
17 SET @@GLOBAL.group_replication_paxos_single_leader = default;
18 include/assert.inc [The default of group_replication_paxos_single_leader should be 0]
19
20 ####
21 # 1) The test requires three servers.
22 ####
23
24 SET @@GLOBAL.group_replication_paxos_single_leader = 1;
25 include/start_and_bootstrap_group_replication.inc
26 [connection server2]
27 include/start_group_replication.inc
28 [connection server3]
29 include/start_group_replication.inc
30
31 ####
32 # 2) Verify that the UUID present in
33 # WRITE_CONSENSUS_LEADERS_MEMBER_ID_PREFERRED and in
34 # WRITE_CONSENSUS_LEADERS_MEMBER_ID_ACTIVE is the UUID of the primary
35 ####
36
37 [connection server1]
38 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
39 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
40 include/assert.inc [Single Leader must be enabled]
41 [connection server2]
42 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
43 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
44 include/assert.inc [Single Leader must be enabled]
45 [connection server3]
46 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
47 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
48 include/assert.inc [Single Leader must be enabled]
49
50 ####
51 # 3) Change the value of group_replication_paxos_single_leader to false
52 ####
53
54 [connection server1]
55 SET GLOBAL group_replication_paxos_single_leader = 0;
56
57 ####
58 # 4) Verify that the value of the new sysvar is false
59 ####
60
61 include/assert.inc [The value of group_replication_paxos_single_leader should be 0]
62
63 ####
64 # 5) The group should still be using single-leader
65 ####
66
67 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
68 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
69 include/assert.inc [Single Leader must be enabled]
70 [connection server2]
71 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
72 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
73 include/assert.inc [Single Leader must be enabled]
74 [connection server3]
75 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
76 include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
77 include/assert.inc [Single Leader must be enabled]
78
79 ####
80 # 6) Reboot the plugin (add only 2 of the members)
81 ####
82
83 [connection server3]
84 include/stop_group_replication.inc
85 [connection server2]
86 include/stop_group_replication.inc
87 [connection server1]
88 include/stop_group_replication.inc
89 include/start_and_bootstrap_group_replication.inc
90 [connection server2]
91 SET GLOBAL group_replication_paxos_single_leader = 0;
92 include/start_group_replication.inc
93
94 ####
95 # 7) Verify that the UUIDs contained in
96 # WRITE_CONSENSUS_LEADERS_MEMBER_ID_PREFERRED and in
97 # WRITE_CONSENSUS_LEADERS_MEMBER_ID_ACTIVE contain all the UUIDs of all
98 # the members in the group
99 ####
100
101 [connection server1]
102 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
103 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
104 include/assert.inc [Single Leader must be disabled]
105 [connection server2]
106 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
107 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
108 include/assert.inc [Single Leader must be disabled]
109
110 ####
111 # 8) Change the sysvar value on the third member to true
112 ####
113
114 [connection server3]
115 SET GLOBAL group_replication_paxos_single_leader = 1;
116
117 ####
118 # 9) Try to add the third member
119 ####
120
121 START GROUP_REPLICATION;
122 ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log.
123 [connection server1]
124 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
125 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
126 include/assert.inc [Member 3 should not have been added to the group]
127 [connection server2]
128 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
129 include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
130 include/assert.inc [Member 3 should not have been added to the group]
131
132 ####
133 # 10) Cleanup.
134 ####
135
136 [connection server1]
137 SET GLOBAL group_replication_paxos_single_leader = 1;
138 [connection server2]
139 SET GLOBAL group_replication_paxos_single_leader = 1;
140 [connection server3]
141 SET GLOBAL group_replication_paxos_single_leader = 1;
142 [connection server1]
143 include/group_replication_end.inc