403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.170.44
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_stm_until_pos_middle_gtid.test
# ==== Purpose ====
#
# This test verifies correctness and effectiveness of the
# until-stopping when the position used is inside the Gtid_log_event
# of a group (transaction) in the relaylog.
#
# ==== Method ====
#
# The test will create a two events transaction (GTID + QUERY), and will start
# the SQL thread using the UNTIL MASTER_LOG_FILE/POS clause, pointing to the
# first byte of the created transaction (inside of the Gtid_log_event).
#
# The test expects that, after issuing the START SLAVE SQL_THREAD with the
# UNTIL clause, the SQL thread will apply the created transaction (both
# GTID and QUERY events) even though pointing to stop after the GTID.
# The test also expects that the SQL thread will update its position
# before stopping.
#
# The test will then verify SQL thread's binlog file, position, and
# finally will wait for the SQL thread to stop.
#
# When the SQL thread stops, the test verifies if the second event of
# the transaction (QUERY) was successfully applied.
#
# ==== Related bugs ====
#
# Bug #18306199 START SLAVE UNTIL MASTER_LOG_POS=MIDDLE-OF-GTID-EVENT
#               STOPS BEFORE TRANSACTION

--source include/have_binlog_format_statement.inc
--source include/have_gtid.inc
--source include/master-slave.inc

# Stop the SQL thread
--source include/rpl_connection_slave.inc
--source include/stop_slave_sql.inc

--echo # Saving master position to use on UNTIL clause of START SLAVE
--source include/rpl_connection_master.inc
--let $master_file= query_get_value(SHOW MASTER STATUS, File, 1)
--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
--inc $master_pos

# Create a table in the master (one event without GTIDS, two with GTIDS)
CREATE TABLE t1 (a INT) ENGINE=InnoDB;

# Insert some data
BEGIN;
INSERT INTO t1 VALUES (1);
COMMIT;

# Sync the IO thread with the master
--source include/sync_slave_io_with_master.inc

# Check if SQL thread stops correctly
# after executing the next event of the master binlog
# based on master binlog file and position

--echo # Start SQL thread until it executed the CREATE TABLE
--replace_result $master_file MASTER_FILE $master_pos MASTER_POS
# Disable warnings to avoid logging "UNTIL condtion is not supported ..." on MTS
--disable_warnings
eval START SLAVE SQL_THREAD UNTIL MASTER_LOG_FILE = "$master_file", MASTER_LOG_POS = $master_pos;
--enable_warnings

--echo # Wait until SQL thread reaches last master binlog file
--let $slave_param= Relay_Master_Log_File
--let $slave_param_value= $master_file
--let $slave_param_comparison= =
--source include/wait_for_slave_param.inc

--echo # Wait until SQL thread reaches desired master binlog position
--let $slave_param= Exec_Master_Log_Pos
--let $slave_param_value= $master_pos
--let $slave_param_comparison= >=
--source include/wait_for_slave_param.inc

--echo # If the desired position was reached, SQL thread should stop.
--source include/wait_for_slave_sql_to_stop.inc

--let $assert_cond= "[SHOW TABLES LIKE "t1"]" = "t1"
--let $assert_text= t1 should be replicated
--source include/assert.inc

# Cleanup
--source include/start_slave_sql.inc
--source include/rpl_connection_master.inc
DROP TABLE t1;

# End of tests
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit