403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.163.192
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_row_corruption.test
--source include/not_gtid_enabled.inc
--source include/not_group_replication_plugin.inc
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc

# BUG#11753004: 44360: REPLICATION FAILED 

## assert that we get an error when checking the
## identifiers at the slave (instead of a crash or
## different table being updated)

--let $t1= t1_11753004
--let $t2= t2_11753004
--let $t2_ign= t2_11753004_ign

## test #1: assert that we get an error raised when multiple
##          tables in the same RBR statement are mapped with the
##          same identifier

--eval CREATE TABLE $t1 (c1 INT)
--eval CREATE TABLE $t2 (c1 INT)
--eval INSERT INTO $t1 VALUES (1)
--eval INSERT INTO $t2 VALUES (2)

--source include/sync_slave_sql_with_master.inc
call mtr.add_suppression(".*Found table map event mapping table id 0 which was already mapped but with different settings.*");
call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");

# stop the slave and inject corruption
--source include/stop_slave.inc
SET @save_debug= @@global.debug;
SET GLOBAL debug="+d,inject_tblmap_same_id_maps_diff_table";
--source include/start_slave.inc
--connection master
# both tables get mapped to 0 (in a way, simulating scenario 
# originated by BUG#56226)
--eval UPDATE $t1, $t2 SET $t1.c1=3, $t2.c1=4 WHERE $t1.c1=1 OR $t2.c1=2
--connection slave

# wait for error 1593 (ER_SLAVE_FATAL_ERROR)
--let $slave_sql_errno=1593 
--source include/wait_for_slave_sql_error.inc
--source include/stop_slave_io.inc

# clean up
SET GLOBAL debug="-d,inject_tblmap_same_id_maps_diff_table";
--source include/start_slave.inc
--connection master
--source include/rpl_reset.inc
--eval DROP TABLE $t1, $t2
--source include/sync_slave_sql_with_master.inc

## test #2: assert that ignored tables that may have been mapped
##          with the same identifier are skipped, thus no error
##          is raised.

--connection slave
--source include/stop_slave.inc
SET GLOBAL debug="+d,inject_tblmap_same_id_maps_diff_table";
--source include/start_slave.inc
--source include/rpl_reset.inc
--connection master
--eval CREATE TABLE $t1 (c1 INT)
--eval CREATE TABLE $t2_ign (c1 INT)
--eval INSERT INTO $t1 VALUES (1)
--eval INSERT INTO $t2_ign VALUES (2)
--eval UPDATE $t1, $t2_ign SET $t1.c1=3, $t2_ign.c1=4 WHERE $t1.c1=1 OR $t2_ign.c1=2

# must not raise error as second table is filtered
--source include/sync_slave_sql_with_master.inc


## test #3: check that BINLOG statements will also raise an
##          error if containing table map events mapping different
##          tables to same table identifier.

CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT);

INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);

# FD event
BINLOG '
SOgWTg8BAAAAbgAAAHIAAAAAAAQANS42LjMtbTUtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAABI6BZOEzgNAAgAEgAEBAQEEgAAVgAEGggAAAAICAgCAAAAAAVAYI8=
'/*!*/;

#110708 12:21:44 server id 1  end_log_pos 774   Table_map: `test`.`t1` mapped to number 66
# at 774
#110708 12:21:44 server id 1  end_log_pos 815   Table_map: `test`.`t2` mapped to number 67
# at 815
#110708 12:21:44 server id 1  end_log_pos 855   Update_rows: table id 66
# at 855
#110708 12:21:44 server id 1  end_log_pos 895   Update_rows: table id 67 flags: STMT_END_F
SET GLOBAL debug="+d,inject_tblmap_same_id_maps_diff_table";
--error ER_SLAVE_FATAL_ERROR
BINLOG '
SOgWThMBAAAAKQAAAAYDAAAAAEIAAAAAAAEABHRlc3QAAnQxAAEDAAE=
SOgWThMBAAAAKQAAAC8DAAAAAEMAAAAAAAEABHRlc3QAAnQyAAEDAAE=
SOgWThgBAAAAKAAAAFcDAAAAAEIAAAAAAAAAAf///gEAAAD+AwAAAA==
SOgWThgBAAAAKAAAAH8DAAAAAEMAAAAAAAEAAf///gEAAAD+BAAAAA==
'/*!*/;


# clean up
DROP TABLE t1,t2;
--connection slave
SET GLOBAL debug="-d,inject_tblmap_same_id_maps_diff_table";
--connection master
--eval DROP TABLE $t1
--eval DROP TABLE $t2_ign
--source include/sync_slave_sql_with_master.inc
SET GLOBAL debug= @save_debug;

--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit