83 lines
3.2 KiB
Plaintext
83 lines
3.2 KiB
Plaintext
################################################################################
|
|
# WL#6842 - GCS APPLIER MODULE
|
|
#
|
|
# This test checks the basic functionality of the Group Replication
|
|
# plugin: the initialization of it's applier module and error cases.
|
|
#
|
|
# Test:
|
|
# 0. The test requires one server.
|
|
# 1. Expect ER_GROUP_REPLICATION_APPLIER_INIT_ERROR on 'START G.R.' command
|
|
# due to double occurrence of a singleton applier handler through DEBUG.
|
|
# 2. Reset DEBUG point. Expect smooth 'START G.R.' command.
|
|
# 3. Set the stop GR timeout to minimum value 2. Through DEBUG point expect
|
|
# ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT on 'STOP G.R.' command.
|
|
# 4. Through DEBUG point expect ER_GROUP_REPLICATION_APPLIER_INIT_ERROR on
|
|
# 'START G.R.' command because GR is still running.
|
|
# 5. Signal DEBUG. Sleep for 5 seconds i.e. wait for 'STOP G.R.' to
|
|
# complete.
|
|
# 6. Reset DEBUG point. START and STOP G.R. should succeed now.
|
|
################################################################################
|
|
|
|
--source include/have_debug.inc
|
|
--let $group_replication_group_name= 2d249320-2e06-11e3-aa6e-0800200c9a66
|
|
--source include/have_group_replication_plugin.inc
|
|
|
|
--let $rpl_skip_group_replication_start= 1
|
|
--source include/group_replication.inc
|
|
|
|
set session sql_log_bin=0;
|
|
call mtr.add_suppression("A group replication applier handler, marked *.*");
|
|
call mtr.add_suppression("Cannot start the group replication applier as *.*");
|
|
call mtr.add_suppression("On shutdown there was a timeout on the group replication applier *.*");
|
|
call mtr.add_suppression("The member is leaving a group without being on one");
|
|
set session sql_log_bin=1;
|
|
|
|
--let $debug_save_timeout= `SELECT @@GLOBAL.group_replication_components_stop_timeout`
|
|
|
|
--eval SET GLOBAL group_replication_group_name= "$group_replication_group_name"
|
|
--source include/gr_set_bootstrap_group.inc
|
|
|
|
SET @debug_save= @@GLOBAL.DEBUG;
|
|
SET GLOBAL debug= 'd,double_unique_handler';
|
|
|
|
# This start command will error out due to the double occurrence
|
|
# of a singleton handler (applier initialization error).
|
|
--error ER_GROUP_REPLICATION_APPLIER_INIT_ERROR
|
|
START GROUP_REPLICATION;
|
|
|
|
SET @@GLOBAL.DEBUG= @debug_save;
|
|
|
|
#The initialization process should now go smoothly
|
|
--source include/start_group_replication.inc
|
|
|
|
#Set the timeout to the minimum value: 2
|
|
--eval SET GLOBAL group_replication_components_stop_timeout= 2
|
|
|
|
--let $assert_text= The value of stop_components_timeout should be 2
|
|
--let $assert_cond= [SELECT @@group_replication_components_stop_timeout] = 2
|
|
--source include/assert.inc
|
|
|
|
SET @@GLOBAL.DEBUG= 'd,applier_thd_timeout';
|
|
|
|
#The applier thread is stuck so the STOP command will timeout
|
|
--error ER_GROUP_REPLICATION_STOP_APPLIER_THREAD_TIMEOUT
|
|
STOP GROUP_REPLICATION;
|
|
|
|
#The start command will fail as the applier is still running
|
|
--error ER_GROUP_REPLICATION_APPLIER_INIT_ERROR
|
|
START GROUP_REPLICATION;
|
|
|
|
SET DEBUG_SYNC= "now SIGNAL signal.applier_continue";
|
|
SET @@GLOBAL.DEBUG= @debug_save;
|
|
|
|
#give it time to die
|
|
--sleep 5
|
|
|
|
--eval SET GLOBAL group_replication_components_stop_timeout= $debug_save_timeout
|
|
#start and stop commands should work properly
|
|
--source include/start_group_replication.inc
|
|
--source include/stop_group_replication.inc
|
|
|
|
SET @@GLOBAL.DEBUG= @debug_save;
|
|
--source include/group_replication_end.inc
|