| 1 |
############################################################################### |
| 2 |
# |
| 3 |
# No configuration changes are allowed if the group contains a |
| 4 |
# member of a previous version that does not support it. |
| 5 |
# |
| 6 |
# Test: |
| 7 |
# 0. This test requires two servers |
| 8 |
# 1. Use debug point to decrease minor version |
| 9 |
# 2. Start server and bootstrap group |
| 10 |
# 3. Join server2 to group |
| 11 |
# 4. Executing switch to single primary mode will fail due to the version of |
| 12 |
# one of the members |
| 13 |
# 5. Cleanup |
| 14 |
# |
| 15 |
############################################################################### |
| 16 |
|
| 17 |
--source include/have_debug.inc |
| 18 |
--source include/have_group_replication_plugin.inc |
| 19 |
--let $rpl_skip_group_replication_start= 1 |
| 20 |
--source include/group_replication.inc |
| 21 |
|
| 22 |
--echo |
| 23 |
--echo # 1. Use debug point to decrease minor version |
| 24 |
|
| 25 |
set session sql_log_bin=0; |
| 26 |
call mtr.add_suppression("Error while executing a group configuration operation: The group has a member with a version that does not support group coordinated operations."); |
| 27 |
set session sql_log_bin=1; |
| 28 |
|
| 29 |
# Cause the member to broadcast and compare himself using a higher version |
| 30 |
SET @@GLOBAL.DEBUG= '+d,group_replication_legacy_election_version'; |
| 31 |
|
| 32 |
--echo |
| 33 |
--echo # 2. Start server and bootstrap group |
| 34 |
|
| 35 |
--source include/start_and_bootstrap_group_replication.inc |
| 36 |
|
| 37 |
--echo |
| 38 |
--echo # 3. Join server2 to group |
| 39 |
|
| 40 |
--let $rpl_connection_name= server2 |
| 41 |
--source include/rpl_connection.inc |
| 42 |
|
| 43 |
set session sql_log_bin=0; |
| 44 |
call mtr.add_suppression("The function 'group_replication_switch_to_single_primary_mode' failed. The group has a member with a version that does not support group coordinated operations."); |
| 45 |
# Server1 started with version 8.0.12, so server2(present version) is read compatible |
| 46 |
call mtr.add_suppression("Member version is read compatible with the group."); |
| 47 |
set session sql_log_bin=1; |
| 48 |
|
| 49 |
--let $server2_uuid= query_get_value(SELECT @@SERVER_UUID, @@SERVER_UUID, 1) |
| 50 |
|
| 51 |
--source include/start_group_replication.inc |
| 52 |
|
| 53 |
--echo |
| 54 |
--echo # 4. Executing switch to single primary mode will fail due to the version of |
| 55 |
--echo # one of the members |
| 56 |
|
| 57 |
--error ER_GRP_RPL_UDF_ERROR |
| 58 |
SELECT group_replication_switch_to_single_primary_mode(); |
| 59 |
|
| 60 |
--replace_result $server2_uuid MEMBER2_UUID |
| 61 |
--error ER_GRP_RPL_UDF_ERROR |
| 62 |
--eval SELECT group_replication_switch_to_single_primary_mode("$server2_uuid") |
| 63 |
|
| 64 |
--echo |
| 65 |
--echo # 5. Cleanup |
| 66 |
|
| 67 |
--let $rpl_connection_name= server1 |
| 68 |
--source include/rpl_connection.inc |
| 69 |
|
| 70 |
--source include/stop_group_replication.inc |
| 71 |
|
| 72 |
SET @@GLOBAL.DEBUG= '-d,group_replication_legacy_election_version'; |
| 73 |
SET @@GLOBAL.DEBUG= '+d,group_replication_compatibility_restore_version'; |
| 74 |
--source include/start_group_replication.inc |
| 75 |
SET @@GLOBAL.DEBUG= '-d,group_replication_compatibility_restore_version'; |
| 76 |
|
| 77 |
--source include/group_replication_end.inc |