diff --git a/mysql-test/extra/binlog_tests/binlog_ioerr.inc b/mysql-test/extra/binlog_tests/binlog_ioerr.inc index 8d1069bacb0..07c99373a41 100644 --- a/mysql-test/extra/binlog_tests/binlog_ioerr.inc +++ b/mysql-test/extra/binlog_tests/binlog_ioerr.inc @@ -15,12 +15,13 @@ RESET MASTER; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; INSERT INTO t1 VALUES(0); +set @saved_dbug = @@session.debug_dbug; SET SESSION debug_dbug='+d,fail_binlog_write_1'; --error ER_ERROR_ON_WRITE INSERT INTO t1 VALUES(1); --error ER_ERROR_ON_WRITE INSERT INTO t1 VALUES(2); -SET SESSION debug_dbug=''; +SET SESSION debug_dbug=@saved_dbug; INSERT INTO t1 VALUES(3); SELECT * FROM t1; diff --git a/mysql-test/extra/rpl_tests/rpl_checksum.inc b/mysql-test/extra/rpl_tests/rpl_checksum.inc index b5e70abe4d0..9951472a773 100644 --- a/mysql-test/extra/rpl_tests/rpl_checksum.inc +++ b/mysql-test/extra/rpl_tests/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/extra/rpl_tests/rpl_corruption.inc b/mysql-test/extra/rpl_tests/rpl_corruption.inc index 1726ee4ba2f..88f683ed53d 100644 --- a/mysql-test/extra/rpl_tests/rpl_corruption.inc +++ b/mysql-test/extra/rpl_tests/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/extra/rpl_tests/rpl_incident.inc b/mysql-test/extra/rpl_tests/rpl_incident.inc index 350a2086681..75d28d6a6c6 100644 --- a/mysql-test/extra/rpl_tests/rpl_incident.inc +++ b/mysql-test/extra/rpl_tests/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/extra/rpl_tests/rpl_init_slave_errors.inc b/mysql-test/extra/rpl_tests/rpl_init_slave_errors.inc index 4fdea651edd..46673ea4764 100644 --- a/mysql-test/extra/rpl_tests/rpl_init_slave_errors.inc +++ b/mysql-test/extra/rpl_tests/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 diff --git a/mysql-test/include/binlog_inject_error.inc b/mysql-test/include/binlog_inject_error.inc index 383f66ba843..ce940352723 100644 --- a/mysql-test/include/binlog_inject_error.inc +++ b/mysql-test/include/binlog_inject_error.inc @@ -13,10 +13,10 @@ # let query= 'CREATE TABLE t1 (a INT)'; # source include/binlog_inject_error.inc; # - +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; --echo $query; --replace_regex /(errno: .*)/(errno: #)/ --error ER_ERROR_ON_WRITE --eval $query -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/r/cache_temporal_4265.result b/mysql-test/r/cache_temporal_4265.result index 7f215de43fb..1cda7004a6f 100644 --- a/mysql-test/r/cache_temporal_4265.result +++ b/mysql-test/r/cache_temporal_4265.result @@ -1,13 +1,12 @@ create table t1 (a date); insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04'); -set debug_dbug='d,str_to_datetime_warn'; +SET STATEMENT debug_dbug='d,str_to_datetime_warn' for select * from t1 where a > date_add('2000-01-01', interval 5 day); a 2001-02-03 2002-03-04 Warnings: Note 1003 2000-01-01 -set debug_dbug=''; drop table t1; create table t1 (id int not null, ut timestamp(6) not null); insert into t1 values(1, '2001-01-01 00:00:00.2'); diff --git a/mysql-test/r/drop_bad_db_type.result b/mysql-test/r/drop_bad_db_type.result index 1b691957877..b6fa3bfd70e 100644 --- a/mysql-test/r/drop_bad_db_type.result +++ b/mysql-test/r/drop_bad_db_type.result @@ -1,4 +1,4 @@ -SET @save_dbug = @@debug_dbug; +SET @saved_dbug = @@debug_dbug; set debug_dbug='+d,unstable_db_type'; install soname 'ha_archive'; create table t1 (a int) engine=archive; @@ -33,4 +33,4 @@ t1.frm drop table t1; db.opt uninstall soname 'ha_archive'; -set debug_dbug=@save_dbug; +set debug_dbug=@saved_dbug; diff --git a/mysql-test/r/engine_error_in_alter-8453.result b/mysql-test/r/engine_error_in_alter-8453.result index c5a3375f33c..d1d4181cf68 100644 --- a/mysql-test/r/engine_error_in_alter-8453.result +++ b/mysql-test/r/engine_error_in_alter-8453.result @@ -1,6 +1,7 @@ create table t1 (a int, b int); +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,external_lock_failure'; alter table t1 add column c int; ERROR HY000: Got error 168 'KABOOM!' from MyISAM -set debug_dbug=''; +set debug_dbug= @saved_dbug; drop table t1; diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result index 7e728d24fc8..19d1ff4db17 100644 --- a/mysql-test/r/error_simulation.result +++ b/mysql-test/r/error_simulation.result @@ -10,6 +10,7 @@ INSERT INTO t1 VALUES ('AAAAAAAAAH','AAAAAAAAAH'), ('AAAAAAAAAI','AAAAAAAAAI'), ('AAAAAAAAAJ','AAAAAAAAAJ'), ('AAAAAAAAAK','AAAAAAAAAK'); set tmp_table_size=1024; +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,raise_error"; SELECT MAX(a) FROM t1 GROUP BY a,b; ERROR 23000: Can't write; duplicate key in table '(temporary)' @@ -22,7 +23,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL); INSERT INTO t1 VALUES (1), (0), (2); SET SESSION debug_dbug='+d,alter_table_only_index_change'; ALTER TABLE t1 ADD INDEX a(a); -SET SESSION debug_dbug=DEFAULT; +set debug_dbug= @saved_dbug; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -42,7 +43,7 @@ CREATE TABLE t1(a BLOB); SET SESSION debug_dbug="+d,bug42064_simulate_oom"; INSERT INTO t1 VALUES(""); Got one of the listed errors -SET SESSION debug_dbug=DEFAULT; +set debug_dbug= @saved_dbug; DROP TABLE t1; # # Bug#41660: Sort-index_merge for non-first join table may require @@ -79,7 +80,7 @@ a a b filler 7 1 1 data 8 1 1 data 9 1 1 data -SET SESSION debug_dbug= DEFAULT; +set debug_dbug= @saved_dbug; SET optimizer_switch=@save_optimizer_switch; DROP TABLE t1, t2; # @@ -92,7 +93,7 @@ INSERT INTO t2 VALUES (1),(2); SET SESSION debug_dbug="+d,bug11747970_raise_error"; INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); ERROR 70100: Query execution was interrupted -SET SESSION debug_dbug = DEFAULT; +set debug_dbug= @saved_dbug; DROP TABLE t1,t2; # # End of 5.1 tests @@ -126,4 +127,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory"; SELECT f1(1); Got one of the listed errors DROP FUNCTION f1; -SET SESSION debug_dbug=DEFAULT; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/r/func_regexp_pcre_debug.result b/mysql-test/r/func_regexp_pcre_debug.result index e44492fca72..40a379a077d 100644 --- a/mysql-test/r/func_regexp_pcre_debug.result +++ b/mysql-test/r/func_regexp_pcre_debug.result @@ -1,10 +1,9 @@ -SET debug_dbug='+d,pcre_exec_error_123'; +SET STATEMENT debug_dbug='+d,pcre_exec_error_123' for SELECT 'a' RLIKE 'a'; 'a' RLIKE 'a' 0 Warnings: Warning 1139 Got error 'pcre_exec: Internal error (-123)' from regexp -SET debug_dbug=''; SELECT 'a' RLIKE 'a'; 'a' RLIKE 'a' 1 diff --git a/mysql-test/r/log_slow_debug.result b/mysql-test/r/log_slow_debug.result index 09460fa5d01..a21cc1ce744 100644 --- a/mysql-test/r/log_slow_debug.result +++ b/mysql-test/r/log_slow_debug.result @@ -6,7 +6,7 @@ SET @@GLOBAL.log_output='TABLE'; FLUSH SLOW LOGS; SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.log_slow_admin_statements=ON; -SET @save_dbug = @@debug_dbug; +SET @saved_dbug = @@debug_dbug; SET SESSION debug_dbug="+d,simulate_slow_query"; CREATE PROCEDURE show_slow_log() BEGIN @@ -130,7 +130,7 @@ sql_text # # Clean up # -SET SESSION debug_dbug=@save_dbug; +SET SESSION debug_dbug=@saved_dbug; TRUNCATE mysql.slow_log; SET @@global.slow_query_log= @org_slow_query_log; SET @@global.log_output= @org_log_output; diff --git a/mysql-test/r/mdev6830.result b/mysql-test/r/mdev6830.result index d1cf8c98ac1..e3b3ed41edf 100644 --- a/mysql-test/r/mdev6830.result +++ b/mysql-test/r/mdev6830.result @@ -1,3 +1,4 @@ +set @saved_dbug = @@session.debug_dbug; set @@debug_dbug= 'd,opt'; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; CREATE TABLE t2 ( @@ -46,3 +47,4 @@ SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5; pk f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f1 f2 drop table t1,t2,t3,t4; drop view v2,v3; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/r/merge-big.result b/mysql-test/r/merge-big.result index 3b6e116986e..bd188d7a856 100644 --- a/mysql-test/r/merge-big.result +++ b/mysql-test/r/merge-big.result @@ -7,7 +7,7 @@ drop table if exists t1,t2,t3,t4,t5,t6; CREATE TABLE t1 (c1 INT) ENGINE= MyISAM; LOCK TABLE t1 WRITE; connect con1,localhost,root,,; -SET @orig_debug=@@debug; +SET @orig_debug=@@global.debug_dbug; SET GLOBAL debug_dbug="+d,sleep_open_and_lock_after_open"; INSERT INTO t1 VALUES (1); connection default; diff --git a/mysql-test/r/merge_debug.result b/mysql-test/r/merge_debug.result index 51905e52d24..29858810ff1 100644 --- a/mysql-test/r/merge_debug.result +++ b/mysql-test/r/merge_debug.result @@ -3,7 +3,7 @@ set global storage_engine=myisam; set session storage_engine=myisam; call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair it"); drop table if exists crashed,t2,t3,t4; -SET @orig_debug=@@debug; +SET @orig_debug=@@global.debug_dbug; CREATE TABLE crashed (c1 INT); CREATE TABLE t2 (c1 INT); CREATE TABLE t3 (c1 INT); diff --git a/mysql-test/r/range_innodb.result b/mysql-test/r/range_innodb.result index 6572b248911..aed8bff278b 100644 --- a/mysql-test/r/range_innodb.result +++ b/mysql-test/r/range_innodb.result @@ -70,6 +70,7 @@ key(a),key(b),key(c) insert into t1 select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a from t0 A, t0 B, t0 C, t0 D where D.a<5; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug="+d,ha_index_init_fail"; explain select * from t1 where a=10 and b=10; id select_type table type possible_keys key key_len ref rows Extra @@ -77,5 +78,5 @@ id select_type table type possible_keys key key_len ref rows Extra select * from t1 where a=10 and b=10; ERROR HY000: Table definition has changed, please retry transaction DROP TABLE t0,t1; -set @@global.debug_dbug="-d"; +set @@global.debug_dbug = @saved_dbug; set @@optimizer_switch= @optimizer_switch_save; diff --git a/mysql-test/r/select_debug.result b/mysql-test/r/select_debug.result index 55882ad337a..ad663828290 100644 --- a/mysql-test/r/select_debug.result +++ b/mysql-test/r/select_debug.result @@ -6,6 +6,7 @@ insert into t1 values (2,2), (1,1); create table t2 (a int); insert into t2 values (2), (3); set session join_cache_level=3; +set @saved_dbug = @@session.debug_dbug; set @@debug_dbug= 'd,opt'; explain select t1.b from t1,t2 where t1.b=t2.a; id select_type table type possible_keys key key_len ref rows Extra @@ -16,3 +17,4 @@ b 2 set session join_cache_level=default; drop table t1,t2; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/r/show_explain_ps.result b/mysql-test/r/show_explain_ps.result index 38f368ec4f5..3721a13dd79 100644 --- a/mysql-test/r/show_explain_ps.result +++ b/mysql-test/r/show_explain_ps.result @@ -17,6 +17,7 @@ connection con1; connection default; connection con1; set @show_explain_probe_select_id=1; +set @saved_dbug = @@session.debug_dbug; set debug_dbug='d,show_explain_probe_join_exec_start'; select count(*) from t0 where a < 100000; connection default; @@ -28,7 +29,7 @@ Note 1003 select count(*) from t0 where a < 100000 connection con1; count(*) 10 -set debug_dbug=''; +set debug_dbug= @saved_dbug; select event_name from performance_schema.events_stages_history_long join diff --git a/mysql-test/r/slowlog_enospace-10508.result b/mysql-test/r/slowlog_enospace-10508.result index f39bfa2f00e..4dfd3474804 100644 --- a/mysql-test/r/slowlog_enospace-10508.result +++ b/mysql-test/r/slowlog_enospace-10508.result @@ -3,6 +3,7 @@ create table t1 (a int, b int) engine=memory; insert t1 select seq, seq+1 from seq_1_to_1000; set global general_log=0; set global log_queries_not_using_indexes=1; +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,simulate_file_write_error'; select * from t1 where a>10; select * from t1 where a>10; @@ -54,7 +55,7 @@ select * from t1 where a>10; select * from t1 where a>10; select * from t1 where a>10; select * from t1 where a>10; -set debug_dbug=''; +set debug_dbug= @saved_dbug; set global general_log=1; set global log_queries_not_using_indexes=default; drop table t1; diff --git a/mysql-test/r/stat_tables-enospc.result b/mysql-test/r/stat_tables-enospc.result index 943cbca6bc5..23b0f9d41ed 100644 --- a/mysql-test/r/stat_tables-enospc.result +++ b/mysql-test/r/stat_tables-enospc.result @@ -1,11 +1,12 @@ call mtr.add_suppression("No space left on device"); create table t1 (a varchar(255), b varchar(255), c varchar(255)); set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3; +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,simulate_file_write_error'; set @@max_heap_table_size=128*1024; analyze table t1; Table Op Msg_type Msg_text test.t1 analyze Error Error writing file 'tmp-file' (Errcode: 28 "No space left on device") test.t1 analyze status Operation failed -set debug_dbug=''; +set debug_dbug= @saved_dbug; drop table t1; diff --git a/mysql-test/r/union_crash-714.result b/mysql-test/r/union_crash-714.result index 4a51f88b76f..b5ed7d205dc 100644 --- a/mysql-test/r/union_crash-714.result +++ b/mysql-test/r/union_crash-714.result @@ -1,5 +1,7 @@ create table t1 (i tinyint); +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,bug11747970_raise_error'; insert into t1 (i) select i from t1 union select i from t1; ERROR 70100: Query execution was interrupted drop table t1; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/r/warnings_debug.result b/mysql-test/r/warnings_debug.result index 4cdce7a5feb..eba6e8f8f4e 100644 --- a/mysql-test/r/warnings_debug.result +++ b/mysql-test/r/warnings_debug.result @@ -1,5 +1,6 @@ drop table if exists t1; create table t1 (a int primary key) engine=innodb; +set @saved_dbug = @@session.debug_dbug; SET SESSION debug_dbug="+d,warn_during_ha_commit_trans"; INSERT INTO t1 VALUES (1); Warnings: @@ -8,3 +9,4 @@ SHOW WARNINGS; Level Code Message Warning 1196 Some non-transactional changed tables couldn't be rolled back drop table t1; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/binlog/r/binlog_ioerr.result b/mysql-test/suite/binlog/r/binlog_ioerr.result index 1d3c3d7d12d..f09d6415fa4 100644 --- a/mysql-test/suite/binlog/r/binlog_ioerr.result +++ b/mysql-test/suite/binlog/r/binlog_ioerr.result @@ -2,12 +2,13 @@ CALL mtr.add_suppression("Error writing file 'master-bin'"); RESET MASTER; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; INSERT INTO t1 VALUES(0); +set @saved_dbug = @@session.debug_dbug; SET SESSION debug_dbug='+d,fail_binlog_write_1'; INSERT INTO t1 VALUES(1); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") INSERT INTO t1 VALUES(2); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") -SET SESSION debug_dbug=''; +SET SESSION debug_dbug=@saved_dbug; INSERT INTO t1 VALUES(3); SELECT * FROM t1; a diff --git a/mysql-test/suite/binlog/r/binlog_write_error.result b/mysql-test/suite/binlog/r/binlog_write_error.result index 2606a9f40b3..6e8a212035a 100644 --- a/mysql-test/suite/binlog/r/binlog_write_error.result +++ b/mysql-test/suite/binlog/r/binlog_write_error.result @@ -12,92 +12,109 @@ DROP VIEW IF EXISTS v1, v2; # # Test injecting binlog write error when executing queries # +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; INSERT INTO t1 VALUES (1),(2),(3); +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; INSERT INTO t1 VALUES (4),(5),(6); INSERT INTO t1 VALUES (4),(5),(6); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; UPDATE t1 set a=a+1; UPDATE t1 set a=a+1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DELETE FROM t1; DELETE FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TRIGGER tr1; DROP TRIGGER tr1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; ALTER TABLE t1 ADD (b INT); ALTER TABLE t1 ADD (b INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE VIEW v1 AS SELECT a FROM t1; CREATE VIEW v1 AS SELECT a FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP VIEW v1; DROP VIEW v1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP PROCEDURE p1; DROP PROCEDURE p1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TABLE t1; DROP TABLE t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE FUNCTION f1() RETURNS INT return 1; CREATE FUNCTION f1() RETURNS INT return 1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP FUNCTION f1; DROP FUNCTION f1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE USER user1; CREATE USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP USER user1; DROP USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; # # Cleanup # diff --git a/mysql-test/suite/binlog_encryption/binlog_ioerr.result b/mysql-test/suite/binlog_encryption/binlog_ioerr.result index 6b3120b6d89..9b04c9be4e1 100644 --- a/mysql-test/suite/binlog_encryption/binlog_ioerr.result +++ b/mysql-test/suite/binlog_encryption/binlog_ioerr.result @@ -2,12 +2,13 @@ CALL mtr.add_suppression("Error writing file 'master-bin'"); RESET MASTER; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=innodb; INSERT INTO t1 VALUES(0); +set @saved_dbug = @@session.debug_dbug; SET SESSION debug_dbug='+d,fail_binlog_write_1'; INSERT INTO t1 VALUES(1); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") INSERT INTO t1 VALUES(2); ERROR HY000: Error writing file 'master-bin' (errno: 28 "No space left on device") -SET SESSION debug_dbug=''; +SET SESSION debug_dbug=@saved_dbug; INSERT INTO t1 VALUES(3); SELECT * FROM t1; a diff --git a/mysql-test/suite/binlog_encryption/binlog_write_error.result b/mysql-test/suite/binlog_encryption/binlog_write_error.result index 2606a9f40b3..6e8a212035a 100644 --- a/mysql-test/suite/binlog_encryption/binlog_write_error.result +++ b/mysql-test/suite/binlog_encryption/binlog_write_error.result @@ -12,92 +12,109 @@ DROP VIEW IF EXISTS v1, v2; # # Test injecting binlog write error when executing queries # +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; INSERT INTO t1 VALUES (1),(2),(3); +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; INSERT INTO t1 VALUES (4),(5),(6); INSERT INTO t1 VALUES (4),(5),(6); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; UPDATE t1 set a=a+1; UPDATE t1 set a=a+1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DELETE FROM t1; DELETE FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW INSERT INTO t1 VALUES (new.a + 100); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TRIGGER tr1; DROP TRIGGER tr1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; ALTER TABLE t1 ADD (b INT); ALTER TABLE t1 ADD (b INT); ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE VIEW v1 AS SELECT a FROM t1; CREATE VIEW v1 AS SELECT a FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP VIEW v1; DROP VIEW v1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; CREATE PROCEDURE p1(OUT rows_cnt INT) SELECT count(*) INTO rows_cnt FROM t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP PROCEDURE p1; DROP PROCEDURE p1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP TABLE t1; DROP TABLE t1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE FUNCTION f1() RETURNS INT return 1; CREATE FUNCTION f1() RETURNS INT return 1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP FUNCTION f1; DROP FUNCTION f1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; CREATE USER user1; CREATE USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug='d,injecting_fault_writing'; DROP USER user1; DROP USER user1; ERROR HY000: Error writing file 'master-bin' ((errno: #) -SET GLOBAL debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; # # Cleanup # diff --git a/mysql-test/suite/binlog_encryption/rpl_checksum.result b/mysql-test/suite/binlog_encryption/rpl_checksum.result index 41c4cd94aff..14220a356ca 100644 --- a/mysql-test/suite/binlog_encryption/rpl_checksum.result +++ b/mysql-test/suite/binlog_encryption/rpl_checksum.result @@ -76,6 +76,7 @@ connection master; set @@global.binlog_checksum = CRC32; insert into t1 values (1) /* will not be applied on slave due to simulation */; connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_slave_unaware_checksum'; start slave; include/wait_for_slave_io_error.inc [errno=1236] @@ -83,15 +84,16 @@ Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary select count(*) as zero from t1; zero 0 -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; connection slave; include/start_slave.inc connection master; set @@global.master_verify_checksum = 1; +set @save_dbug = @@session.debug_dbug; set @@session.debug_dbug='d,simulate_checksum_test_failure'; show binlog events; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error -set @@session.debug_dbug=''; +set debug_dbug= @save_dbug; set @@global.master_verify_checksum = default; connection slave; connection slave; @@ -99,10 +101,11 @@ include/stop_slave.inc connection master; create table t2 (a int); connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave io_thread; include/wait_for_slave_io_error.inc [errno=1595,1913] -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; start slave io_thread; include/wait_for_slave_param.inc [Read_Master_Log_Pos] set @@global.slave_sql_verify_checksum = 1; @@ -110,7 +113,7 @@ set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave sql_thread; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Error initializing relay log position: I/O error reading event at position 4' -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; include/start_slave.inc connection master; connection slave; diff --git a/mysql-test/suite/binlog_encryption/rpl_corruption.result b/mysql-test/suite/binlog_encryption/rpl_corruption.result index 25a82fd60cd..db72bb304fc 100644 --- a/mysql-test/suite/binlog_encryption/rpl_corruption.result +++ b/mysql-test/suite/binlog_encryption/rpl_corruption.result @@ -13,6 +13,7 @@ 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"; SHOW BINLOG EVENTS; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error @@ -55,9 +56,9 @@ connection slave; include/diff_tables.inc [master:test.t1, slave:test.t1] # 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; connection slave; -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/binlog_encryption/rpl_incident.result b/mysql-test/suite/binlog_encryption/rpl_incident.result index 8fb4aa907cc..6dbe4417c5a 100644 --- a/mysql-test/suite/binlog_encryption/rpl_incident.result +++ b/mysql-test/suite/binlog_encryption/rpl_incident.result @@ -14,6 +14,7 @@ a 1 2 3 +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,incident_database_resync_on_replace,*'; REPLACE INTO t1 VALUES (4); SELECT * FROM t1; @@ -22,6 +23,7 @@ a 2 3 4 +set @@global.debug_dbug = @saved_dbug; connection slave; call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occurred on the master.* 1590"); include/wait_for_slave_sql_error.inc [errno=1590] diff --git a/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result b/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result index 91742814b4c..fc23734c645 100644 --- a/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result +++ b/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.result @@ -4,12 +4,13 @@ connection slave; stop slave; reset slave; connection slave; +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; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Failed during slave thread initialization' call mtr.add_suppression("Failed during slave.* thread initialization"); -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; connection slave; reset slave; SET GLOBAL init_slave= "garbage"; diff --git a/mysql-test/suite/innodb/r/blob-update-debug.result b/mysql-test/suite/innodb/r/blob-update-debug.result index 1360745b7e6..0d0fc6d5070 100644 --- a/mysql-test/suite/innodb/r/blob-update-debug.result +++ b/mysql-test/suite/innodb/r/blob-update-debug.result @@ -7,9 +7,11 @@ insert into t1 values (1, repeat('*', 50000)); select f1, substring(f2, 1, 40) from t1; f1 substring(f2, 1, 40) 1 **************************************** +set @saved_debug = @@session.debug_dbug; set debug_dbug = 'd,row_ins_index_entry_timeout'; update t1 set f1 = 3; select f1, substring(f2, 1, 40) from t1; f1 substring(f2, 1, 40) 3 **************************************** drop table t1; +set debug_dbug= @saved_debug; diff --git a/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result b/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result index ef2d3182b92..b48cfb05a5c 100644 --- a/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result +++ b/mysql-test/suite/innodb/r/innodb-stats-initialize-failure.result @@ -1,4 +1,5 @@ call mtr.add_suppression("InnoDB: Warning: Index.*"); +set @saved_dbug = @@session.debug_dbug; set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized'; create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb; create procedure innodb_insert_proc (repeat_count int) @@ -27,6 +28,6 @@ count(1) select count(1) from t1 where c between 7 and 787; count(1) 781 -set DEBUG_DBUG=NULL; drop procedure innodb_insert_proc; drop table t1; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/innodb/r/innodb_bug11754376.result b/mysql-test/suite/innodb/r/innodb_bug11754376.result index b9f2a169a73..a2c1ceed61f 100644 --- a/mysql-test/suite/innodb/r/innodb_bug11754376.result +++ b/mysql-test/suite/innodb/r/innodb_bug11754376.result @@ -1,3 +1,5 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; +set @saved_dbug = @@session.debug_dbug; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; DROP TABLE bug11754376; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/innodb/r/innodb_bug56947.result b/mysql-test/suite/innodb/r/innodb_bug56947.result index 4248013b088..981e08609a2 100644 --- a/mysql-test/suite/innodb/r/innodb_bug56947.result +++ b/mysql-test/suite/innodb/r/innodb_bug56947.result @@ -1,5 +1,6 @@ SET GLOBAL innodb_file_per_table=0; create table bug56947(a int not null) engine = innodb; +set @saved_dbug = @@session.debug_dbug; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; alter table bug56947 add unique index (a); ERROR HY000: Got error 11 "xxx" from storage engine InnoDB @@ -8,3 +9,4 @@ Table Op Msg_type Msg_text test.bug56947 check status OK drop table bug56947; SET @@global.innodb_file_per_table=DEFAULT; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result b/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result index 5f14ad9b0d7..73b5f81a76f 100644 --- a/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result +++ b/mysql-test/suite/innodb/r/innodb_sys_semaphore_waits.result @@ -4,6 +4,7 @@ drop table if exists t1; connection con1; create table t1 (id integer, x integer) engine = InnoDB; insert into t1 values(0, 0); +set @saved_dbug = @@session.debug_dbug; set DEBUG_DBUG='+d,fatal-semaphore-timeout'; set autocommit=0; # Sending query on con1, @@ -21,6 +22,6 @@ connection default; # Waitting for reconnect after mysqld restarts # Reconnected after mysqld was successfully restarted # Cleaning up before exit -set DEBUG_DBUG=NULL; +set debug_dbug = @saved_dbug; drop table if exists t1; # Clean exit diff --git a/mysql-test/suite/innodb/t/blob-update-debug.test b/mysql-test/suite/innodb/t/blob-update-debug.test index 948cd749148..37c364290f4 100644 --- a/mysql-test/suite/innodb/t/blob-update-debug.test +++ b/mysql-test/suite/innodb/t/blob-update-debug.test @@ -11,7 +11,9 @@ create table t1 (f1 int primary key, f2 blob) engine = innodb; insert into t1 values (1, repeat('*', 50000)); select f1, substring(f2, 1, 40) from t1; +set @saved_debug = @@session.debug_dbug; set debug_dbug = 'd,row_ins_index_entry_timeout'; update t1 set f1 = 3; select f1, substring(f2, 1, 40) from t1; drop table t1; +set debug_dbug= @saved_debug; diff --git a/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test b/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test index e480f0caf07..dc85aa6e892 100644 --- a/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test +++ b/mysql-test/suite/innodb/t/innodb-stats-initialize-failure.test @@ -6,6 +6,7 @@ call mtr.add_suppression("InnoDB: Warning: Index.*"); # This caused crash earlier +set @saved_dbug = @@session.debug_dbug; set DEBUG_DBUG='+d,ib_ha_innodb_stat_not_initialized'; create table t1(a int not null primary key, b int, c int, key(b), key(c)) engine=innodb; @@ -32,8 +33,8 @@ select count(1) from t1 where a between 5 and 100; select count(1) from t1 where b between 5 and 256; select count(1) from t1 where c between 7 and 787; -set DEBUG_DBUG=NULL; + drop procedure innodb_insert_proc; drop table t1; - +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/innodb/t/innodb_bug11754376.test b/mysql-test/suite/innodb/t/innodb_bug11754376.test index a7f35c1a960..238c86194d6 100644 --- a/mysql-test/suite/innodb/t/innodb_bug11754376.test +++ b/mysql-test/suite/innodb/t/innodb_bug11754376.test @@ -8,7 +8,8 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; # This will invoke test_normalize_table_name_low() in debug builds - +set @saved_dbug = @@session.debug_dbug; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; DROP TABLE bug11754376; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/innodb/t/innodb_bug56947.test b/mysql-test/suite/innodb/t/innodb_bug56947.test index 84c5e70e1b5..98bca895e82 100644 --- a/mysql-test/suite/innodb/t/innodb_bug56947.test +++ b/mysql-test/suite/innodb/t/innodb_bug56947.test @@ -7,6 +7,7 @@ SET GLOBAL innodb_file_per_table=0; create table bug56947(a int not null) engine = innodb; +set @saved_dbug = @@session.debug_dbug; SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename'; --replace_regex /"[^"]*"/"xxx"/ --error ER_GET_ERRNO @@ -15,3 +16,4 @@ check table bug56947; drop table bug56947; SET @@global.innodb_file_per_table=DEFAULT; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test b/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test index e7acb98b0d0..e7076527b2b 100644 --- a/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test +++ b/mysql-test/suite/innodb/t/innodb_sys_semaphore_waits.test @@ -17,6 +17,7 @@ eval create table t1 (id integer, x integer) engine = InnoDB; insert into t1 values(0, 0); # Enable the debug injection. +set @saved_dbug = @@session.debug_dbug; set DEBUG_DBUG='+d,fatal-semaphore-timeout'; set autocommit=0; @@ -107,7 +108,7 @@ source include/wait_until_connected_again.inc; --echo # Cleaning up before exit --disable_warnings -set DEBUG_DBUG=NULL; +set debug_dbug = @saved_dbug; drop table if exists t1; --enable_warnings diff --git a/mysql-test/suite/innodb_fts/r/concurrent_insert.result b/mysql-test/suite/innodb_fts/r/concurrent_insert.result index 9871d43119a..31d832ba483 100644 --- a/mysql-test/suite/innodb_fts/r/concurrent_insert.result +++ b/mysql-test/suite/innodb_fts/r/concurrent_insert.result @@ -17,6 +17,7 @@ INSERT INTO t1 VALUES('test'); CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB; INSERT INTO t2 VALUES('mariadb'); connection default; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang'; SET DEBUG_SYNC= 'fts_instrument_sync_request SIGNAL drop_index_start WAIT_FOR sync_op'; @@ -28,7 +29,7 @@ ALTER TABLE t2 drop index idx1; connection default; set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; connection con1; -SET global DEBUG_DBUG=RESET; +set @@global.debug_dbug = @saved_dbug; drop table t1, t2; connection default; set DEBUG_SYNC=RESET; diff --git a/mysql-test/suite/innodb_fts/t/concurrent_insert.test b/mysql-test/suite/innodb_fts/t/concurrent_insert.test index 77097d44dc5..881441b66b6 100644 --- a/mysql-test/suite/innodb_fts/t/concurrent_insert.test +++ b/mysql-test/suite/innodb_fts/t/concurrent_insert.test @@ -29,6 +29,7 @@ CREATE TABLE t2 (f1 char(100), FULLTEXT idx1(f1))ENGINE=InnoDB; INSERT INTO t2 VALUES('mariadb'); connection default; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug ='+d,fts_instrument_sync_request,ib_optimize_wq_hang'; SET DEBUG_SYNC= 'fts_instrument_sync_request SIGNAL drop_index_start WAIT_FOR sync_op'; @@ -45,7 +46,7 @@ set DEBUG_SYNC= 'now SIGNAL fts_drop_index'; connection con1; reap; -SET global DEBUG_DBUG=RESET; +set @@global.debug_dbug = @saved_dbug; drop table t1, t2; connection default; set DEBUG_SYNC=RESET; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result index 760d7342752..1dd675bc8a9 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug36981.result @@ -1,3 +1,4 @@ +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; create table `t1` (`c1` char(1) default null,`c2` char(10) default null, key (`c1`)) @@ -7,3 +8,4 @@ select * from `t1` where `c1`='3' for update; c1 c2 3 NULL drop table `t1`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result index 5e53649c538..3e6f4b2b4f1 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug40992.result @@ -1,6 +1,7 @@ # # Bug#40992 - InnoDB: Crash when engine_condition_pushdown is on # +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t ( dummy INT PRIMARY KEY, @@ -13,3 +14,4 @@ dummy a b 3 3 3 5 5 5 DROP TABLE t; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result index 31e39d4421d..ef0d8e7043a 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug41996.result @@ -1,3 +1,4 @@ +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; drop table if exists `t1`; Warnings: @@ -6,3 +7,4 @@ create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb; insert into `t1` values(2,2); delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ; drop table `t1`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result index e4fdf0d03a7..018bb0dd6e0 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug42991.result @@ -1,3 +1,4 @@ +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -252,3 +253,4 @@ Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DOUBLE value: 'd' Warning 1292 Truncated incorrect DOUBLE value: 'd' drop table `table5`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result index 0cd801280c8..ca8b54dc1ae 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43249.result @@ -1,3 +1,4 @@ +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY KEY(c1), UNIQUE INDEX(c2)) engine=innodb; @@ -9,3 +10,4 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2; c1 c2 c3 08:29:45 NULL 2009-02-01 drop table `t1`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result index 899bf04e635..d2df789ccf0 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result @@ -1,6 +1,7 @@ # # Bug#43360 - Server crash with a simple multi-table update # +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1 ( a CHAR(2) NOT NULL PRIMARY KEY, @@ -42,3 +43,4 @@ AB Sweden MS United States of Ame JA USA DROP TABLE t1,t2; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result index a8f56923386..552c8629962 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43448.result @@ -1,6 +1,7 @@ # # Bug#43448 - Server crashes on multi table delete with Innodb # +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1 ( id1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -28,3 +29,4 @@ DELETE t1, t2, t3 FROM t1, t2, t3 WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5; DROP TABLE t1, t2, t3; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result index 0d88ff3d2cb..388c88c1d05 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result +++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result @@ -1,6 +1,7 @@ set storage_engine=innodb; set @save_time_zone= @@time_zone; set time_zone='+03:00'; +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1(c1 TIMESTAMP NOT NULL, c2 TIMESTAMP NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2)); INSERT INTO t1 VALUES('98-12-31 11:30:45','98.12.31 11+30+45','98-12-31 11:30:45','98.12.31 11+30+45'),('98/12/30 11*30*45','98@12@30 11^30^45','98/12/30 11*30*45','98@12@30 11^30^45'),('98-12-29','98.12.29','98-12-29','98.12.29'),('98/12/28','98@12@28','98/12/28','98@12@28'); @@ -100,3 +101,4 @@ c1 c2 c3 c4 2038-01-09 03:14:07 2038-01-09 03:14:07 2009-01-05 2009-01-06 00:00:00 DROP TABLE t1; set time_zone= @save_time_zone; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test index da9de306b09..63219c8172d 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug36981.test @@ -4,6 +4,7 @@ --source include/have_innodb.inc # crash requires this +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; create table `t1` (`c1` char(1) default null,`c2` char(10) default null, @@ -12,3 +13,4 @@ engine=innodb default charset=latin1; insert into `t1` values ('3',null); select * from `t1` where `c1`='3' for update; drop table `t1`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test index b16f55aa951..c442712cc62 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug40992.test @@ -5,6 +5,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +set @saved_dbug = @@session.debug_dbug; # Crash requires that we enable Index Condition Pushdown in InnoDB set session debug_dbug="+d,optimizer_innodb_icp"; @@ -19,3 +20,4 @@ INSERT INTO t VALUES (1,1,1),(3,3,3),(5,5,5); SELECT * FROM t WHERE a > 2 FOR UPDATE; DROP TABLE t; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test index 7d6237fa536..e7c04eec496 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug41996.test @@ -5,6 +5,7 @@ --source include/have_innodb.inc # crash requires this +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; drop table if exists `t1`; @@ -12,3 +13,4 @@ create table `t1` (`c` bigint, key(`c`),`a` int)engine=innodb; insert into `t1` values(2,2); delete `t1` from `t1` `a`, `t1` where `a`.`a`=`t1`.`c` ; drop table `t1`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test index 2b5864a3e69..e768e775a01 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug42991.test @@ -6,6 +6,7 @@ --source include/have_innodb.inc +set @saved_dbug = @@session.debug_dbug; # Valgrind errors happen only with this: set session debug_dbug="+d,optimizer_innodb_icp"; @@ -246,3 +247,4 @@ UNLOCK TABLES; select * from `table5` where (col2 <= '6566-06-15' AND col24 <> 'd') group by `col83` order by `col83` desc ; drop table `table5`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test index 6275038a650..e727bc24763 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43249.test @@ -4,6 +4,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; CREATE TABLE t1(c1 TIME NOT NULL, c2 TIME NULL, c3 DATE, PRIMARY @@ -15,3 +16,4 @@ SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2; SELECT * FROM t1 WHERE c2 <=> NULL ORDER BY c2 LIMIT 2; drop table `t1`; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test index 9bfff0ccdb7..3bb6e79a784 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test @@ -6,6 +6,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +set @saved_dbug = @@session.debug_dbug; # crash requires this set session debug_dbug="+d,optimizer_innodb_icp"; @@ -42,3 +43,4 @@ SELECT * FROM t1; SELECT * FROM t2; DROP TABLE t1,t2; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test index f7f40a6d3bf..9bc83195b73 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43448.test @@ -5,6 +5,7 @@ --source include/have_debug.inc --source include/have_innodb.inc +set @saved_dbug = @@session.debug_dbug; # crash requires ICP support in InnoDB set session debug_dbug="+d,optimizer_innodb_icp"; @@ -58,3 +59,4 @@ FROM t1, t2, t3 WHERE t1.id1 = t2.id2 AND t2.id2 = t3.id3 AND t1.id1 > 5; DROP TABLE t1, t2, t3; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test index 2b5b5fd96dd..6533025a7b6 100644 --- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test +++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test @@ -6,6 +6,7 @@ set storage_engine=innodb; set @save_time_zone= @@time_zone; set time_zone='+03:00'; +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,optimizer_innodb_icp"; ######## Running INSERT tests for TIMESTAMP ######## @@ -83,4 +84,4 @@ SELECT * FROM t1 WHERE c2 IN ('1971-01-01 00:00:01','2038-01-09 03:14:07') ORDER DROP TABLE t1; set time_zone= @save_time_zone; - +set debug_dbug= @saved_dbug; diff --git a/mysql-test/suite/parts/r/partition_debug.result b/mysql-test/suite/parts/r/partition_debug.result index 7460fe8dd74..e438cae7a14 100644 --- a/mysql-test/suite/parts/r/partition_debug.result +++ b/mysql-test/suite/parts/r/partition_debug.result @@ -6,11 +6,11 @@ CREATE TABLE t1 (a INT, b VARCHAR(64), KEY(b,a)) PARTITION BY HASH (a) PARTITIONS 3; INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"), (6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine"); -SET @save_dbug=@@debug_dbug; +SET @saved_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,ha_partition_fail_index_init"; SELECT * FROM t1 WHERE b = "Seven"; ERROR HY000: Table has no partition for value 0 -SET SESSION debug_dbug=@save_dbug; +SET SESSION debug_dbug=@saved_dbug; SELECT * FROM t1 WHERE b = "Seven"; a b 7 Seven diff --git a/mysql-test/suite/parts/t/partition_debug.test b/mysql-test/suite/parts/t/partition_debug.test index ef12ee99948..864452f8d8b 100644 --- a/mysql-test/suite/parts/t/partition_debug.test +++ b/mysql-test/suite/parts/t/partition_debug.test @@ -18,11 +18,11 @@ CREATE TABLE t1 (a INT, b VARCHAR(64), KEY(b,a)) PARTITION BY HASH (a) PARTITIONS 3; INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"), (6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine"); -SET @save_dbug=@@debug_dbug; +SET @saved_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,ha_partition_fail_index_init"; --error ER_NO_PARTITION_FOR_GIVEN_VALUE SELECT * FROM t1 WHERE b = "Seven"; -SET SESSION debug_dbug=@save_dbug; +SET SESSION debug_dbug=@saved_dbug; SELECT * FROM t1 WHERE b = "Seven"; DROP TABLE t1; diff --git a/mysql-test/suite/parts/t/partition_debug_innodb.test b/mysql-test/suite/parts/t/partition_debug_innodb.test index c3fa85ba5ba..0d065d0e3f2 100644 --- a/mysql-test/suite/parts/t/partition_debug_innodb.test +++ b/mysql-test/suite/parts/t/partition_debug_innodb.test @@ -30,7 +30,7 @@ INSERT INTO t1 VALUES (6, 'X 6 row'), (7, 'Seventh row'), (8, 'Last row'); ALTER TABLE t1 ADD INDEX new_b_index (b); ALTER TABLE t1 DROP INDEX new_b_index; -SET @save_dbug=@@debug_dbug; +SET @saved_dbug=@@debug_dbug; SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index"; --error ER_NO_PARTITION_FOR_GIVEN_VALUE @@ -46,7 +46,7 @@ SHOW CREATE TABLE t1; --sorted_result SELECT * FROM t1; -SET SESSION debug_dbug = @save_dbug; +SET SESSION debug_dbug = @saved_dbug; SHOW CREATE TABLE t1; DROP TABLE t1; } diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result index 27243b52422..24f6a448334 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result index 7879919b09d..a4072a4681a 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result index 1d5923483c9..277eb5a57f3 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result index 87fc75817df..716089f7022 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result index 949fa8f9c3e..e7ef6c05d4b 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN null LAST_ERROR_SEEN null revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result index b2e0fb60811..a516f77a66d 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result index bfc7fde5be8..d6212a009cb 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -103,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result index 41eb9636e31..08f4152fdcc 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result index 22dd7e7632c..7dd56fffdca 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; uninstall plugin test_plugin_server; ERROR HY000: Plugin 'test_plugin_server' is not loaded @@ -194,5 +195,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com' FROM 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result index f301df94ce6..33000173925 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result @@ -25,6 +25,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply"; ERROR 08S01: Bad handshake connection default; @@ -427,4 +428,4 @@ drop user 'root'@'santa.claus.ipv4.example.com'; revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result index 14a6ace09e4..8af7cadda99 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result index 6cca75f9775..75d784e3381 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result @@ -25,6 +25,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,; select "Con2a is alive"; @@ -702,4 +703,4 @@ disconnect tmp_con7; set global max_connections = @saved_max_connections; set global max_user_connections = @saved_max_user_connections; drop user 'quota'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result index 5aa80d90d84..6f80a0883a3 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -178,4 +179,4 @@ revoke select on test.* from 'root'@'192.0.2.4'; revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'192.0.2.4'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result index abe9a606bc4..0a80efd3333 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -142,4 +143,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result index 18986674491..9499789334b 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result index 88ac817ce17..2592a003d59 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result index a5f70873ed9..fc20f4e1c2f 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES) connection default; @@ -207,4 +208,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set drop user 'user_with'@'santa.claus.ipv4.example.com'; drop user 'user_without'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result index 86e7bf5780b..c7ae1cdd12f 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result @@ -28,6 +28,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO) connection default; @@ -151,4 +152,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set drop user 'user_ssl'@'santa.claus.ipv4.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result index 42d86e858fb..330aaa57b1d 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result index 87e97ba2138..dd730123cc4 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result index bcd47243d03..c613bda07ba 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result index 5c24a86248a..32fcc37b75b 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result index 68ea9a1d826..2558047ab62 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN null LAST_ERROR_SEEN null revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result index 5b1f546b30e..a4da4f54058 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result @@ -19,6 +19,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server connection default; @@ -80,4 +81,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result index 0a3a3329c1e..e4da1079176 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -103,4 +104,4 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result index 493ada909b7..2aeb0189da4 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result index a36d1442ee6..0897fdd1872 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; uninstall plugin test_plugin_server; ERROR HY000: Plugin 'test_plugin_server' is not loaded @@ -194,5 +195,5 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com' FROM 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result index 7cfb6f87277..c4d482a6b12 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result @@ -25,6 +25,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply"; ERROR 08S01: Bad handshake connection default; @@ -427,4 +428,4 @@ drop user 'root'@'santa.claus.ipv6.example.com'; revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result index f9d2b556804..a77603b6e99 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result @@ -25,6 +25,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect con2a,"::1",quota,,test,$MASTER_MYPORT,; select "Con2a is alive"; @@ -702,4 +703,4 @@ disconnect tmp_con7; set global max_connections = @saved_max_connections; set global max_user_connections = @saved_max_user_connections; drop user 'quota'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result index 6140f655e7c..3227b1eec67 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -178,4 +179,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'2001:db8::6:6'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result index 22ce0c3e809..b801010e0b7 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -142,4 +143,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result index a78ba09513c..a17421161f9 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result @@ -22,6 +22,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; connect con2,"::1",root,,test,$MASTER_MYPORT,; select "Con2 is alive"; @@ -99,4 +100,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result index da1570f1b37..dd1b2f89ac3 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result @@ -20,6 +20,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server connection default; @@ -81,4 +82,4 @@ COUNT_LOCAL_ERRORS 0 COUNT_UNKNOWN_ERRORS 0 FIRST_ERROR_SEEN set LAST_ERROR_SEEN set -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result index a4cc3eeb0d0..6d6362b2874 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result @@ -24,6 +24,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES) connection default; @@ -207,4 +208,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set drop user 'user_with'@'santa.claus.ipv6.example.com'; drop user 'user_without'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result index 75f8e5391cf..61c98b0c868 100644 --- a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result +++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result @@ -28,6 +28,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO) connection default; @@ -151,4 +152,4 @@ FIRST_ERROR_SEEN set LAST_ERROR_SEEN set drop user 'user_ssl'@'santa.claus.ipv6.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result index ddb44157f44..d88a240a2b7 100644 --- a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result +++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result @@ -27,6 +27,7 @@ current_user() root@localhost disconnect con1; connection default; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_error"; ERROR HY000: Can't get hostname for your address connection default; @@ -50,7 +51,7 @@ Connection_errors_peer_address 2 Connection_errors_select 0 Connection_errors_tcpwrap 0 "Dumping performance_schema.host_cache" -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; flush status; show global status like "connection_errors_%"; Variable_name Value diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test index 6bed01e50bf..07a6f14f114 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test @@ -27,6 +27,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -48,5 +49,5 @@ disconnect con3; revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test index 3c72de8a05e..1218538d173 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test @@ -25,6 +25,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again"; --disable_query_log @@ -43,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test index 5cbe4c30530..285563ddc62 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test @@ -30,6 +30,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -51,5 +52,5 @@ disconnect con3; revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test index c0639cd6b86..a7d197e03d1 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test @@ -27,6 +27,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4"; --disable_query_log @@ -45,5 +46,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test index 3b69e0731a0..0f8881e3caa 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test @@ -28,6 +28,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -49,5 +50,5 @@ disconnect con3; revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test index e6478c13951..dd2c7209e54 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test @@ -25,6 +25,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; --disable_query_log @@ -43,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test index b4b11526af6..12f82b2a52c 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test @@ -30,6 +30,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -53,5 +54,5 @@ revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test index 06f0f7d29ee..28030802afb 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test @@ -25,6 +25,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname"; --disable_query_log @@ -43,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test index 325460e66ba..3e487f38636 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test @@ -30,6 +30,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; uninstall plugin test_plugin_server; @@ -86,6 +87,6 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com' DROP USER 'plug'@'santa.claus.ipv4.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test index 6990a4e7118..59cd855feaf 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test @@ -33,6 +33,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply"; --disable_query_log @@ -156,5 +157,5 @@ revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test index b37bfc79ada..a7c0117284d 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test @@ -24,6 +24,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4"; --disable_query_log @@ -42,5 +43,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test index c0349184506..904de7335ee 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test @@ -31,6 +31,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; connect (con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,); @@ -259,5 +260,5 @@ set global max_user_connections = @saved_max_user_connections; # revoke all privileges on test.* from 'quota'@'santa.claus.ipv4.example.com'; drop user 'quota'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test index 187879985c9..0a83bc51f12 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test @@ -30,6 +30,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -71,5 +72,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv4.example.com'; drop user 'root'@'192.0.2.4'; drop user 'root'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test index a78c0dab4eb..465133859d2 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test @@ -25,6 +25,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again"; --disable_query_log @@ -61,5 +62,5 @@ connect (con5,"127.0.0.1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test index 23ecd51eb4f..15153dd07aa 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test @@ -28,6 +28,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; connect (con2,"127.0.0.1",root,,test,$MASTER_MYPORT,); @@ -49,5 +50,5 @@ disconnect con3; revoke select on test.* from 'root'@'192.0.2.4'; drop user 'root'@'192.0.2.4'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test index 4b6c91c3df3..9df41d429f2 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test @@ -25,6 +25,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname"; --disable_query_log @@ -43,5 +44,5 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test index ea331647b48..064200f80b8 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_passwd.test @@ -29,6 +29,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; --disable_query_log @@ -82,5 +83,5 @@ connect (con2f,"127.0.0.1",user_with,wrong_password,test,$MASTER_MYPORT,); drop user 'user_with'@'santa.claus.ipv4.example.com'; drop user 'user_without'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test index 2b949098bad..116ad07dd68 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_ssl.test @@ -30,6 +30,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4"; --disable_query_log @@ -67,5 +68,5 @@ connect (con2d,"127.0.0.1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL) drop user 'user_ssl'@'santa.claus.ipv4.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test index 11c45724f70..a45da8c614a 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_allow.test @@ -29,6 +29,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -50,5 +51,5 @@ disconnect con3; revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test index bdbc0e3c025..c9102366a7d 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test @@ -26,6 +26,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again"; --disable_query_log @@ -44,5 +45,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test index 1eb0d3ec41f..e6c5c9c7d7b 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_allow.test @@ -31,6 +31,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -52,5 +53,5 @@ disconnect con3; revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test index f8a3cc23c00..7a9fa037079 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test @@ -28,6 +28,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6"; --disable_query_log @@ -46,5 +47,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test index 6493bb61a1a..507e04f8d3f 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test @@ -29,6 +29,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -50,5 +51,5 @@ disconnect con3; revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test index 065ae02dd49..5bd4d8a7bd0 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test @@ -22,6 +22,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; --disable_query_log @@ -40,5 +41,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test index 9ebafc9627d..dd790e77dbd 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_allow.test @@ -31,6 +31,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -54,5 +55,4 @@ revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; - +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test index 136b3c7a24f..c6cb78da508 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test @@ -26,6 +26,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname"; --disable_query_log @@ -44,5 +45,4 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; - +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test index 3a822bfacb3..e8b8c42fd8a 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_auth_plugin.test @@ -31,6 +31,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; uninstall plugin test_plugin_server; @@ -87,6 +88,6 @@ REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com' DROP USER 'plug'@'santa.claus.ipv6.example.com'; DROP USER 'plug_dest'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; delete from mysql.plugin where name='test_plugin_server'; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test index 0a04ec306cf..b28917d6ddd 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test @@ -33,6 +33,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply"; --disable_query_log @@ -156,5 +157,5 @@ revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com'; set global max_connect_errors = @saved_max_connect_errors; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test index b14fff1cc72..a2782619b15 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test @@ -32,6 +32,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; connect (con2a,"::1",quota,,test,$MASTER_MYPORT,); @@ -241,5 +242,5 @@ set global max_user_connections = @saved_max_user_connections; # revoke all privileges on test.* from 'quota'@'santa.claus.ipv6.example.com'; drop user 'quota'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test index b44b58eb0d5..c1cc68a10e1 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_allow.test @@ -31,6 +31,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -72,5 +73,5 @@ revoke select on test.* from 'root'@'santa.claus.ipv6.example.com'; drop user 'root'@'2001:db8::6:6'; drop user 'root'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test index 073451c7e75..80fccd6924f 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test @@ -26,6 +26,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again"; --disable_query_log @@ -62,5 +63,5 @@ connect (con5,"::1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test index a7b1a961f09..af809674711 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_allow.test @@ -29,6 +29,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; connect (con2,"::1",root,,test,$MASTER_MYPORT,); @@ -50,5 +51,5 @@ disconnect con3; revoke select on test.* from 'root'@'2001:db8::6:6'; drop user 'root'@'2001:db8::6:6'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test index 5c3d643b166..5e3f3b605d4 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test @@ -26,6 +26,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname"; --disable_query_log @@ -44,5 +45,5 @@ connect (con3,"::1",root,,test,$MASTER_MYPORT,); --connection default --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test index 7dcfbb922e5..a5d635d6133 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_passwd.test @@ -27,6 +27,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; --disable_query_log @@ -80,5 +81,5 @@ connect (con2f,"::1",user_with,wrong_password,test,$MASTER_MYPORT,); drop user 'user_with'@'santa.claus.ipv6.example.com'; drop user 'user_without'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test index 3ea4451c7aa..9821b4f8882 100644 --- a/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test +++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_ssl.test @@ -31,6 +31,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6"; --disable_query_log @@ -68,5 +69,5 @@ connect (con2d,"::1",user_ssl_x509,good_password,test,$MASTER_MYPORT,,SSL); drop user 'user_ssl'@'santa.claus.ipv6.example.com'; drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com'; -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; diff --git a/mysql-test/suite/perfschema/t/hostcache_peer_addr.test b/mysql-test/suite/perfschema/t/hostcache_peer_addr.test index 65f33ce73a8..cd36c88ffae 100644 --- a/mysql-test/suite/perfschema/t/hostcache_peer_addr.test +++ b/mysql-test/suite/perfschema/t/hostcache_peer_addr.test @@ -22,6 +22,7 @@ select current_user(); disconnect con1; --connection default +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= "+d,vio_peer_addr_error"; --disable_query_log @@ -42,7 +43,7 @@ connect (con3,"127.0.0.1",root,,test,$MASTER_MYPORT,); show global status like "connection_errors_%"; --source ../include/hostcache_dump.inc -set global debug_dbug= default; +set @@global.debug_dbug = @saved_dbug; flush status; show global status like "connection_errors_%"; diff --git a/mysql-test/suite/rpl/r/kill_race_condition.result b/mysql-test/suite/rpl/r/kill_race_condition.result index 1181eb0b0b1..4da61a78eb9 100644 --- a/mysql-test/suite/rpl/r/kill_race_condition.result +++ b/mysql-test/suite/rpl/r/kill_race_condition.result @@ -4,6 +4,7 @@ connection master; create table t1 (a int); connection slave; connection slave; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug='d,rows_log_event_before_open_table'; connection master; insert t1 values (1),(2),(3); @@ -13,7 +14,7 @@ kill slave_sql_thread; set debug_sync='now SIGNAL go_ahead_sql'; include/wait_for_slave_sql_error.inc [errno=1927] Last_SQL_Error = Error executing row event: 'Connection was killed' -set global debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; set debug_sync='RESET'; connection master; drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result index 74ba945b027..a3d60a672a9 100644 --- a/mysql-test/suite/rpl/r/rpl_bug33931.result +++ b/mysql-test/suite/rpl/r/rpl_bug33931.result @@ -5,10 +5,11 @@ call mtr.add_suppression("Failed during slave I/O thread initialization"); call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593"); include/stop_slave.inc reset slave; +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; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Failed during slave thread initialization' -SET GLOBAL debug_dbug=""; +set @@global.debug_dbug = @saved_dbug; RESET SLAVE; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_bug41902.result b/mysql-test/suite/rpl/r/rpl_bug41902.result index 8667795bd77..de594d39a98 100644 --- a/mysql-test/suite/rpl/r/rpl_bug41902.result +++ b/mysql-test/suite/rpl/r/rpl_bug41902.result @@ -2,6 +2,7 @@ include/master-slave.inc [connection master] connection slave; stop slave; +set @saved_dbug = @@global.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; reset slave; ERROR HY000: Target log not found in binlog index @@ -19,6 +20,7 @@ SET @@debug_dbug=""; reset slave; change master to master_host='dummy'; connection master; +set @saved_dbug_m = @@global.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; reset master; ERROR HY000: Target log not found in binlog index @@ -29,6 +31,7 @@ purge binary logs to 'master-bin.000001'; ERROR HY000: Target log not found in binlog index SET @@debug_dbug=""; purge binary logs to 'master-bin.000001'; +set @@global.debug_dbug = @saved_dbug; ==== clean up ==== CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_checksum.result b/mysql-test/suite/rpl/r/rpl_checksum.result index a74b688d722..7a8644f6bea 100644 --- a/mysql-test/suite/rpl/r/rpl_checksum.result +++ b/mysql-test/suite/rpl/r/rpl_checksum.result @@ -76,6 +76,7 @@ connection master; set @@global.binlog_checksum = CRC32; insert into t1 values (1) /* will not be applied on slave due to simulation */; connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_slave_unaware_checksum'; start slave; include/wait_for_slave_io_error.inc [errno=1236] @@ -83,15 +84,16 @@ Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary select count(*) as zero from t1; zero 0 -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; connection slave; include/start_slave.inc connection master; set @@global.master_verify_checksum = 1; +set @save_dbug = @@session.debug_dbug; set @@session.debug_dbug='d,simulate_checksum_test_failure'; show binlog events; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error -set @@session.debug_dbug=''; +set debug_dbug= @save_dbug; set @@global.master_verify_checksum = default; connection slave; connection slave; @@ -99,10 +101,11 @@ include/stop_slave.inc connection master; create table t2 (a int); connection slave; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave io_thread; include/wait_for_slave_io_error.inc [errno=1595,1913] -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; start slave io_thread; include/wait_for_slave_param.inc [Read_Master_Log_Pos] set @@global.slave_sql_verify_checksum = 1; @@ -110,7 +113,7 @@ set @@global.debug_dbug='d,simulate_checksum_test_failure'; start slave sql_thread; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Error initializing relay log position: I/O error reading event at position 4' -set @@global.debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; include/start_slave.inc connection master; connection slave; diff --git a/mysql-test/suite/rpl/r/rpl_corruption.result b/mysql-test/suite/rpl/r/rpl_corruption.result index 25a82fd60cd..db72bb304fc 100644 --- a/mysql-test/suite/rpl/r/rpl_corruption.result +++ b/mysql-test/suite/rpl/r/rpl_corruption.result @@ -13,6 +13,7 @@ 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"; SHOW BINLOG EVENTS; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error @@ -55,9 +56,9 @@ connection slave; include/diff_tables.inc [master:test.t1, slave:test.t1] # 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; connection slave; -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result b/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result index cf26c3bf04a..dc45c0b9ab3 100644 --- a/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result +++ b/mysql-test/suite/rpl/r/rpl_heartbeat_debug.result @@ -7,7 +7,7 @@ set @@global.slave_net_timeout= 10; show status like 'Slave_heartbeat_period';; Variable_name Slave_heartbeat_period Value 60.000 -SET @save_dbug= @@GLOBAL.debug_dbug; +SET @saved_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error"; CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error'); CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again'); @@ -25,7 +25,7 @@ connection master; drop table t1; connection slave; include/stop_slave.inc -SET GLOBAL debug_dbug=@save_dbug; +SET GLOBAL debug_dbug=@saved_dbug; set @@global.slave_net_timeout= @restore_slave_net_timeout; include/start_slave.inc include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_incident.result b/mysql-test/suite/rpl/r/rpl_incident.result index 8fb4aa907cc..6dbe4417c5a 100644 --- a/mysql-test/suite/rpl/r/rpl_incident.result +++ b/mysql-test/suite/rpl/r/rpl_incident.result @@ -14,6 +14,7 @@ a 1 2 3 +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,incident_database_resync_on_replace,*'; REPLACE INTO t1 VALUES (4); SELECT * FROM t1; @@ -22,6 +23,7 @@ a 2 3 4 +set @@global.debug_dbug = @saved_dbug; connection slave; call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occurred on the master.* 1590"); include/wait_for_slave_sql_error.inc [errno=1590] diff --git a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result index 91742814b4c..fc23734c645 100644 --- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result +++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result @@ -4,12 +4,13 @@ connection slave; stop slave; reset slave; connection slave; +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; include/wait_for_slave_sql_error.inc [errno=1593] Last_SQL_Error = 'Failed during slave thread initialization' call mtr.add_suppression("Failed during slave.* thread initialization"); -SET GLOBAL debug_dbug= ""; +set @@global.debug_dbug = @saved_dbug; connection slave; reset slave; SET GLOBAL init_slave= "garbage"; diff --git a/mysql-test/suite/rpl/r/rpl_row_big_table_id.result b/mysql-test/suite/rpl/r/rpl_row_big_table_id.result index 6fece52dda3..8d22289370b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_big_table_id.result +++ b/mysql-test/suite/rpl/r/rpl_row_big_table_id.result @@ -2,6 +2,7 @@ include/master-slave.inc [connection master] connection master; include/rpl_restart_server.inc [server_number=1] +set @saved_dbug = @@session.debug_dbug; SET @@debug_dbug="d,simulate_big_table_id"; CREATE TABLE t (a int); INSERT INTO t SET a= 0; @@ -42,5 +43,6 @@ master-bin.000002 # Query 1 # COMMIT connection slave; connection master; DROP TABLE t; +set debug_dbug= @saved_dbug; connection slave; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result index 491fb68615c..118266399fb 100644 --- a/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result +++ b/mysql-test/suite/rpl/r/rpl_row_find_row_debug.result @@ -2,6 +2,7 @@ include/master-slave.inc [connection master] connection slave; include/stop_slave.inc +set @saved_dbug = @@global.debug_dbug; SET GLOBAL log_warnings = 2; SET GLOBAL debug_dbug="d,inject_long_find_row_note"; include/start_slave.inc @@ -17,7 +18,7 @@ connection slave; # Check if any note related to long DELETE_ROWS and UPDATE_ROWS appears in the error log Occurrences: update=1, delete=1 include/stop_slave.inc -SET GLOBAL debug_dbug = ''; +set @@global.debug_dbug = @saved_dbug; SET GLOBAL log_warnings = 2; include/start_slave.inc include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result b/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result index ec9607148d4..62d4ea896ef 100644 --- a/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result +++ b/mysql-test/suite/rpl/r/rpl_semi_sync_skip_repl.result @@ -11,6 +11,7 @@ SET @@GLOBAL.rpl_semi_sync_slave_enabled = 1; include/start_slave.inc connection master; CREATE TABLE t1 (a INT) ENGINE=innodb; +set @saved_dbug = @@global.debug_dbug; SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB"; SET @@SESSION.skip_replication=1; INSERT INTO t1 SET a=1; @@ -20,7 +21,7 @@ SET @@GLOBAL.debug_dbug=""; FLUSH LOGS; connection slave; connection master; -SET @@GLOBAL.debug_dbug=@@GLOBAL.debug_dbug; +set @@global.debug_dbug = @saved_dbug; SET @@GLOBAL.rpl_semi_sync_master_timeout = 10000; SET @@GLOBAL.rpl_semi_sync_master_enabled = 0; connection master; diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_running.result b/mysql-test/suite/rpl/r/rpl_show_slave_running.result index 729c718390a..a668b8b26f3 100644 --- a/mysql-test/suite/rpl/r/rpl_show_slave_running.result +++ b/mysql-test/suite/rpl/r/rpl_show_slave_running.result @@ -3,6 +3,7 @@ include/master-slave.inc connection slave; SET DEBUG_SYNC= 'RESET'; include/stop_slave.inc +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= 'd,dbug.before_get_running_status_yes'; Slave_running, Slave_IO_Running, Slave_SQL_Running, must be OFF, NO, NO in three following queries SHOW STATUS LIKE 'Slave_running'; @@ -34,7 +35,7 @@ Slave_running ON Slave_IO_Running= Yes Slave_SQL_Running= Yes connection slave; -set global debug_dbug= ''; +set @@global.debug_dbug = @saved_dbug; SET DEBUG_SYNC= 'RESET'; End of tests include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result index be2a17ea2b7..aac0d956e6c 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result +++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result @@ -1,6 +1,7 @@ include/master-slave.inc [connection master] connection slave; +set @saved_dbug = @@global.debug_dbug; SET @@global.debug_dbug= '+d,remove_slave_load_file_before_write'; connection master; create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb; @@ -21,5 +22,5 @@ call mtr.add_suppression("Slave: Can't get stat of .*"); call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* error.* 13"); call mtr.add_suppression("Slave: File.* not found.*"); call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29"); -SET @@global.debug_dbug= ''; +set @@global.debug_dbug = @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stop_slave.result index 2417c5abda8..e5ef1224033 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result @@ -15,6 +15,7 @@ include/stop_slave.inc # Suspend the INSERT statement in current transaction on SQL thread. # It guarantees that SQL thread is applying the transaction when # STOP SLAVE command launchs. +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,after_mysql_insert,*'; include/start_slave.inc @@ -74,6 +75,7 @@ connection master; connection slave; # Test end +set @@global.debug_dbug = @saved_dbug; include/restart_slave.inc connection slave; call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group"); @@ -98,6 +100,7 @@ connection slave; include/stop_slave.inc connection master; include/stop_dump_threads.inc +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*'; connection slave; include/start_slave.inc @@ -120,6 +123,7 @@ connection slave; include/wait_for_slave_to_stop.inc connection slave1; connection master; +set @@global.debug_dbug = @saved_dbug; include/stop_dump_threads.inc connection slave1; include/start_slave.inc diff --git a/mysql-test/suite/rpl/r/rpl_view_debug.result b/mysql-test/suite/rpl/r/rpl_view_debug.result index 22032c3fb90..1f2f7f2ab15 100644 --- a/mysql-test/suite/rpl/r/rpl_view_debug.result +++ b/mysql-test/suite/rpl/r/rpl_view_debug.result @@ -21,6 +21,7 @@ Tables_in_test t1 v1 connection master; +set @saved_dbug = @@session.debug_dbug; set @@debug_dbug="d,simulate_register_view_failure"; CREATE VIEW v2 as SELECT * FROM t1; ERROR HY000: Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space @@ -36,4 +37,5 @@ v1 connection master; DROP VIEW IF EXISTS v1; DROP TABLE t1; +set debug_dbug= @saved_dbug; include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/kill_race_condition.test b/mysql-test/suite/rpl/t/kill_race_condition.test index 0f3b44864fe..79e1270b13c 100644 --- a/mysql-test/suite/rpl/t/kill_race_condition.test +++ b/mysql-test/suite/rpl/t/kill_race_condition.test @@ -7,6 +7,7 @@ create table t1 (a int); --sync_slave_with_master connection slave; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug='d,rows_log_event_before_open_table'; connection master; @@ -22,7 +23,7 @@ set debug_sync='now SIGNAL go_ahead_sql'; --source include/wait_for_slave_sql_error.inc let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); --echo Last_SQL_Error = $error -set global debug_dbug=''; +set @@global.debug_dbug = @saved_dbug; set debug_sync='RESET'; connection master; drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test index 2273219a821..c5e88fd68bf 100644 --- a/mysql-test/suite/rpl/t/rpl_bug33931.test +++ b/mysql-test/suite/rpl/t/rpl_bug33931.test @@ -15,6 +15,7 @@ call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* reset 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"; --disable_query_log @@ -39,7 +40,7 @@ start slave; # # Cleanup # -SET GLOBAL debug_dbug=""; +set @@global.debug_dbug = @saved_dbug; # Clear Last_SQL_Error RESET SLAVE; diff --git a/mysql-test/suite/rpl/t/rpl_bug41902.test b/mysql-test/suite/rpl/t/rpl_bug41902.test index fe9452b0eda..21a556b9c8e 100644 --- a/mysql-test/suite/rpl/t/rpl_bug41902.test +++ b/mysql-test/suite/rpl/t/rpl_bug41902.test @@ -15,7 +15,7 @@ source include/master-slave.inc; connection slave; stop slave; - +set @saved_dbug = @@global.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; --error ER_UNKNOWN_TARGET_BINLOG @@ -36,6 +36,7 @@ reset slave; change master to master_host='dummy'; connection master; +set @saved_dbug_m = @@global.debug_dbug; SET @@debug_dbug="d,simulate_find_log_pos_error"; --error ER_UNKNOWN_TARGET_BINLOG reset master; @@ -53,10 +54,12 @@ purge binary logs to 'master-bin.000001'; --disable_query_log call mtr.add_suppression("Failed to locate old binlog or relay log files"); call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index"); +set @@global.debug_dbug = @saved_dbug_m; connection slave; call mtr.add_suppression("Failed to locate old binlog or relay log files"); call mtr.add_suppression("MYSQL_BIN_LOG::purge_logs was called with file ..master-bin.000001 not listed in the index"); --enable_query_log +set @@global.debug_dbug = @saved_dbug; --echo ==== clean up ==== CHANGE MASTER TO MASTER_HOST = '127.0.0.1'; diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test index dca32c30a94..ac625e0b21a 100644 --- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test +++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test @@ -26,7 +26,7 @@ call mtr.add_suppression("Fatal error: The slave I/O thread stops because master call mtr.add_suppression("Slave I/O thread .* register on master"); #Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection -let $debug_saved= `select @@global.debug`; +set @saved_dbug = @@global.debug_dbug; # set up two parameters to pass into extra/rpl_tests/rpl_get_master_version_and_clock let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP'; @@ -40,11 +40,9 @@ let $dbug_sync_point= 'debug_lock.before_get_SERVER_ID'; let $debug_sync_action= 'now SIGNAL signal.get_server_id'; source extra/rpl_tests/rpl_get_master_version_and_clock.test; -eval set global debug_dbug= '$debug_saved'; - # cleanup - +set @@global.debug_dbug = @saved_dbug; # is not really necessary but avoids mtr post-run env check warnings SET DEBUG_SYNC= 'RESET'; diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test index 6a426ed1e9f..bd66a249ada 100644 --- a/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test +++ b/mysql-test/suite/rpl/t/rpl_heartbeat_debug.test @@ -18,7 +18,7 @@ set @@global.slave_net_timeout= 10; # default period slave_net_timeout/2 # --query_vertical show status like 'Slave_heartbeat_period'; -SET @save_dbug= @@GLOBAL.debug_dbug; +SET @saved_dbug= @@GLOBAL.debug_dbug; SET GLOBAL debug_dbug="+d,simulate_slave_heartbeat_network_error"; CALL mtr.add_suppression('SET @master_heartbeat_period to master failed with error'); CALL mtr.add_suppression('Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again'); @@ -44,7 +44,7 @@ drop table t1; connection slave; --source include/stop_slave.inc --disable_warnings -SET GLOBAL debug_dbug=@save_dbug; +SET GLOBAL debug_dbug=@saved_dbug; set @@global.slave_net_timeout= @restore_slave_net_timeout; --enable_warnings --source include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_big_table_id.test b/mysql-test/suite/rpl/t/rpl_row_big_table_id.test index 0c6f9d5e862..07e5aee4560 100644 --- a/mysql-test/suite/rpl/t/rpl_row_big_table_id.test +++ b/mysql-test/suite/rpl/t/rpl_row_big_table_id.test @@ -17,6 +17,7 @@ --let $rpl_server_number= 1 --source include/rpl_restart_server.inc +set @saved_dbug = @@session.debug_dbug; SET @@debug_dbug="d,simulate_big_table_id"; CREATE TABLE t (a int); @@ -51,7 +52,7 @@ if (`SELECT sum(a) != 6 FROM t`) --connection master DROP TABLE t; - +set debug_dbug= @saved_dbug; --sync_slave_with_master --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test index fb7491b0077..41a107e217d 100644 --- a/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test +++ b/mysql-test/suite/rpl/t/rpl_row_find_row_debug.test @@ -9,7 +9,7 @@ # - setup log_warnings and debug --connection slave --source include/stop_slave.inc ---let $debug_save= `SELECT @@GLOBAL.debug_dbug` +set @saved_dbug = @@global.debug_dbug; --let $log_warnings_save= `SELECT @@GLOBAL.log_warnings` SET GLOBAL log_warnings = 2; @@ -55,7 +55,7 @@ EOF # cleanup --source include/stop_slave.inc ---eval SET GLOBAL debug_dbug = '$debug_save' +set @@global.debug_dbug = @saved_dbug; --eval SET GLOBAL log_warnings = $log_warnings_save --source include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_index_choice.test b/mysql-test/suite/rpl/t/rpl_row_index_choice.test index 0ad9b315d66..89b14add3b0 100644 --- a/mysql-test/suite/rpl/t/rpl_row_index_choice.test +++ b/mysql-test/suite/rpl/t/rpl_row_index_choice.test @@ -47,6 +47,7 @@ sync_slave_with_master; connection slave; ANALYZE TABLE t2; --echo # Slave will crash if using the wrong or no index +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug="+d,slave_crash_if_wrong_index,slave_crash_if_table_scan"; connection master; @@ -238,6 +239,5 @@ connection master; DROP TABLE t1; sync_slave_with_master; connection slave; -SET GLOBAL debug_dbug=""; - +set @@global.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test b/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test index 8c00bae06cd..2558792b438 100644 --- a/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test +++ b/mysql-test/suite/rpl/t/rpl_semi_sync_skip_repl.test @@ -33,7 +33,7 @@ source include/start_slave.inc; CREATE TABLE t1 (a INT) ENGINE=innodb; # Make the following events as if they offset over 2GB from the beginning of binlog ---let $sav_debug_dbug=@@GLOBAL.debug_dbug +set @saved_dbug = @@global.debug_dbug; SET @@GLOBAL.debug_dbug="d,dbug_master_binlog_over_2GB"; SET @@SESSION.skip_replication=1; INSERT INTO t1 SET a=1; @@ -51,7 +51,7 @@ FLUSH LOGS; # Clean up # --connection master ---eval SET @@GLOBAL.debug_dbug=$sav_debug_dbug +set @@global.debug_dbug = @saved_dbug; --eval SET @@GLOBAL.rpl_semi_sync_master_timeout = $sav_timeout_master --eval SET @@GLOBAL.rpl_semi_sync_master_enabled = $sav_enabled_master diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_running.test b/mysql-test/suite/rpl/t/rpl_show_slave_running.test index 2cb44fc6ac1..33151bb87a4 100644 --- a/mysql-test/suite/rpl/t/rpl_show_slave_running.test +++ b/mysql-test/suite/rpl/t/rpl_show_slave_running.test @@ -11,7 +11,7 @@ connection slave; SET DEBUG_SYNC= 'RESET'; source include/stop_slave.inc; -let $debug_saved= `select @@global.debug`; +set @saved_dbug = @@global.debug_dbug; set global debug_dbug= 'd,dbug.before_get_running_status_yes'; # to block due-started IO # Test 1. Slave is stopped @@ -77,7 +77,7 @@ echo Slave_SQL_Running= $status; connection slave; -eval set global debug_dbug= '$debug_saved'; +set @@global.debug_dbug = @saved_dbug; SET DEBUG_SYNC= 'RESET'; --echo End of tests --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test index 69319bad4a0..554ff564a0d 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test +++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test @@ -29,7 +29,7 @@ ########################################################################## connection slave; ---let $old_debug= `SELECT @@global.debug_dbug` +set @saved_dbug = @@global.debug_dbug; SET @@global.debug_dbug= '+d,remove_slave_load_file_before_write'; connection master; @@ -74,7 +74,7 @@ call mtr.add_suppression("Slave: File.* not found.*"); call mtr.add_suppression("Slave SQL: Error .File.* not found.* error.* 29"); --let $rpl_only_running_threads= 1 -eval SET @@global.debug_dbug= '$old_debug'; +set @@global.debug_dbug = @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stop_slave.test index 5071fd348fb..c1130f1955e 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test @@ -22,7 +22,7 @@ source include/stop_slave.inc; --echo # Suspend the INSERT statement in current transaction on SQL thread. --echo # It guarantees that SQL thread is applying the transaction when --echo # STOP SLAVE command launchs. -let $debug_save= `SELECT @@GLOBAL.debug`; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,after_mysql_insert,*'; source include/start_slave.inc; @@ -44,9 +44,7 @@ source extra/rpl_tests/rpl_stop_slave.test; --echo --echo # Test end ---disable_query_log -eval SET GLOBAL debug_dbug= '$debug_save'; ---enable_query_log +set @@global.debug_dbug = @saved_dbug; source include/restart_slave_sql.inc; connection slave; @@ -79,7 +77,7 @@ connection master; # make sure that there are no zombie threads --source include/stop_dump_threads.inc -let $debug_save= `SELECT @@GLOBAL.debug`; +set @saved_dbug = @@global.debug_dbug; SET GLOBAL debug_dbug= '+d,dump_thread_wait_before_send_xid,*'; connection slave; @@ -126,9 +124,7 @@ reap; # sure that we disable the DBUG_EXECUTE_IF # that would set the dump thread to wait connection master; ---disable_query_log -eval SET GLOBAL debug_dbug= '$debug_save'; ---enable_query_log +set @@global.debug_dbug = @saved_dbug; # make sure that there are no zombie threads --source include/stop_dump_threads.inc diff --git a/mysql-test/suite/rpl/t/rpl_view_debug.test b/mysql-test/suite/rpl/t/rpl_view_debug.test index a00b6733dea..ef59d25bf45 100644 --- a/mysql-test/suite/rpl/t/rpl_view_debug.test +++ b/mysql-test/suite/rpl/t/rpl_view_debug.test @@ -18,6 +18,7 @@ sync_slave_with_master; # view already has to be on slave show tables; connection master; +set @saved_dbug = @@session.debug_dbug; set @@debug_dbug="d,simulate_register_view_failure"; --error ER_OUT_OF_RESOURCES @@ -30,5 +31,5 @@ show tables; connection master; DROP VIEW IF EXISTS v1; DROP TABLE t1; - +set debug_dbug= @saved_dbug; --source include/rpl_end.inc diff --git a/mysql-test/t/cache_temporal_4265.test b/mysql-test/t/cache_temporal_4265.test index c62f3c3c506..1af683c617b 100644 --- a/mysql-test/t/cache_temporal_4265.test +++ b/mysql-test/t/cache_temporal_4265.test @@ -5,9 +5,9 @@ create table t1 (a date); insert t1 values ('2000-01-02'), ('2001-02-03'), ('2002-03-04'); -set debug_dbug='d,str_to_datetime_warn'; -select * from t1 where a > date_add('2000-01-01', interval 5 day); -set debug_dbug=''; + +SET STATEMENT debug_dbug='d,str_to_datetime_warn' for + select * from t1 where a > date_add('2000-01-01', interval 5 day); drop table t1; # diff --git a/mysql-test/t/drop_bad_db_type.test b/mysql-test/t/drop_bad_db_type.test index 6a3ac6ae00f..aa729217e50 100644 --- a/mysql-test/t/drop_bad_db_type.test +++ b/mysql-test/t/drop_bad_db_type.test @@ -7,7 +7,7 @@ if (!$HA_ARCHIVE_SO) { let $mysqld_datadir= `select @@datadir`; -SET @save_dbug = @@debug_dbug; +SET @saved_dbug = @@debug_dbug; set debug_dbug='+d,unstable_db_type'; install soname 'ha_archive'; @@ -28,4 +28,4 @@ drop table t1; --list_files $mysqld_datadir/test uninstall soname 'ha_archive'; -set debug_dbug=@save_dbug; +set debug_dbug=@saved_dbug; diff --git a/mysql-test/t/engine_error_in_alter-8453.test b/mysql-test/t/engine_error_in_alter-8453.test index c4600ec07fe..915a47570a3 100644 --- a/mysql-test/t/engine_error_in_alter-8453.test +++ b/mysql-test/t/engine_error_in_alter-8453.test @@ -4,8 +4,9 @@ --source include/have_debug.inc create table t1 (a int, b int); +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,external_lock_failure'; --error ER_GET_ERRMSG alter table t1 add column c int; -set debug_dbug=''; +set debug_dbug= @saved_dbug; drop table t1; diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test index 1debed871c7..c6ce8092029 100644 --- a/mysql-test/t/error_simulation.test +++ b/mysql-test/t/error_simulation.test @@ -21,6 +21,7 @@ set tmp_table_size=1024; # Set debug flag so an error is returned when # tmp table in query is converted from heap to myisam +set @saved_dbug = @@session.debug_dbug; set session debug_dbug="+d,raise_error"; --error ER_DUP_KEY @@ -36,7 +37,7 @@ CREATE TABLE t1 (a INT(100) NOT NULL); INSERT INTO t1 VALUES (1), (0), (2); SET SESSION debug_dbug='+d,alter_table_only_index_change'; ALTER TABLE t1 ADD INDEX a(a); -SET SESSION debug_dbug=DEFAULT; +set debug_dbug= @saved_dbug; SHOW CREATE TABLE t1; SELECT * FROM t1; DROP TABLE t1; @@ -51,7 +52,7 @@ SET SESSION debug_dbug="+d,bug42064_simulate_oom"; # May fail with either ER_OUT_OF_RESOURCES or EE_OUTOFMEMORY --error ER_OUT_OF_RESOURCES, 5 INSERT INTO t1 VALUES(""); -SET SESSION debug_dbug=DEFAULT; +set debug_dbug= @saved_dbug; DROP TABLE t1; @@ -84,7 +85,7 @@ EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); SELECT * FROM t1 LEFT JOIN t2 ON ( t2.a < 10 OR t2.b < 10 ); -SET SESSION debug_dbug= DEFAULT; +set debug_dbug= @saved_dbug; SET optimizer_switch=@save_optimizer_switch; @@ -101,7 +102,7 @@ INSERT INTO t2 VALUES (1),(2); SET SESSION debug_dbug="+d,bug11747970_raise_error"; --error ER_QUERY_INTERRUPTED INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); -SET SESSION debug_dbug = DEFAULT; +set debug_dbug= @saved_dbug; DROP TABLE t1,t2; @@ -156,4 +157,4 @@ SET SESSION debug_dbug="+d,simulate_create_virtual_tmp_table_out_of_memory"; --error ER_OUT_OF_RESOURCES, 5 SELECT f1(1); DROP FUNCTION f1; -SET SESSION debug_dbug=DEFAULT; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/t/func_regexp_pcre_debug.test b/mysql-test/t/func_regexp_pcre_debug.test index c2581fa4110..cbf5c4a17ee 100644 --- a/mysql-test/t/func_regexp_pcre_debug.test +++ b/mysql-test/t/func_regexp_pcre_debug.test @@ -1,6 +1,5 @@ --source include/have_debug.inc -SET debug_dbug='+d,pcre_exec_error_123'; +SET STATEMENT debug_dbug='+d,pcre_exec_error_123' for SELECT 'a' RLIKE 'a'; -SET debug_dbug=''; SELECT 'a' RLIKE 'a'; diff --git a/mysql-test/t/log_slow_debug.test b/mysql-test/t/log_slow_debug.test index fd8e613ea1f..7390f1a8469 100644 --- a/mysql-test/t/log_slow_debug.test +++ b/mysql-test/t/log_slow_debug.test @@ -9,7 +9,7 @@ SET @@GLOBAL.log_output='TABLE'; FLUSH SLOW LOGS; SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.log_slow_admin_statements=ON; -SET @save_dbug = @@debug_dbug; +SET @saved_dbug = @@debug_dbug; SET SESSION debug_dbug="+d,simulate_slow_query"; DELIMITER $$; @@ -119,7 +119,7 @@ CALL show_slow_log(); --echo # Clean up --echo # -SET SESSION debug_dbug=@save_dbug; +SET SESSION debug_dbug=@saved_dbug; TRUNCATE mysql.slow_log; SET @@global.slow_query_log= @org_slow_query_log; SET @@global.log_output= @org_log_output; diff --git a/mysql-test/t/mdev6830.test b/mysql-test/t/mdev6830.test index 3898d5bbef6..0513899e519 100644 --- a/mysql-test/t/mdev6830.test +++ b/mysql-test/t/mdev6830.test @@ -2,7 +2,7 @@ # MDEV-6830 Server crashes in best_access_path after a sequence of SELECTs invollving a temptable view # --source include/have_debug.inc - +set @saved_dbug = @@session.debug_dbug; set @@debug_dbug= 'd,opt'; CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=MyISAM; @@ -60,4 +60,4 @@ SELECT * FROM t1, v3, t4 WHERE v3.f1 = t4.f1 AND t4.f2 = 6 AND t1.pk = v3.f5; drop table t1,t2,t3,t4; drop view v2,v3; - +set debug_dbug= @saved_dbug; diff --git a/mysql-test/t/merge-big.test b/mysql-test/t/merge-big.test index 9bd2cab2c8a..5873d2eb233 100644 --- a/mysql-test/t/merge-big.test +++ b/mysql-test/t/merge-big.test @@ -42,7 +42,7 @@ LOCK TABLE t1 WRITE; #SELECT NOW(); connect (con1,localhost,root,,); let $con1_id= `SELECT CONNECTION_ID()`; - SET @orig_debug=@@debug; + SET @orig_debug=@@global.debug_dbug; SET GLOBAL debug_dbug="+d,sleep_open_and_lock_after_open"; send INSERT INTO t1 VALUES (1); connection default; diff --git a/mysql-test/t/merge_debug.test b/mysql-test/t/merge_debug.test index 3c617cfc545..50017bc1331 100644 --- a/mysql-test/t/merge_debug.test +++ b/mysql-test/t/merge_debug.test @@ -14,7 +14,7 @@ call mtr.add_suppression("Index for table .*crashed' is corrupt; try to repair i drop table if exists crashed,t2,t3,t4; --enable_warnings -SET @orig_debug=@@debug; +SET @orig_debug=@@global.debug_dbug; # # Check that MariaDB handles reopen that fails without crashing diff --git a/mysql-test/t/range_innodb.test b/mysql-test/t/range_innodb.test index a17ef3f1146..0682286274f 100644 --- a/mysql-test/t/range_innodb.test +++ b/mysql-test/t/range_innodb.test @@ -80,10 +80,11 @@ create table t1 ( insert into t1 select A.a+10*B.a, A.a+10*B.a, A.a+10*B.a+100*C.a from t0 A, t0 B, t0 C, t0 D where D.a<5; +set @saved_dbug = @@global.debug_dbug; set @@global.debug_dbug="+d,ha_index_init_fail"; explain select * from t1 where a=10 and b=10; --error ER_TABLE_DEF_CHANGED select * from t1 where a=10 and b=10; DROP TABLE t0,t1; -set @@global.debug_dbug="-d"; +set @@global.debug_dbug = @saved_dbug; set @@optimizer_switch= @optimizer_switch_save; diff --git a/mysql-test/t/select_debug.test b/mysql-test/t/select_debug.test index 49415400db3..dba0576f945 100644 --- a/mysql-test/t/select_debug.test +++ b/mysql-test/t/select_debug.test @@ -10,6 +10,7 @@ create table t2 (a int); insert into t2 values (2), (3); set session join_cache_level=3; +set @saved_dbug = @@session.debug_dbug; set @@debug_dbug= 'd,opt'; explain select t1.b from t1,t2 where t1.b=t2.a; @@ -17,3 +18,4 @@ select t1.b from t1,t2 where t1.b=t2.a; set session join_cache_level=default; drop table t1,t2; +set debug_dbug= @saved_dbug; diff --git a/mysql-test/t/show_explain_ps.test b/mysql-test/t/show_explain_ps.test index 13cd1538143..f4e6bd12426 100644 --- a/mysql-test/t/show_explain_ps.test +++ b/mysql-test/t/show_explain_ps.test @@ -38,6 +38,7 @@ let $wait_condition= select State='show_explain_trap' from information_schema.pr # connection con1; set @show_explain_probe_select_id=1; +set @saved_dbug = @@session.debug_dbug; set debug_dbug='d,show_explain_probe_join_exec_start'; send select count(*) from t0 where a < 100000; @@ -47,7 +48,7 @@ evalp show explain for $thr2; connection con1; reap; -set debug_dbug=''; +set debug_dbug= @saved_dbug; evalp select event_name from diff --git a/mysql-test/t/slowlog_enospace-10508.test b/mysql-test/t/slowlog_enospace-10508.test index b2c26a5984d..ef49700f0c9 100644 --- a/mysql-test/t/slowlog_enospace-10508.test +++ b/mysql-test/t/slowlog_enospace-10508.test @@ -9,6 +9,7 @@ create table t1 (a int, b int) engine=memory; insert t1 select seq, seq+1 from seq_1_to_1000; set global general_log=0; set global log_queries_not_using_indexes=1; +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,simulate_file_write_error'; --disable_result_log --let $run= 50 @@ -18,7 +19,7 @@ while ($run) dec $run; } --enable_result_log -set debug_dbug=''; +set debug_dbug= @saved_dbug; set global general_log=1; set global log_queries_not_using_indexes=default; drop table t1; diff --git a/mysql-test/t/stat_tables-enospc.test b/mysql-test/t/stat_tables-enospc.test index 932b2bde302..b2b4c071a70 100644 --- a/mysql-test/t/stat_tables-enospc.test +++ b/mysql-test/t/stat_tables-enospc.test @@ -16,9 +16,10 @@ while ($i) { } --enable_query_log set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3; +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,simulate_file_write_error'; set @@max_heap_table_size=128*1024; --replace_regex /'.*'/'tmp-file'/ analyze table t1; -set debug_dbug=''; +set debug_dbug= @saved_dbug; drop table t1; diff --git a/mysql-test/t/union_crash-714.test b/mysql-test/t/union_crash-714.test index 6c31a2202cb..97f0c90d854 100644 --- a/mysql-test/t/union_crash-714.test +++ b/mysql-test/t/union_crash-714.test @@ -3,7 +3,9 @@ # --source include/have_debug.inc create table t1 (i tinyint); +set @saved_dbug = @@session.debug_dbug; set debug_dbug='+d,bug11747970_raise_error'; --error ER_QUERY_INTERRUPTED insert into t1 (i) select i from t1 union select i from t1; drop table t1; +set debug_dbug= @saved_dbug; \ No newline at end of file diff --git a/mysql-test/t/warnings_debug.test b/mysql-test/t/warnings_debug.test index 3055e3894e5..53573f8a8d6 100644 --- a/mysql-test/t/warnings_debug.test +++ b/mysql-test/t/warnings_debug.test @@ -9,6 +9,7 @@ create table t1 (a int primary key) engine=innodb; # Test that warnings produced during autocommit (after calling # set_ok_status()) are still reported to the client. +set @saved_dbug = @@session.debug_dbug; SET SESSION debug_dbug="+d,warn_during_ha_commit_trans"; INSERT INTO t1 VALUES (1); # The warning will be shown automatically by mysqltest; there was a bug where @@ -17,3 +18,4 @@ INSERT INTO t1 VALUES (1); SHOW WARNINGS; drop table t1; +set debug_dbug= @saved_dbug;