403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.189.243
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_low_slave_net_time_out.test
###############################################################################
# Bug #19975697 SLAVE IO_THREAD MAY GET STUCK WHEN USING GTID AND LOW
# SLAVE_NET_TIMEOUTS
#
# Problem: Dump thread is not checking the necessity of heartbeat event
#  while it is scanning through the binary log files and skipping some groups
#  which were already present at Slave.
# Fix: Dump thread will check whether it is time to send an heartbeat event or
#  not before skipping an event. If so, it will send one to Slave.
###############################################################################

--source include/have_binlog_format_statement.inc
--source include/have_gtid.inc
--source include/have_debug_sync.inc
--source include/force_restart.inc
# Problem is reproduced only with gtid auto position protocol
--let $use_gtids=1
--let $rpl_skip_start_slave=1;
--source include/master-slave.inc

# set slave_net_timeout to 10 seconds and then start slave threads
--connection slave
CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=5;
SET @save_old_slave_net_timeout=@@global.slave_net_timeout;
SET @@global.slave_net_timeout=10;
--source include/start_slave.inc
# In order to reproduce the bug with a smaller test data,
# inject 2 seconds delay after an skipped event.
--connection master
SET @save_debug=@@global.debug;
SET GLOBAL DEBUG='+d,inject_2sec_sleep_when_skipping_an_event';

# Have some gtid transactions in binary log
# Below create and two insert statements would have created '6' sub events
#  # GTID 1
#  # CREATE
#  # GTID 2
#  # BEGIN
#  # INSERT
#  # COMMIT
#
CREATE TABLE t1(i INT) engine=innodb;
INSERT INTO t1 VALUES (1);

# Sync it with Slave
--source include/sync_slave_sql_with_master.inc

# Stop the Replication
--source include/stop_slave.inc

# Create another gtid transaction at Master
--connection master
DROP TABLE t1;

# Start slave thread
--connection slave
--source include/start_slave.inc

# Now Dump thread-I/O thread communitcation protocol will detect that
# it does not have recent gtid transaction(drop table) and Master
# should send that transaction to Slave. This detection will take
# 12 seconds because of the injected 2 seconds delay after every skipped
# event (Please see above) which is more than the slave_net_timeout.
# But now, after the fix, the server will check for necessity of sending an
# heartbeat event even while it is skipping the events, the below
# sync should not be timed out after the fix.
--connection master
--source include/sync_slave_sql_with_master.inc

# Cleanup
--connection master
SET GLOBAL DEBUG=@save_debug;
--connection slave
SET @@global.slave_net_timeout=@save_old_slave_net_timeout;
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit