| 1 |
############################################################ |
| 2 |
# 1. Start servers, on which server2 has applier stopped so |
| 3 |
# that all remote transactions are only queued on relay log. |
| 4 |
# Execute some transactions on server1. |
| 5 |
include/start_and_bootstrap_group_replication.inc |
| 6 |
set session sql_log_bin=0; |
| 7 |
call mtr.add_suppression("The member lost contact with a majority of the members in the group. Until the network is restored.*"); |
| 8 |
call mtr.add_suppression("The member resumed contact with a majority of the members in the group.*"); |
| 9 |
set session sql_log_bin=1; |
| 10 |
SET SESSION sql_log_bin = 0; |
| 11 |
call mtr.add_suppression("Replica SQL for channel 'group_replication_applier': Relay log read failure: Could not parse relay log event entry.*"); |
| 12 |
call mtr.add_suppression("The applier thread execution was aborted. Unable to process more transactions, this member will now leave the group."); |
| 13 |
call mtr.add_suppression("Fatal error during execution on the Applier process of Group Replication. The server will now leave the group."); |
| 14 |
call mtr.add_suppression("The server was automatically set into read only mode after an error was detected."); |
| 15 |
call mtr.add_suppression("Skipping leave operation: concurrent attempt to leave the group is on-going."); |
| 16 |
SET SESSION sql_log_bin = 1; |
| 17 |
SET @debug_saved= @@GLOBAL.DEBUG; |
| 18 |
include/start_group_replication.inc |
| 19 |
SET @@GLOBAL.DEBUG='+d,block_applier_updates'; |
| 20 |
include/rpl_gr_wait_for_number_of_members.inc |
| 21 |
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; |
| 22 |
INSERT INTO t1 VALUES (1); |
| 23 |
|
| 24 |
##################################################################### |
| 25 |
# 2. Restart server2 and verify that certifier sequence number is set |
| 26 |
# from relay log certified transactions and view change transactions |
| 27 |
SET DEBUG_SYNC = "now WAIT_FOR applier_read_blocked"; |
| 28 |
SET @@GLOBAL.DEBUG='-d,block_applier_updates'; |
| 29 |
SET @@GLOBAL.DEBUG='+d,force_sql_thread_error'; |
| 30 |
SET DEBUG_SYNC = "now SIGNAL resume_applier_read"; |
| 31 |
include/gr_wait_for_member_state.inc |
| 32 |
SET @@GLOBAL.DEBUG='-d,force_sql_thread_error'; |
| 33 |
SET DEBUG_SYNC= 'RESET'; |
| 34 |
# restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS |
| 35 |
SET @@GLOBAL.DEBUG= '+d,certifier_assert_next_seqno_equal_5'; |
| 36 |
include/start_group_replication.inc |
| 37 |
SET @@GLOBAL.DEBUG= @debug_saved; |
| 38 |
############################################################ |
| 39 |
# 3. Insert must fail with duplicate entry. |
| 40 |
INSERT INTO t1 VALUES (1); |
| 41 |
ERROR 23000: Duplicate entry '1' for key 't1.PRIMARY' |
| 42 |
INSERT INTO t1 VALUES (2); |
| 43 |
|
| 44 |
############################################################ |
| 45 |
# 4. Kill server2 again and verify that certifier sequence |
| 46 |
# number is set from GTID_EXECUTED. |
| 47 |
# Kill and restart:--group_replication_local_address=GROUP_REPLICATION_LOCAL_ADDRESS --group_replication_group_seeds=GROUP_REPLICATION_GROUP_SEEDS |
| 48 |
[connection server2] |
| 49 |
[connection server1] |
| 50 |
include/gr_wait_for_member_state.inc |
| 51 |
include/rpl_gr_wait_for_number_of_members.inc |
| 52 |
[connection server2] |
| 53 |
SET @@GLOBAL.DEBUG= '+d,certifier_assert_next_seqno_equal_7'; |
| 54 |
include/start_group_replication.inc |
| 55 |
SET @@GLOBAL.DEBUG= @debug_saved; |
| 56 |
|
| 57 |
############################################################ |
| 58 |
# 5. Shutdown. |
| 59 |
include/rpl_gr_wait_for_number_of_members.inc |
| 60 |
DROP TABLE t1; |
| 61 |
include/sync_slave_sql_with_master.inc |
| 62 |
include/stop_group_replication.inc |
| 63 |
RESET SLAVE ALL FOR CHANNEL "group_replication_applier"; |
| 64 |
Warnings: |
| 65 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 66 |
RESET MASTER; |
| 67 |
include/stop_group_replication.inc |
| 68 |
RESET SLAVE ALL FOR CHANNEL "group_replication_applier"; |
| 69 |
Warnings: |
| 70 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 71 |
RESET MASTER; |