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 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
####
# 0) The test requires three servers.
####
include/group_replication.inc [rpl_server_count=3]
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection server1]
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("A member is joining the group while a group configuration operation is occurring*");
SET SESSION sql_log_bin = 1;
[connection server2]
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("A member is joining the group while a group configuration operation is occurring*");
SET SESSION sql_log_bin = 1;
[connection server3]
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("A member is joining the group while a group configuration operation is occurring*");
SET SESSION sql_log_bin = 1;
####
# 1) Switch to SPM on every member. For each member that was elected as
# primary in SPM, the WRITE_CONSENSUS_LEADERS_MEMBER_ID_PREFERRED and
# WRITE_CONSENSUS_LEADERS_MEMBER_ID_ACTIVE fields of the
# performance_schema.replication_group_communication_information PFS
# table should contain *only* the UUID of that member.
####
[connection server1]
SELECT group_replication_switch_to_single_primary_mode("MEMBER1_UUID");
group_replication_switch_to_single_primary_mode("MEMBER1_UUID")
Mode switched to single-primary successfully.
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
include/assert.inc [Single Leader must be enabled]
[connection server2]
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
include/assert.inc [Single Leader must be enabled]
[connection server3]
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
include/assert.inc [Single Leader must be enabled]
[connection server3]
include/stop_group_replication.inc
[connection server2]
include/stop_group_replication.inc
[connection server1]
include/stop_group_replication.inc
[connection server1]
include/start_and_bootstrap_group_replication.inc
[connection server2]
include/start_group_replication.inc
[connection server3]
include/start_group_replication.inc
[connection server2]
SELECT group_replication_switch_to_multi_primary_mode();
group_replication_switch_to_multi_primary_mode()
Mode switched to multi-primary successfully.
SELECT group_replication_switch_to_single_primary_mode("MEMBER2_UUID");
group_replication_switch_to_single_primary_mode("MEMBER2_UUID")
Mode switched to single-primary successfully.
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server1]
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server3]
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server3]
SELECT group_replication_switch_to_multi_primary_mode();
group_replication_switch_to_multi_primary_mode()
Mode switched to multi-primary successfully.
SELECT group_replication_switch_to_single_primary_mode("MEMBER3_UUID");
group_replication_switch_to_single_primary_mode("MEMBER3_UUID")
Mode switched to single-primary successfully.
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server1]
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server2]
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL]
####
# 2) Change the communication protocol to 8.0.21. Must restart the group.
####
[connection server3]
include/stop_group_replication.inc
SET GLOBAL group_replication_paxos_single_leader = "OFF";
[connection server2]
include/stop_group_replication.inc
SET GLOBAL group_replication_paxos_single_leader = "OFF";
[connection server1]
include/stop_group_replication.inc
SET GLOBAL group_replication_paxos_single_leader = "OFF";
include/start_and_bootstrap_group_replication.inc
[connection server2]
include/start_group_replication.inc
[connection server3]
include/start_group_replication.inc
[connection server2]
SELECT group_replication_set_communication_protocol("8.0.21");
group_replication_set_communication_protocol("8.0.21")
The operation group_replication_set_communication_protocol completed successfully
####
# 3) Switch to SPM on every member. For each member that was elected as
# primary in SPM the WRITE_CONSENSUS_LEADERS_MEMBER_ID_PREFERRED and
# WRITE_CONSENSUS_LEADERS_MEMBER_ID_ACTIVE fields of the
# performance_schema.replication_group_communication_information PFS
# table should contain the UUIDs of *all* the members in the group.
####
[connection server1]
SELECT group_replication_switch_to_multi_primary_mode();
group_replication_switch_to_multi_primary_mode()
Mode switched to multi-primary successfully.
SELECT group_replication_switch_to_single_primary_mode("MEMBER1_UUID");
group_replication_switch_to_single_primary_mode("MEMBER1_UUID")
Mode switched to single-primary successfully.
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
include/assert.inc [Single Leader must be disabled]
[connection server2]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
include/assert.inc [Single Leader must be disabled]
[connection server3]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
include/assert.inc [Single Leader must be disabled]
[connection server2]
SELECT group_replication_switch_to_multi_primary_mode();
group_replication_switch_to_multi_primary_mode()
Mode switched to multi-primary successfully.
SELECT group_replication_switch_to_single_primary_mode("MEMBER2_UUID");
group_replication_switch_to_single_primary_mode("MEMBER2_UUID")
Mode switched to single-primary successfully.
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server1]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server3]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server3]
SELECT group_replication_switch_to_multi_primary_mode();
group_replication_switch_to_multi_primary_mode()
Mode switched to multi-primary successfully.
SELECT group_replication_switch_to_single_primary_mode("MEMBER3_UUID");
group_replication_switch_to_single_primary_mode("MEMBER3_UUID")
Mode switched to single-primary successfully.
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server1]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
[connection server2]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED]
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL]
####
# 4) Cleanup.
####
[connection server3]
SET GLOBAL group_replication_paxos_single_leader = "ON";
[connection server2]
SET GLOBAL group_replication_paxos_single_leader = "ON";
[connection server1]
SET GLOBAL group_replication_paxos_single_leader = "ON";
[connection server1]
include/stop_group_replication.inc
include/group_replication_end.inc
|