403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.108.79
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/mysql-test/suite/group_replication/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/suite/group_replication/t/gr_applier_initialization.test
################################################################################
# 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 ../inc/have_group_replication_plugin.inc

--let $rpl_skip_group_replication_start= 1
--source ../inc/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 ../inc/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 ../inc/group_replication_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit