mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user