summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_debug_sync.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-10-11 14:02:35 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-10-11 14:02:35 +0300
commit4ebaf8136096a5bd383971f93f6bb0b0df83cd43 (patch)
treeb51875157e207f08b3e6e746ed7ab4eedf0f837e /mysql-test/t/partition_debug_sync.test
parentdb9a4d928dc8e81ce449b54ef0bf02c248d931d4 (diff)
downloadmariadb-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/partition_debug_sync.test')
-rw-r--r--mysql-test/t/partition_debug_sync.test9
1 files changed, 4 insertions, 5 deletions
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