############################################################ # 1. Start servers, on which server2 has applier stopped so # that all remote transactions are only queued on relay log. # Execute some transactions on server1. include/start_and_bootstrap_group_replication.inc set session sql_log_bin=0; call mtr.add_suppression("The member lost contact with a majority of the members in the group. Until the network is restored.*"); call mtr.add_suppression("The member resumed contact with a majority of the members in the group.*"); set session sql_log_bin=1; SET SESSION sql_log_bin = 0; call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Relay log read failure: Could not parse relay log event entry.*"); call mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group."); call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group."); call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); SET SESSION sql_log_bin = 1; SET @debug_saved= @@GLOBAL.DEBUG; include/start_group_replication.inc SET @@GLOBAL.DEBUG='+d,block_applier_updates'; include/rpl_gr_wait_for_number_of_members.inc CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); ##################################################################### # 2. Restart server2 and verify that certifier sequence number is set # from relay log certified transactions and view change transactions SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked"; SET @@GLOBAL.DEBUG='-d,block_applier_updates'; SET @@GLOBAL.DEBUG='+d,force_sql_thread_error'; SET DEBUG_SYNC = "now SIGNAL resume_applier_read"; include/gr_wait_for_member_state.inc SET @@GLOBAL.DEBUG='-d,force_sql_thread_error'; SET DEBUG_SYNC= 'RESET'; # restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS SET @@GLOBAL.DEBUG= '+d,certifier_assert_next_seqno_equal_5'; include/start_group_replication.inc SET @@GLOBAL.DEBUG= @debug_saved; ############################################################ # 3. Insert must fail with duplicate entry. INSERT INTO t1 VALUES (1); ERROR 23000: Duplicate entry '1' for key 't1.PRIMARY' INSERT INTO t1 VALUES (2); ############################################################ # 4. Kill server2 again and verify that certifier sequence # number is set from GTID_EXECUTED. # Kill and restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS [connection server2] [connection server1] include/gr_wait_for_member_state.inc include/rpl_gr_wait_for_number_of_members.inc [connection server2] SET @@GLOBAL.DEBUG= '+d,certifier_assert_next_seqno_equal_7'; include/start_group_replication.inc SET @@GLOBAL.DEBUG= @debug_saved; ############################################################ # 5. Shutdown. include/rpl_gr_wait_for_number_of_members.inc DROP TABLE t1; include/sync_slave_sql_with_master.inc include/stop_group_replication.inc RESET SLAVE ALL FOR CHANNEL "group_replication_applier"; Warnings: Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead RESET MASTER; include/stop_group_replication.inc RESET SLAVE ALL FOR CHANNEL "group_replication_applier"; Warnings: Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead RESET MASTER;