403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.189.141
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/src/mysql-test/suite/rpl/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/rpl/t/rpl_init_slave_errors.test
######################################################################
# Some errors that cause the slave SQL thread to stop are not shown in 
# the Slave_SQL_Error column of "SHOW SLAVE STATUS". Instead, the error 
# is only in the server's error log.
#
# Two failures and their respective reporting are verified:
#             
# 1 - Failures during slave thread initialization
# 2 - Failures while processing queries passed through the init_slave
# option.
#
# In order to check the first type of failure, we inject a fault in the 
# SQL/IO Threads through SET GLOBAL debug.
#
# To check the second type, we set @@global.init_slave to an invalid 
# command thus preventing the initialization of the SQL Thread.
#
# Obs:
# 1 - Note that testing failures while initializing the relay log position 
# is hard as the same function is called before the code reaches the point 
# that we want to test.
#
# 2 - This test does not target failures that are reported while applying 
# events such as duplicate keys, errors while reading the relay-log.bin*, 
# etc. Such errors are already checked on other tests.
######################################################################

######################################################################
#                    Configuring the Environment
######################################################################
source include/have_debug.inc;
source include/master-slave.inc;
source include/have_log_bin.inc;

connection slave;

--disable_warnings
stop slave;
--enable_warnings
reset slave;

######################################################################
#           Injecting faults in the threads' initialization
######################################################################
connection slave;

# Set debug flags on slave to force errors to occur
SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";

start slave;

#
# slave is going to stop because of emulated failures
# but there won't be any crashes nor asserts hit.
#
--let $slave_sql_errno= convert_error(ER_SLAVE_FATAL_ERROR)
--let $show_slave_sql_error= 1
--source include/wait_for_slave_sql_error.inc

SET SESSION sql_log_bin= 0;
call mtr.add_suppression("Failed during slave.* thread initialization");
SET SESSION sql_log_bin= 1;

# Bug#11765758 - 58754
# above tests part logics make sure the IO thread is down to allow 
# safe updating to @@global.debug
--let $slave_io_errno= convert_error(ER_SLAVE_FATAL_ERROR)
--let $show_slave_io_error= 1
--source include/wait_for_slave_io_error.inc

SET GLOBAL debug= "";

######################################################################
#             Injecting faults in the init_slave option
######################################################################
connection slave;

reset slave;

SET GLOBAL init_slave= "garbage";

start slave;
# 1064 = ER_PARSE_ERROR
--let $slave_sql_errno= 1064
--let $show_slave_sql_error= 1
--source include/wait_for_slave_sql_error.inc

######################################################################
#                             Clean up
######################################################################
SET GLOBAL init_slave= "";

# Clean up Last_SQL_Error
--source include/stop_slave_io.inc
RESET SLAVE;
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit