summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_corruption.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_corruption.result')
-rw-r--r--mysql-test/suite/rpl/r/rpl_corruption.result49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_corruption.result b/mysql-test/suite/rpl/r/rpl_corruption.result
new file mode 100644
index 00000000000..b42b7161c30
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_corruption.result
@@ -0,0 +1,49 @@
+include/master-slave.inc
+[connection master]
+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');
+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 *
+CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c VARCHAR(100));
+include/stop_slave.inc
+# 2. Corruption in master binlog and SHOW BINLOG EVENTS
+SET GLOBAL debug="+d,corrupt_read_log_event_char";
+SHOW BINLOG EVENTS;
+ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
+SET GLOBAL debug="-d,corrupt_read_log_event_char";
+# 3. Master read a corrupted event from binlog and send the error to slave
+SET GLOBAL debug="+d,corrupt_read_log_event2";
+START SLAVE IO_THREAD;
+include/wait_for_slave_io_error.inc [errno=1236]
+SET GLOBAL debug="-d,corrupt_read_log_event2";
+# 4. Master read a corrupted event from binlog and send it to slave
+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]
+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]
+SET GLOBAL debug="-d,corrupt_queue_event";
+# 6. Slave. Corruption in relay log
+SET GLOBAL debug="+d,corrupt_read_log_event_char";
+START SLAVE;
+include/wait_for_slave_sql_error.inc [errno=1593]
+SET GLOBAL debug="-d,corrupt_read_log_event_char";
+SET GLOBAL debug= "";
+# 7. Seek diff for tables on master and slave
+include/start_slave.inc
+include/diff_tables.inc [master:test.t1, slave:test.t1]
+# 8. Clean up
+SET GLOBAL debug= "";
+SET GLOBAL master_verify_checksum = @old_master_verify_checksum;
+DROP TABLE t1;
+SET GLOBAL debug= "";
+include/rpl_end.inc