From 3622983af30ca11fd205c52c92e3fb4df37d7966 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 May 2011 15:22:56 +0200 Subject: [PATCH] merge some fixes for rpl_corruption.test from MySQL 5.6. --- mysql-test/suite/rpl/r/rpl_corruption.result | 8 ++++--- mysql-test/suite/rpl/t/rpl_corruption.test | 23 +++++++++++++++----- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_corruption.result b/mysql-test/suite/rpl/r/rpl_corruption.result index b42b7161c30..a35bfbad92c 100644 --- a/mysql-test/suite/rpl/r/rpl_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_corruption.result @@ -4,6 +4,8 @@ call mtr.add_suppression('Found invalid event in binary log'); call mtr.add_suppression('Slave I/O: Relay log write failure: could not queue event from master'); call mtr.add_suppression('event read from binlog did not pass crc check'); call mtr.add_suppression('Replication event checksum verification failed'); +call mtr.add_suppression('Event crc check failed! Most likely there is event corruption'); +call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593'); SET @old_master_verify_checksum = @@master_verify_checksum; # 1. Creating test table/data and set corruption position for testing * insert/update/delete rows in table t1 * @@ -23,18 +25,18 @@ SET GLOBAL debug="-d,corrupt_read_log_event2"; SET GLOBAL master_verify_checksum=0; SET GLOBAL debug="+d,corrupt_read_log_event2"; START SLAVE IO_THREAD; -include/wait_for_slave_io_error.inc [errno=1595] +include/wait_for_slave_io_error.inc [errno=1595,1722] SET GLOBAL debug="-d,corrupt_read_log_event2"; SET GLOBAL debug= ""; SET GLOBAL master_verify_checksum=1; # 5. Slave. Corruption in network SET GLOBAL debug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; -include/wait_for_slave_io_error.inc [errno=1595] +include/wait_for_slave_io_error.inc [errno=1595,1722] SET GLOBAL debug="-d,corrupt_queue_event"; # 6. Slave. Corruption in relay log SET GLOBAL debug="+d,corrupt_read_log_event_char"; -START SLAVE; +START SLAVE SQL_THREAD; include/wait_for_slave_sql_error.inc [errno=1593] SET GLOBAL debug="-d,corrupt_read_log_event_char"; SET GLOBAL debug= ""; diff --git a/mysql-test/suite/rpl/t/rpl_corruption.test b/mysql-test/suite/rpl/t/rpl_corruption.test index aeeae199c02..3bb5c9f90e3 100644 --- a/mysql-test/suite/rpl/t/rpl_corruption.test +++ b/mysql-test/suite/rpl/t/rpl_corruption.test @@ -1,6 +1,4 @@ ############################################################ -# Author: Serge Kozlov -# Date: 17 Oct 2010 # Purpose: WL#5064 Testing with corrupted events. # The test emulates the corruption at the vary stages # of replication: @@ -9,6 +7,14 @@ # - in relay log ############################################################ +# +# The tests intensively utilize @@global.debug. Note, +# Bug#11765758 - 58754, +# @@global.debug is read by the slave threads through dbug-interface. +# Hence, before a client thread set @@global.debug we have to ensure that: +# (a) the slave threads are stopped, or (b) the slave threads are in +# sync and waiting. + --source include/have_debug.inc --source include/master-slave.inc @@ -17,6 +23,8 @@ call mtr.add_suppression('Found invalid event in binary log'); call mtr.add_suppression('Slave I/O: Relay log write failure: could not queue event from master'); call mtr.add_suppression('event read from binlog did not pass crc check'); call mtr.add_suppression('Replication event checksum verification failed'); +call mtr.add_suppression('Event crc check failed! Most likely there is event corruption'); +call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593'); SET @old_master_verify_checksum = @@master_verify_checksum; @@ -56,6 +64,7 @@ while ($i) { } --enable_query_log + # Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing --echo # 2. Corruption in master binlog and SHOW BINLOG EVENTS SET GLOBAL debug="+d,corrupt_read_log_event_char"; @@ -65,6 +74,7 @@ send_eval SHOW BINLOG EVENTS FROM $pos; --enable_query_log --error ER_ERROR_WHEN_EXECUTING_COMMAND reap; + SET GLOBAL debug="-d,corrupt_read_log_event_char"; # Emulate corruption on master with crc checking on master @@ -84,7 +94,7 @@ SET GLOBAL master_verify_checksum=0; SET GLOBAL debug="+d,corrupt_read_log_event2"; --connection slave START SLAVE IO_THREAD; -let $slave_io_errno= 1595; +let $slave_io_errno= 1595,1722; --source include/wait_for_slave_io_error.inc --connection master SET GLOBAL debug="-d,corrupt_read_log_event2"; @@ -96,16 +106,19 @@ SET GLOBAL master_verify_checksum=1; --connection slave SET GLOBAL debug="+d,corrupt_queue_event"; START SLAVE IO_THREAD; -let $slave_io_errno= 1595; +let $slave_io_errno= 1595,1722; --source include/wait_for_slave_io_error.inc SET GLOBAL debug="-d,corrupt_queue_event"; # Emulate corruption in relay log --echo # 6. Slave. Corruption in relay log + SET GLOBAL debug="+d,corrupt_read_log_event_char"; -START SLAVE; + +START SLAVE SQL_THREAD; let $slave_sql_errno= 1593; --source include/wait_for_slave_sql_error.inc + SET GLOBAL debug="-d,corrupt_read_log_event_char"; SET GLOBAL debug= "";