403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.69.166.65
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_sql_thread_error.test
###############################################################################
#
# Bug#21697821 RELAYLOG.LOG_LOCK IS NOT RELEASED IN
#  AN ERROR CASE (IN NEXT_EVENT())
#
# Problem: In an error case, relaylog.log_lock acquired by SQL thread is not
#          released which is causing all threads, which are looking to acquire
#          the lock,  to hang forever.
#
# Steps to reproduce:
#
#  1) Inject sql thread error using a simulation point and start SQL thread.
#
#  2) Wait till SQL thread goes down (before fix, it wont release the log_lock).
#
#  3) start SQL thread (before fix, it will wait for log_lock)
#
#  4) After the fix, make sure the replication is working fine.
#
###############################################################################

--source include/have_debug.inc
--source include/have_binlog_format_statement.inc
--let rpl_skip_start_slave=1
--source include/master-slave.inc

# Step 1) Set a simulation on Slave SQL thread so that it enters
# into faulty code (before fix) path.
--source include/rpl_connection_slave.inc
CALL mtr.add_suppression("Relay log read failure");
SET @save_debug=@@GLOBAL.debug;
SET GLOBAL debug="d,force_sql_thread_error";

# Start SQL thread
START SLAVE SQL_THREAD;

# Step 2) Wait for SQL thread to go down with the injected error.
# Before fix, SQL thread would not have released
# relay_log.log_lock.
--let $slave_sql_errno= convert_error(ER_SLAVE_RELAY_LOG_READ_FAILURE)
--source include/wait_for_slave_sql_to_stop.inc

# Step 3) Before fix, when SQL thread is trying to acquire
# relay_log.log_lock which was not released will hang
# forever.
SET GLOBAL debug=@save_debug;
--source include/start_slave.inc

# Step 4) Execute dummy statements on master and see that it
#         replication is working fine.
--source include/rpl_connection_master.inc
CREATE TABLE t1(i INT);
DROP TABLE t1;
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit