403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.70.143.132
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_sbm_fake_rotate_event.test
###############################################################################
# Bug#23532304 SECONDS_BEHIND_MASTER REPORTS IO_THREAD TIME WHEN USING MTS &
#              ROTATING RELAY-LOG
# Problem: The value of 'Seconds_Behind_Master' (SBM) reports distorted number
#         when rotating a relay-log.
#
# Steps to reproduce:
#  1) Fake that I/O thread is started 3 minutes ago using a debug point.
#  2) Flush the logs on the master which would have generated fake rotate
#  event
#  3) While the fake rotate event is getting executing, calculate the SBM
#  4) Compare the executed SBM that it is not greater than or equal to I/O
#     thread's active time.
#  5) Clean the debug point.
#
###############################################################################
--source include/have_debug_sync.inc
--let rpl_skip_start_slave=1
--source include/master-slave.inc

# Step-1 Set sync debug point to calculate sbm exactly after fake
#  rotate log event.
--source include/rpl_connection_slave.inc
SET @save_global_debug=@@GLOBAL.DEBUG;
# This debug point internally fake that IO thread is started 3 minutes ago.
SET @@GLOBAL.DEBUG= '+d,dbug.calculate_sbm_after_fake_rotate_log_event';
# Start slave threads after enabling the debug point.
--disable_warnings
--source include/start_slave.inc
--enable_warnings

# Step-2 Flush logs on master which will generate a fake rotate event.
--source include/rpl_connection_master.inc
FLUSH LOGS;

# Step-3 There will be two fake rotate events (first one while the initial setup
# in master-slave.inc and second one due to FLUSH LOGS execution on master).
# The following will test SBM calculation while both events are getting
# executed.
--source include/rpl_connection_slave.inc
--let $iter=0
while ($iter < 2)
{
# Step-4: Calcualte SBM while fake rotate log event is getting executed.
# It should be approximately zero (some times little more than zero
# if this test is run on a slow pb2 machine). Comparing with the
# I/O thread age that it should be atleast less
# than the age of I/O thread.
SET DEBUG_SYNC="now wait_for signal.reached";
let $sbm= query_get_value("SHOW SLAVE STATUS", Seconds_Behind_Master, 1);
--let $assert_text= Seconds Behind Master should be less than IO_THREAD's time.
--let $assert_cond= $sbm < 180
--source include/assert.inc
SET DEBUG_SYNC="now signal signal.done_sbm_calculation";
--inc $iter
}

# Step-5: Cleanup
SET @@GLOBAL.DEBUG=@save_global_debug;

--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit