1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
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 connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection server1]
############################################################
# 1. Stop SQL Threads on server2 so that all remote transactions
# are only queued on relay log. Execute some transactions on
# server1.
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
include/rpl_sync.inc
SET @@GLOBAL.DEBUG='+d,block_applier_updates';
INSERT INTO t1 VALUES (1);
################################################################
# 2. Wait until server2 receives and certifies the transaction.
############################################################
# 3. Make both members leave the group.
include/stop_group_replication.inc
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';
include/stop_group_replication.inc
SET DEBUG_SYNC= 'RESET';
############################################################
# 4. Start Group Replication only on server2. Validate that
# Member state is RECOVERING, despite being the only group
# member, since it is applying group applier relay log.
LOCK TABLE t1 WRITE;
SET @debug_save= @@GLOBAL.DEBUG;
SET GLOBAL debug= 'd,group_replication_skip_read_mode';
include/start_group_replication.inc
UNLOCK TABLES;
include/gr_wait_for_member_state.inc
SET @@GLOBAL.DEBUG= @debug_save;
############################################################
# 5. Assert that server1 and server2 have the same data and
# GTID_EXECUTED.
include/assert.inc ['There is a value 1 in table t1 on server1']
include/assert.inc ['There is a value 1 in table t1 on server2']
include/assert.inc ['server2 GTID_EXECUTED must contain the 2 transactions plus 3 view changes']
############################################################
# 6. Clean up.
include/start_group_replication.inc
DROP TABLE t1;
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;
include/group_replication_end.inc
|