| 1 |
|
| 2 |
#### |
| 3 |
# 0) The test requires three servers. |
| 4 |
#### |
| 5 |
|
| 6 |
include/group_replication.inc [rpl_server_count=3] |
| 7 |
Warnings: |
| 8 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 9 |
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. |
| 10 |
[connection server1] |
| 11 |
SET SESSION sql_log_bin = 0; |
| 12 |
call mtr.add_suppression("A member is joining the group while a group configuration operation is occurring*"); |
| 13 |
SET SESSION sql_log_bin = 1; |
| 14 |
[connection server2] |
| 15 |
SET SESSION sql_log_bin = 0; |
| 16 |
call mtr.add_suppression("A member is joining the group while a group configuration operation is occurring*"); |
| 17 |
SET SESSION sql_log_bin = 1; |
| 18 |
[connection server3] |
| 19 |
SET SESSION sql_log_bin = 0; |
| 20 |
call mtr.add_suppression("A member is joining the group while a group configuration operation is occurring*"); |
| 21 |
SET SESSION sql_log_bin = 1; |
| 22 |
|
| 23 |
#### |
| 24 |
# 1) Switch to SPM on every member. For each member that was elected as |
| 25 |
# primary in SPM, the WRITE_CONSENSUS_LEADERS_MEMBER_ID_PREFERRED and |
| 26 |
# WRITE_CONSENSUS_LEADERS_MEMBER_ID_ACTIVE fields of the |
| 27 |
# performance_schema.replication_group_communication_information PFS |
| 28 |
# table should contain *only* the UUID of that member. |
| 29 |
#### |
| 30 |
|
| 31 |
[connection server1] |
| 32 |
SELECT group_replication_switch_to_single_primary_mode("MEMBER1_UUID"); |
| 33 |
group_replication_switch_to_single_primary_mode("MEMBER1_UUID") |
| 34 |
Mode switched to single-primary successfully. |
| 35 |
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 36 |
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 37 |
include/assert.inc [Single Leader must be enabled] |
| 38 |
[connection server2] |
| 39 |
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 40 |
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 41 |
include/assert.inc [Single Leader must be enabled] |
| 42 |
[connection server3] |
| 43 |
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 44 |
include/assert.inc [The first server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 45 |
include/assert.inc [Single Leader must be enabled] |
| 46 |
[connection server3] |
| 47 |
include/stop_group_replication.inc |
| 48 |
[connection server2] |
| 49 |
include/stop_group_replication.inc |
| 50 |
[connection server1] |
| 51 |
include/stop_group_replication.inc |
| 52 |
[connection server1] |
| 53 |
include/start_and_bootstrap_group_replication.inc |
| 54 |
[connection server2] |
| 55 |
include/start_group_replication.inc |
| 56 |
[connection server3] |
| 57 |
include/start_group_replication.inc |
| 58 |
[connection server2] |
| 59 |
SELECT group_replication_switch_to_multi_primary_mode(); |
| 60 |
group_replication_switch_to_multi_primary_mode() |
| 61 |
Mode switched to multi-primary successfully. |
| 62 |
SELECT group_replication_switch_to_single_primary_mode("MEMBER2_UUID"); |
| 63 |
group_replication_switch_to_single_primary_mode("MEMBER2_UUID") |
| 64 |
Mode switched to single-primary successfully. |
| 65 |
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 66 |
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 67 |
[connection server1] |
| 68 |
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 69 |
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 70 |
[connection server3] |
| 71 |
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 72 |
include/assert.inc [The second server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 73 |
[connection server3] |
| 74 |
SELECT group_replication_switch_to_multi_primary_mode(); |
| 75 |
group_replication_switch_to_multi_primary_mode() |
| 76 |
Mode switched to multi-primary successfully. |
| 77 |
SELECT group_replication_switch_to_single_primary_mode("MEMBER3_UUID"); |
| 78 |
group_replication_switch_to_single_primary_mode("MEMBER3_UUID") |
| 79 |
Mode switched to single-primary successfully. |
| 80 |
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 81 |
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 82 |
[connection server1] |
| 83 |
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 84 |
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 85 |
[connection server2] |
| 86 |
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 87 |
include/assert.inc [The third server's UUID should be the only UUID in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 88 |
|
| 89 |
#### |
| 90 |
# 2) Change the communication protocol to 8.0.21. Must restart the group. |
| 91 |
#### |
| 92 |
|
| 93 |
[connection server3] |
| 94 |
include/stop_group_replication.inc |
| 95 |
SET GLOBAL group_replication_paxos_single_leader = "OFF"; |
| 96 |
[connection server2] |
| 97 |
include/stop_group_replication.inc |
| 98 |
SET GLOBAL group_replication_paxos_single_leader = "OFF"; |
| 99 |
[connection server1] |
| 100 |
include/stop_group_replication.inc |
| 101 |
SET GLOBAL group_replication_paxos_single_leader = "OFF"; |
| 102 |
include/start_and_bootstrap_group_replication.inc |
| 103 |
[connection server2] |
| 104 |
include/start_group_replication.inc |
| 105 |
[connection server3] |
| 106 |
include/start_group_replication.inc |
| 107 |
[connection server2] |
| 108 |
SELECT group_replication_set_communication_protocol("8.0.21"); |
| 109 |
group_replication_set_communication_protocol("8.0.21") |
| 110 |
The operation group_replication_set_communication_protocol completed successfully |
| 111 |
|
| 112 |
#### |
| 113 |
# 3) Switch to SPM on every member. For each member that was elected as |
| 114 |
# primary in SPM the WRITE_CONSENSUS_LEADERS_MEMBER_ID_PREFERRED and |
| 115 |
# WRITE_CONSENSUS_LEADERS_MEMBER_ID_ACTIVE fields of the |
| 116 |
# performance_schema.replication_group_communication_information PFS |
| 117 |
# table should contain the UUIDs of *all* the members in the group. |
| 118 |
#### |
| 119 |
|
| 120 |
[connection server1] |
| 121 |
SELECT group_replication_switch_to_multi_primary_mode(); |
| 122 |
group_replication_switch_to_multi_primary_mode() |
| 123 |
Mode switched to multi-primary successfully. |
| 124 |
SELECT group_replication_switch_to_single_primary_mode("MEMBER1_UUID"); |
| 125 |
group_replication_switch_to_single_primary_mode("MEMBER1_UUID") |
| 126 |
Mode switched to single-primary successfully. |
| 127 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 128 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 129 |
include/assert.inc [Single Leader must be disabled] |
| 130 |
[connection server2] |
| 131 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 132 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 133 |
include/assert.inc [Single Leader must be disabled] |
| 134 |
[connection server3] |
| 135 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 136 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 137 |
include/assert.inc [Single Leader must be disabled] |
| 138 |
[connection server2] |
| 139 |
SELECT group_replication_switch_to_multi_primary_mode(); |
| 140 |
group_replication_switch_to_multi_primary_mode() |
| 141 |
Mode switched to multi-primary successfully. |
| 142 |
SELECT group_replication_switch_to_single_primary_mode("MEMBER2_UUID"); |
| 143 |
group_replication_switch_to_single_primary_mode("MEMBER2_UUID") |
| 144 |
Mode switched to single-primary successfully. |
| 145 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 146 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 147 |
[connection server1] |
| 148 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 149 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 150 |
[connection server3] |
| 151 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 152 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 153 |
[connection server3] |
| 154 |
SELECT group_replication_switch_to_multi_primary_mode(); |
| 155 |
group_replication_switch_to_multi_primary_mode() |
| 156 |
Mode switched to multi-primary successfully. |
| 157 |
SELECT group_replication_switch_to_single_primary_mode("MEMBER3_UUID"); |
| 158 |
group_replication_switch_to_single_primary_mode("MEMBER3_UUID") |
| 159 |
Mode switched to single-primary successfully. |
| 160 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 161 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 162 |
[connection server1] |
| 163 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 164 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 165 |
[connection server2] |
| 166 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_PREFERRED] |
| 167 |
include/assert.inc [All members should be in WRITE_CONSENSUS_LEADERS_ACTUAL] |
| 168 |
|
| 169 |
#### |
| 170 |
# 4) Cleanup. |
| 171 |
#### |
| 172 |
|
| 173 |
[connection server3] |
| 174 |
SET GLOBAL group_replication_paxos_single_leader = "ON"; |
| 175 |
[connection server2] |
| 176 |
SET GLOBAL group_replication_paxos_single_leader = "ON"; |
| 177 |
[connection server1] |
| 178 |
SET GLOBAL group_replication_paxos_single_leader = "ON"; |
| 179 |
[connection server1] |
| 180 |
include/stop_group_replication.inc |
| 181 |
include/group_replication_end.inc |