Commit 2fec2309 authored by unknown's avatar unknown

automerge

parents f6c5c36b fb92a2ff
...@@ -4,6 +4,8 @@ call mtr.add_suppression('Found invalid event in binary log'); ...@@ -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('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('event read from binlog did not pass crc check');
call mtr.add_suppression('Replication event checksum verification failed'); 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; SET @old_master_verify_checksum = @@master_verify_checksum;
# 1. Creating test table/data and set corruption position for testing # 1. Creating test table/data and set corruption position for testing
* insert/update/delete rows in table t1 * * insert/update/delete rows in table t1 *
...@@ -23,18 +25,18 @@ SET GLOBAL debug="-d,corrupt_read_log_event2"; ...@@ -23,18 +25,18 @@ SET GLOBAL debug="-d,corrupt_read_log_event2";
SET GLOBAL master_verify_checksum=0; SET GLOBAL master_verify_checksum=0;
SET GLOBAL debug="+d,corrupt_read_log_event2"; SET GLOBAL debug="+d,corrupt_read_log_event2";
START SLAVE IO_THREAD; 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="-d,corrupt_read_log_event2";
SET GLOBAL debug= ""; SET GLOBAL debug= "";
SET GLOBAL master_verify_checksum=1; SET GLOBAL master_verify_checksum=1;
# 5. Slave. Corruption in network # 5. Slave. Corruption in network
SET GLOBAL debug="+d,corrupt_queue_event"; SET GLOBAL debug="+d,corrupt_queue_event";
START SLAVE IO_THREAD; 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"; SET GLOBAL debug="-d,corrupt_queue_event";
# 6. Slave. Corruption in relay log # 6. Slave. Corruption in relay log
SET GLOBAL debug="+d,corrupt_read_log_event_char"; SET GLOBAL debug="+d,corrupt_read_log_event_char";
START SLAVE; START SLAVE SQL_THREAD;
include/wait_for_slave_sql_error.inc [errno=1593] include/wait_for_slave_sql_error.inc [errno=1593]
SET GLOBAL debug="-d,corrupt_read_log_event_char"; SET GLOBAL debug="-d,corrupt_read_log_event_char";
SET GLOBAL debug= ""; SET GLOBAL debug= "";
......
############################################################ ############################################################
# Author: Serge Kozlov <serge.kozlov@oracle.com>
# Date: 17 Oct 2010
# Purpose: WL#5064 Testing with corrupted events. # Purpose: WL#5064 Testing with corrupted events.
# The test emulates the corruption at the vary stages # The test emulates the corruption at the vary stages
# of replication: # of replication:
...@@ -9,6 +7,14 @@ ...@@ -9,6 +7,14 @@
# - in relay log # - 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/have_debug.inc
--source include/master-slave.inc --source include/master-slave.inc
...@@ -17,6 +23,8 @@ call mtr.add_suppression('Found invalid event in binary log'); ...@@ -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('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('event read from binlog did not pass crc check');
call mtr.add_suppression('Replication event checksum verification failed'); 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; SET @old_master_verify_checksum = @@master_verify_checksum;
...@@ -56,6 +64,7 @@ while ($i) { ...@@ -56,6 +64,7 @@ while ($i) {
} }
--enable_query_log --enable_query_log
# Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing # Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing
--echo # 2. Corruption in master binlog and SHOW BINLOG EVENTS --echo # 2. Corruption in master binlog and SHOW BINLOG EVENTS
SET GLOBAL debug="+d,corrupt_read_log_event_char"; SET GLOBAL debug="+d,corrupt_read_log_event_char";
...@@ -65,6 +74,7 @@ send_eval SHOW BINLOG EVENTS FROM $pos; ...@@ -65,6 +74,7 @@ send_eval SHOW BINLOG EVENTS FROM $pos;
--enable_query_log --enable_query_log
--error ER_ERROR_WHEN_EXECUTING_COMMAND --error ER_ERROR_WHEN_EXECUTING_COMMAND
reap; reap;
SET GLOBAL debug="-d,corrupt_read_log_event_char"; SET GLOBAL debug="-d,corrupt_read_log_event_char";
# Emulate corruption on master with crc checking on master # Emulate corruption on master with crc checking on master
...@@ -84,7 +94,7 @@ SET GLOBAL master_verify_checksum=0; ...@@ -84,7 +94,7 @@ SET GLOBAL master_verify_checksum=0;
SET GLOBAL debug="+d,corrupt_read_log_event2"; SET GLOBAL debug="+d,corrupt_read_log_event2";
--connection slave --connection slave
START SLAVE IO_THREAD; START SLAVE IO_THREAD;
let $slave_io_errno= 1595; let $slave_io_errno= 1595,1722;
--source include/wait_for_slave_io_error.inc --source include/wait_for_slave_io_error.inc
--connection master --connection master
SET GLOBAL debug="-d,corrupt_read_log_event2"; SET GLOBAL debug="-d,corrupt_read_log_event2";
...@@ -96,16 +106,19 @@ SET GLOBAL master_verify_checksum=1; ...@@ -96,16 +106,19 @@ SET GLOBAL master_verify_checksum=1;
--connection slave --connection slave
SET GLOBAL debug="+d,corrupt_queue_event"; SET GLOBAL debug="+d,corrupt_queue_event";
START SLAVE IO_THREAD; START SLAVE IO_THREAD;
let $slave_io_errno= 1595; let $slave_io_errno= 1595,1722;
--source include/wait_for_slave_io_error.inc --source include/wait_for_slave_io_error.inc
SET GLOBAL debug="-d,corrupt_queue_event"; SET GLOBAL debug="-d,corrupt_queue_event";
# Emulate corruption in relay log # Emulate corruption in relay log
--echo # 6. Slave. Corruption in relay log --echo # 6. Slave. Corruption in relay log
SET GLOBAL debug="+d,corrupt_read_log_event_char"; SET GLOBAL debug="+d,corrupt_read_log_event_char";
START SLAVE;
START SLAVE SQL_THREAD;
let $slave_sql_errno= 1593; let $slave_sql_errno= 1593;
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
SET GLOBAL debug="-d,corrupt_read_log_event_char"; SET GLOBAL debug="-d,corrupt_read_log_event_char";
SET GLOBAL debug= ""; SET GLOBAL debug= "";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment