diff options
Diffstat (limited to 'mysql-test/suite/rpl/include')
-rw-r--r-- | mysql-test/suite/rpl/include/rpl_checksum.inc | 12 | ||||
-rw-r--r-- | mysql-test/suite/rpl/include/rpl_corruption.inc | 5 | ||||
-rw-r--r-- | mysql-test/suite/rpl/include/rpl_incident.inc | 6 | ||||
-rw-r--r-- | mysql-test/suite/rpl/include/rpl_init_slave_errors.inc | 3 |
4 files changed, 14 insertions, 12 deletions
diff --git a/mysql-test/suite/rpl/include/rpl_checksum.inc b/mysql-test/suite/rpl/include/rpl_checksum.inc index b5e70abe4d0..17a986dc308 100644 --- a/mysql-test/suite/rpl/include/rpl_checksum.inc +++ b/mysql-test/suite/rpl/include/rpl_checksum.inc @@ -108,6 +108,7 @@ insert into t1 values (1) /* will not be applied on slave due to simulation */; # instruction to the dump thread connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_slave_unaware_checksum'; start slave; --let $slave_io_errno= 1236 @@ -116,8 +117,7 @@ source include/wait_for_slave_io_error.inc; select count(*) as zero from t1; -###connection master; -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; connection slave; source include/start_slave.inc; @@ -129,10 +129,11 @@ source include/start_slave.inc; # C1. Failure by a client thread connection master; set @@global.master_verify_checksum = 1; +set @save_dbug = @@session.debug_dbug; set @@session.debug_dbug='d,simulate_checksum_test_failure'; --error ER_ERROR_WHEN_EXECUTING_COMMAND show binlog events; -set @@session.debug_dbug=''; +SET debug_dbug= @save_dbug; set @@global.master_verify_checksum = default; #connection master; @@ -149,6 +150,7 @@ connection slave; # C2. Failure by IO thread # instruction to io thread +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave io_thread; # When the checksum error is detected, the slave sets error code 1913 @@ -158,7 +160,7 @@ start slave io_thread; --let $slave_io_errno= 1595,1913 --let $show_slave_io_error= 0 source include/wait_for_slave_io_error.inc; -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; # to make IO thread re-read it again w/o the failure start slave io_thread; @@ -179,7 +181,7 @@ source include/wait_for_slave_sql_error.inc; # resuming SQL thread to parse out the event w/o the failure -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; source include/start_slave.inc; connection master; diff --git a/mysql-test/suite/rpl/include/rpl_corruption.inc b/mysql-test/suite/rpl/include/rpl_corruption.inc index 1726ee4ba2f..88f683ed53d 100644 --- a/mysql-test/suite/rpl/include/rpl_corruption.inc +++ b/mysql-test/suite/rpl/include/rpl_corruption.inc @@ -73,6 +73,7 @@ while ($i) { # Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing --echo # 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"; --echo SHOW BINLOG EVENTS; --disable_query_log @@ -167,10 +168,10 @@ let $diff_tables= master:test.t1, slave:test.t1; # Clean up --echo # 8. Clean up --connection master -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; SET GLOBAL master_verify_checksum = @old_master_verify_checksum; DROP TABLE t1; --sync_slave_with_master -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/include/rpl_incident.inc b/mysql-test/suite/rpl/include/rpl_incident.inc index 350a2086681..75d28d6a6c6 100644 --- a/mysql-test/suite/rpl/include/rpl_incident.inc +++ b/mysql-test/suite/rpl/include/rpl_incident.inc @@ -20,7 +20,7 @@ CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); SELECT * FROM t1; -let $debug_save= `SELECT @@GLOBAL.debug`; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,incident_database_resync_on_replace,*'; # This will generate an incident log event and store it in the binary @@ -29,9 +29,7 @@ REPLACE INTO t1 VALUES (4); --save_master_pos SELECT * FROM t1; ---disable_query_log -eval SET GLOBAL debug_dbug= '$debug_save'; ---enable_query_log +set @@global.debug_dbug = @saved_dbug; connection slave; # Wait until SQL thread stops with error LOST_EVENT on master diff --git a/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc b/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc index 4fdea651edd..46673ea4764 100644 --- a/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc +++ b/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc @@ -51,6 +51,7 @@ reset slave; connection slave; # Set debug flags on slave to force errors to occur +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; start slave; @@ -66,7 +67,7 @@ start slave; call mtr.add_suppression("Failed during slave.* thread initialization"); -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; ###################################################################### # Injecting faults in the init_slave option |