mirror of
https://github.com/MariaDB/server.git
synced 2025-06-12 01:53:02 +03:00
Problem: ======== CURRENT_TEST: binlog_encryption.rpl_corruption mysqltest: In included file "./include/wait_for_slave_io_error.inc": ... At line 72: Slave stopped with wrong error code **** Slave stopped with wrong error code: 1743 (expected 1595,1913) **** Analysis: ======== The test emulates the corruption at the various stages of replication for example in binlog file, in network and in relay log etc. It verifies that all corruption cases are handled through appropriate error messages. The test cases which emulate network failure expect following errors. --ER_SLAVE_RELAY_LOG_WRITE_FAILURE (1595) --ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE (1743) Ideally test should expect error codes as 1595 and 1743. But the test actually waits on incorrect error code 1595,1913 Fix: === Added appropriate error code for 'ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE'. Replaced 1913 with 1743.
52 lines
2.4 KiB
Plaintext
52 lines
2.4 KiB
Plaintext
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');
|
|
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.* 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 *
|
|
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_dbug="+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_dbug="-d,corrupt_read_log_event_char";
|
|
# 3. Master read a corrupted event from binlog and send the error to slave
|
|
SET GLOBAL debug_dbug="+d,corrupt_read_log_event2_set";
|
|
START SLAVE IO_THREAD;
|
|
include/wait_for_slave_io_error.inc [errno=1236]
|
|
SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set";
|
|
# 4. Master read a corrupted event from binlog and send it to slave
|
|
SET GLOBAL master_verify_checksum=0;
|
|
SET GLOBAL debug_dbug="+d,corrupt_read_log_event2_set";
|
|
START SLAVE IO_THREAD;
|
|
include/wait_for_slave_io_error.inc [errno=1595,1743]
|
|
SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set";
|
|
SET GLOBAL debug_dbug= "";
|
|
SET GLOBAL master_verify_checksum=1;
|
|
# 5. Slave. Corruption in network
|
|
SET GLOBAL debug_dbug="+d,corrupt_queue_event";
|
|
START SLAVE IO_THREAD;
|
|
include/wait_for_slave_io_error.inc [errno=1595,1743]
|
|
SET GLOBAL debug_dbug="-d,corrupt_queue_event";
|
|
# 6. Slave. Corruption in relay log
|
|
SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char";
|
|
START SLAVE SQL_THREAD;
|
|
include/wait_for_slave_sql_error.inc [errno=1593]
|
|
SET GLOBAL debug_dbug="-d,corrupt_read_log_event_char";
|
|
SET GLOBAL debug_dbug= "";
|
|
# 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_dbug= "";
|
|
SET GLOBAL master_verify_checksum = @old_master_verify_checksum;
|
|
DROP TABLE t1;
|
|
SET GLOBAL debug_dbug= "";
|
|
include/rpl_end.inc
|