################### Cleanup and server setup ################### # restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS server2 RESET MASTER; server1 RESET MASTER; server1 SET GLOBAL group_replication_group_name= "8a84f397-aaa4-18df-89ab-c70aa9823561"; ################### Test start values ################### include/assert.inc [The value of member_id should be empty before starting group replication] include/assert.inc [The value of view_id should be EMPTY before starting group replication] include/assert.inc [The value of Count_Transactions_in_queue should be 0 before starting group replication] include/assert.inc [The value of Count_Transactions_checked should be 0 before starting group replication] include/assert.inc [The value of Count_conflicts_detected should be 0 before starting group replication] include/assert.inc [The value of Count_Transactions_rows_validating should be 0 before starting group replication] include/assert.inc [The value of Transactions_Committed_all_members should be empty before starting group replication] include/assert.inc [The value of Last_conflict_free_transaction should be 0 before starting group replication] ######################################################## Values being updated after executing some transactions ######################################################## include/start_and_bootstrap_group_replication.inc include/assert.inc [The value of view_id should be a number followed by ONE at group replication start] CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (2); INSERT INTO t1 VALUES (3); INSERT INTO t1 values (4); SET @@GLOBAL.DEBUG='+d,block_applier_updates'; server2 SET SESSION sql_log_bin= 0; call mtr.add_suppression("The requested GTID 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1' was already used, the transaction will rollback"); SET SESSION sql_log_bin= 1; include/start_group_replication.inc # Apply some transactions on the first member so that the queue of the second member is not empty. server1 SET GTID_NEXT= 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:1'; INSERT INTO t1 VALUES (5); # Check for the transaction in the applier queue and then unblock the recovery. server2 [ The value of Count_Transactions_in_queue must be 2 when the applier has not processed the transaction queue ] server1 SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked"; SET @@GLOBAL.DEBUG='-d,block_applier_updates'; SET DEBUG_SYNC = "now SIGNAL resume_applier_read"; SET GTID_NEXT= 'AUTOMATIC'; server2 include/gr_wait_for_member_state.inc server1 include/assert.inc [The value of member_id should be equal to server UUID after starting group replication] include/assert.inc [The value of Count_Transactions_checked should be 5 after starting group replication] include/assert.inc [The value of Count_conflicts_detected should be 0 after starting group replication] include/assert.inc [The value of Count_Transactions_rows_validating should be 2 after starting group replication] include/assert.inc [The value of Transactions_committed_all_members should have server 1 GTIDs before server2 start] include/assert.inc [The value of Last_Conflict_free_transaction should be the gtid of the last applied transaction.] SET SESSION sql_log_bin= 0; include/gtid_utils.inc SET SESSION sql_log_bin= 1; [ The value of stable_set must be equal to the member GTID executed set ] include/assert.inc ['Transactions_committed_all_members must be equal to expected gtid value'] SET SESSION sql_log_bin= 0; include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; include/diff_tables.inc [server1:t1, server2:t1] DROP TABLE t1; SET DEBUG_SYNC= 'RESET'; #################################### The values being checked after stop #################################### include/stop_group_replication.inc include/stop_group_replication.inc