| 1 |
################################################################################ |
| 2 |
# Validate that when Group Replication number of members reach 9 |
| 3 |
# members no more members are allowed to join. |
| 4 |
# |
| 5 |
# Test: |
| 6 |
# 1. Bootstrap start a group on server 1. |
| 7 |
# 2. Fake that group size will be 10 when server 2 joins. Server 2 will be |
| 8 |
# unable to join. |
| 9 |
# 3. Group will remain with only server 1 (and 8 more fake members). |
| 10 |
# 4. Clean up. |
| 11 |
################################################################################ |
| 12 |
--source include/have_debug.inc |
| 13 |
--source include/have_group_replication_plugin.inc |
| 14 |
--let $rpl_skip_group_replication_start= 1 |
| 15 |
--source include/group_replication.inc |
| 16 |
|
| 17 |
|
| 18 |
--echo |
| 19 |
--echo ############################################################ |
| 20 |
--echo # 1. Bootstrap a group. |
| 21 |
--let $rpl_connection_name= server1 |
| 22 |
--source include/rpl_connection.inc |
| 23 |
--source include/start_and_bootstrap_group_replication.inc |
| 24 |
|
| 25 |
|
| 26 |
--echo |
| 27 |
--echo ############################################################ |
| 28 |
--echo # 2. Fake that group size will be 10 when server 2 joins. |
| 29 |
--echo # Server 2 will be unable to join. |
| 30 |
--let $rpl_connection_name= server2 |
| 31 |
--source include/rpl_connection.inc |
| 32 |
SET SESSION sql_log_bin= 0; |
| 33 |
call mtr.add_suppression("The START GROUP_REPLICATION command failed since the group already has 9 members"); |
| 34 |
SET SESSION sql_log_bin= 1; |
| 35 |
--disable_query_log |
| 36 |
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name" |
| 37 |
--enable_query_log |
| 38 |
|
| 39 |
SET @debug_save= @@GLOBAL.DEBUG; |
| 40 |
SET @@GLOBAL.DEBUG='+d,group_replication_set_number_of_members_on_view_changed_to_10'; |
| 41 |
--error ER_GROUP_REPLICATION_MAX_GROUP_SIZE |
| 42 |
START GROUP_REPLICATION; |
| 43 |
|
| 44 |
--let $group_replication_member_state= OFFLINE |
| 45 |
--source include/gr_wait_for_member_state.inc |
| 46 |
|
| 47 |
SET @@GLOBAL.DEBUG= @debug_save; |
| 48 |
|
| 49 |
|
| 50 |
--echo |
| 51 |
--echo ############################################################ |
| 52 |
--echo # 3. Group will remain with only server 1 (and 8 more fake |
| 53 |
--echo # members). |
| 54 |
--let $rpl_connection_name= server1 |
| 55 |
--source include/rpl_connection.inc |
| 56 |
--let $group_replication_number_of_members= 1 |
| 57 |
--source include/gr_wait_for_number_of_members.inc |
| 58 |
|
| 59 |
|
| 60 |
--echo |
| 61 |
--echo ############################################################ |
| 62 |
--echo # 4. Cleanup. |
| 63 |
--source include/group_replication_end.inc |