← Back
Editing: gr_exit_state_action_on_start_gr_cmd.result
######################################################################### # 0) Setup group of 2 members (M1 and M2). ######################################################################### include/group_replication.inc Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection server1] [connection server2] SET SESSION sql_log_bin = 0; call mtr.add_suppression("Member version is incompatible with the group."); SET SESSION sql_log_bin = 1; ######################################################################### # 1) Simulate a higher version on M1. ######################################################################### [connection server1] SET @debug_saved= @@GLOBAL.DEBUG; SET @@GLOBAL.DEBUG= '+d,group_replication_compatibility_higher_major_version'; include/start_and_bootstrap_group_replication.inc ######################################################################### # 2) Try to join M2 to the group by issuing START GROUP_REPLICATION. ######################################################################### [connection server2] SET @super_read_only_saved = @@GLOBAL.super_read_only; SET @exit_state_action_saved = @@GLOBAL.group_replication_exit_state_action; START GROUP_REPLICATION; ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log. ######################################################################### # 3) M2 should be in super_read_only mode and in OFFLINE state (since it # failed to join the group). ######################################################################### include/rpl_gr_wait_for_number_of_members.inc include/gr_wait_for_member_state.inc include/assert.inc [super_read_only should be enabled] include/assert_grep.inc [GR reported expected incompatibility on member version] [connection server1] include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 4) Change the exit_state_action to ABORT_SERVER. Try to join M2 to the # group again. ######################################################################### [connection server2] SET @@GLOBAL.group_replication_exit_state_action = ABORT_SERVER; START GROUP_REPLICATION; ERROR HY000: The server is not configured properly to be an active member of the group. Please see more details on error log. ######################################################################### # 5) M2 should not abort(). ######################################################################### include/rpl_gr_wait_for_number_of_members.inc include/gr_wait_for_member_state.inc include/assert.inc [super_read_only should be enabled] include/assert_grep.inc [GR reported expected incompatibility on member version] [connection server1] include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 6) Remove the higher version from M1 and try to join M2 again. M2 # should be able to join. ######################################################################### SET @@GLOBAL.DEBUG = @debug_saved; include/stop_group_replication.inc include/start_and_bootstrap_group_replication.inc [connection server2] include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc [connection server1] include/rpl_gr_wait_for_number_of_members.inc ######################################################################### # 7) Cleanup. ######################################################################### [connection server2] SET @@GLOBAL.group_replication_exit_state_action = @exit_state_action_saved; include/group_replication_end.inc
Save File
Cancel