403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.88.147
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_gtid_binary_log_as_relay_log.test
###############################################################################
# Bug#17812024  MTS IS NOT ABLE TO REPRODUCE BINLOGS AS RELAY LOGS
# Problem: When a binarylog is used as a relaylog (transfer binarylogs to
# Slave machine to avoid I/O thread reading delay), MTS is unable to operate
# on that kind of relaylog.

# Steps to Reproduce:
#  1) Prepare a binary log with some 3 sample GTIDs
#  2) Make that binary log as relay log
#  3) Set slave_parallel_workers to 1 and start worker thread
#  4) Make sure everything is replicated
###############################################################################

--source include/not_group_replication_plugin.inc
--source include/have_gtid.inc
--source include/have_binlog_format_statement.inc
--source include/master-slave.inc
# Initial setup
--let $MYSQLD_MASTER_DATADIR= `select @@datadir`
--connection slave
--let $MYSQLD_SLAVE_DATADIR= `select @@datadir`
--source include/stop_slave_sql.inc

# Step-1: Prepare a binary log with 3 sample GTIDs
--connection master
CREATE TABLE t1(i INT);
INSERT INTO t1 values (1);
INSERT INTO t1 values (2);
--source include/sync_slave_io_with_master.inc

# Step-2: Make that binary log as relay log
--remove_file $MYSQLD_SLAVE_DATADIR/slave-relay-bin.000001
--copy_file $MYSQLD_MASTER_DATADIR/master-bin.000001 $MYSQLD_SLAVE_DATADIR/slave-relay-bin.000001

# Step-3: Now start worker thread with that relay log(binary log as relay log)
# and see that worker thread does not have issues in completing it.
SET @save.slave_parallel_workers=@@global.slave_parallel_workers;
SET @@global.slave_parallel_workers=1;

SET @save.slave_transaction_retries=@@global.slave_transaction_retries;
SET @@global.slave_transaction_retries=0;
--source include/start_slave_sql.inc

# Step-4: Make sure everything is replicated
--connection master
--source include/sync_slave_sql_with_master.inc
--let diff_tables=master:t1,slave:t1
--source include/diff_tables.inc

# Cleanup
--connection master
DROP TABLE t1;
--connection slave
--source include/stop_slave_sql.inc
SET @@[email protected]_parallel_workers;
SET @@[email protected]_transaction_retries;
--source include/start_slave_sql.inc
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit