403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.70.147.23
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_transaction_split_across_relay_logs.test
###############################################################################
#BUG#16418100: ERROR "WHEN GTID_NEXT IS SET TO A GTID" ROW BASED REPLICATION
# Problem: When relay log info repository is configured to be persisted in a
# table and if a transaction that uses non-transactional engine is split across
# multiple relay logs, on relay log flush, partial transaction is
# committed. If the same situation occurs when gtid-mode=ON, it will cause that
# the same GTID will be used for more than one transaction and will cause
# ER_GTID_NEXT_TYPE_UNDEFINED_GROUP error.
#
# Steps to reproduce:
#   1) Generate two write_row events for non-transactional table (MyISAM)
#      (Default binlog_row_max_event_size= 8192). Insert two tuples with tuple
#      size as 8192 bytes each. This will generate two write_row events.
#   2) With Auto_position=0, stopping IO thread after receving one write_row
#      event will split the transaction across two relay logs.
#   3) If relaylog_info_repository=table, SQL thread should be able to apply
#      these type of relaylogs.
###############################################################################
# Need debug build to run this test
--source include/have_debug.inc
# Problem happens only in gtid mode
--source include/have_gtid.inc
# Run only in row format
--source include/have_binlog_format_row.inc
# Disable auto position protocol
--let use_gtids=0
--let $rpl_skip_start_slave= 1
--let $rpl_topology= 1->2->3
--source include/rpl_init.inc

--let $rpl_connection_name= server_1
--source include/rpl_connection.inc

# Non-transactional table (MyISAM engine)
CREATE TABLE t1 (i VARCHAR(8192)) ENGINE=MyISAM;

# Two tuples that will generate two write_row events.
INSERT INTO t1 VALUES(repeat('a',8192)), (repeat('b', 8192));

--let $rpl_connection_name= server_2
--source include/rpl_connection.inc
# Set simulation point to restart IO thread, so that the transaction
#  is split across the relay logs.
SET @saved_debug=@@GLOBAL.debug;
SET GLOBAL debug="d,stop_io_after_reading_write_rows_log_event";
START SLAVE IO_THREAD;
--source include/wait_for_slave_io_to_stop.inc
SET GLOBAL debug=@saved_debug;

# Make sure there are no replication issues
--disable_warnings
START SLAVE;
--enable_warnings

--let $rpl_connection_name= server_3
--source include/rpl_connection.inc
--disable_warnings
START SLAVE;
--enable_warnings

--let $rpl_connection_name= server_1
--source include/rpl_connection.inc
--source include/rpl_sync.inc

--let $diff_tables= server_1:t1, server_2:t1, server_3:t1
--source include/diff_tables.inc

# Assert that relay log info pos is stored on table
--let $rpl_connection_name= server_2
--source include/rpl_connection.inc
--let $sql_thread_pos=query_get_value('SHOW SLAVE STATUS', Exec_Master_Log_Pos, 1)
--let $sql_thread_file=query_get_value('SHOW SLAVE STATUS', Relay_Master_Log_File, 1)
--let $assert_cond= Master_log_pos = $sql_thread_pos FROM mysql.slave_relay_log_info
--let $assert_text= SQL thread position should be updated to after the split transaction
--source include/assert.inc
--let $assert_cond= Master_log_name = "$sql_thread_file" FROM mysql.slave_relay_log_info
--let $assert_text= SQL thread file should be updated to after the split transaction
--source include/assert.inc

# Cleanup
--let $rpl_connection_name= server_1
--source include/rpl_connection.inc
DROP TABLE t1;
--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit