diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-11 14:02:35 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-11 14:02:35 +0300 |
commit | 4ebaf8136096a5bd383971f93f6bb0b0df83cd43 (patch) | |
tree | b51875157e207f08b3e6e746ed7ab4eedf0f837e /mysql-test/t | |
parent | db9a4d928dc8e81ce449b54ef0bf02c248d931d4 (diff) | |
download | mariadb-git-4ebaf8136096a5bd383971f93f6bb0b0df83cd43.tar.gz |
MDEV-19455: Avoid SET DEBUG_DBUG='-d,...' construct
Apply the correct pattern for debug instrumentation:
SET @save_dbug=@@debug_dbug;
SET debug_dbug='+d,...';
...
SET debug_dbug=@save_dbug;
Numerous tests use statements of the form
SET debug_dbug='-d,...';
which will inadvertently enable all DBUG tracing output,
causing unnecessary waste of resources.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/drop_bad_db_type.test | 4 | ||||
-rw-r--r-- | mysql-test/t/drop_debug.test | 8 | ||||
-rw-r--r-- | mysql-test/t/partition_debug_sync.test | 9 | ||||
-rw-r--r-- | mysql-test/t/sp-code.test | 3 |
4 files changed, 10 insertions, 14 deletions
diff --git a/mysql-test/t/drop_bad_db_type.test b/mysql-test/t/drop_bad_db_type.test index 69e1a889b18..117501f0a49 100644 --- a/mysql-test/t/drop_bad_db_type.test +++ b/mysql-test/t/drop_bad_db_type.test @@ -7,6 +7,7 @@ if (!$HA_ARCHIVE_SO) { let $mysqld_datadir= `select @@datadir`; +SET @save_dbug = @@debug_dbug; set debug_dbug='+d,unstable_db_type'; install soname 'ha_archive'; @@ -21,5 +22,4 @@ drop table t1; --list_files $mysqld_datadir/test uninstall soname 'ha_archive'; -set debug_dbug='-d,unstable_db_type'; - +set debug_dbug=@save_dbug; diff --git a/mysql-test/t/drop_debug.test b/mysql-test/t/drop_debug.test index 21069b57285..4ba16f1cc20 100644 --- a/mysql-test/t/drop_debug.test +++ b/mysql-test/t/drop_debug.test @@ -10,17 +10,13 @@ --echo # -- --echo ---disable_warnings -DROP DATABASE IF EXISTS mysql_test; ---enable_warnings - ---echo CREATE DATABASE mysql_test; CREATE TABLE mysql_test.t1(a INT); CREATE TABLE mysql_test.t2(b INT); CREATE TABLE mysql_test.t3(c INT); --echo +SET @save_dbug = @@debug_dbug; SET SESSION debug_dbug= "+d,bug43138"; --echo @@ -28,7 +24,7 @@ SET SESSION debug_dbug= "+d,bug43138"; DROP DATABASE mysql_test; --echo -SET SESSION debug_dbug= "-d,bug43138"; +SET SESSION debug_dbug=@save_dbug; --echo --echo # -- diff --git a/mysql-test/t/partition_debug_sync.test b/mysql-test/t/partition_debug_sync.test index 027a4bd19a7..df4901ab78f 100644 --- a/mysql-test/t/partition_debug_sync.test +++ b/mysql-test/t/partition_debug_sync.test @@ -6,10 +6,7 @@ --source include/have_partition.inc --source include/have_debug_sync.inc ---disable_warnings -DROP TABLE IF EXISTS t1, t2; SET DEBUG_SYNC= 'RESET'; ---enable_warnings --echo # --echo # Bug#42438: Crash ha_partition::change_table_ptr @@ -30,6 +27,7 @@ ENGINE = MYISAM PARTITION p1 VALUES LESS THAN (20), PARTITION p2 VALUES LESS THAN (100), PARTITION p3 VALUES LESS THAN MAXVALUE ) */; +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug= "+d,sleep_before_create_table_no_lock"; SET DEBUG_SYNC= 'alter_table_before_create_table_no_lock SIGNAL removing_partitioning WAIT_FOR waiting_for_alter'; SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed'; @@ -43,7 +41,7 @@ DROP TABLE IF EXISTS t1; --echo # Con 1 connection con1; --reap -SET SESSION debug_dbug= "-d,sleep_before_create_table_no_lock"; +SET SESSION debug_dbug=@save_dbug; connection default; SET DEBUG_SYNC= 'RESET'; connection con1; @@ -70,12 +68,13 @@ SET DEBUG_SYNC= 'alter_table_before_rename_result_table WAIT_FOR delete_done'; --send ALTER TABLE t2 REMOVE PARTITIONING connection default; --echo # Con default +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug= "+d,sleep_before_no_locks_delete_table"; SET DEBUG_SYNC= 'now WAIT_FOR removing_partitions'; SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table SIGNAL waiting_for_alter'; SET DEBUG_SYNC= 'rm_table_no_locks_before_binlog SIGNAL delete_done'; DROP TABLE IF EXISTS t2; -SET SESSION debug_dbug= "-d,sleep_before_no_locks_delete_table"; +SET SESSION debug_dbug=@save_dbug; --echo # Con 1 connection con1; --error ER_NO_SUCH_TABLE diff --git a/mysql-test/t/sp-code.test b/mysql-test/t/sp-code.test index d4b63a73920..129a68204ba 100644 --- a/mysql-test/t/sp-code.test +++ b/mysql-test/t/sp-code.test @@ -696,9 +696,10 @@ END| delimiter ;| +SET @save_dbug = @@debug_dbug; SET SESSION debug_dbug="+d,bug23032_emit_warning"; CALL p1(); -SET SESSION debug_dbug="-d,bug23032_emit_warning"; +SET SESSION debug_dbug=@save_dbug; DROP PROCEDURE p1; DROP TABLE t1; |