1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-21360 restore debud_dbug through a session variable instead of '-d,..'

This commit is contained in:
Alice Sherepa
2020-03-19 18:55:57 +01:00
parent 7e168634e9
commit ad6e421bd2
23 changed files with 228 additions and 237 deletions

View File

@ -13,42 +13,40 @@ connection master;
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 @saved_dbug = @@global.debug_dbug;
SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char";
SET @saved_dbug = @@global.debug_dbug;
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";
SET @@global.debug_dbug=@saved_dbug;
# 3. Master read a corrupted event from binlog and send the error to slave
SET GLOBAL debug_dbug="+d,corrupt_read_log_event2_set";
SET @@global.debug_dbug="d,corrupt_read_log_event2_set";
connection slave;
START SLAVE IO_THREAD;
include/wait_for_slave_io_error.inc [errno=1236]
connection master;
SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set";
SET @@global.debug_dbug=@saved_dbug;
# 4. Master read a corrupted event from binlog and send it to slave
connection master;
SET GLOBAL master_verify_checksum=0;
SET GLOBAL debug_dbug="+d,corrupt_read_log_event2_set";
SET @@global.debug_dbug="d,corrupt_read_log_event2_set";
connection slave;
START SLAVE IO_THREAD;
include/wait_for_slave_io_error.inc [errno=1595,1743]
connection master;
SET GLOBAL debug_dbug="-d,corrupt_read_log_event2_set";
SET GLOBAL debug_dbug=@saved_dbug;
SET @@global.debug_dbug=@saved_dbug;
SET GLOBAL master_verify_checksum=1;
# 5. Slave. Corruption in network
connection slave;
SET @saved_dbug_slave = @@GLOBAL.debug_dbug;
SET GLOBAL debug_dbug="+d,corrupt_queue_event";
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";
SET @@global.debug_dbug=@saved_dbug_slave;
# 6. Slave. Corruption in relay log
SET GLOBAL debug_dbug="+d,corrupt_read_log_event_char";
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=@saved_dbug_slave;
SET @@global.debug_dbug=@saved_dbug_slave;
# 7. Seek diff for tables on master and slave
connection slave;
include/start_slave.inc