Commit 4ebaf813 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent db9a4d92
SET @save_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type'; set debug_dbug='+d,unstable_db_type';
install soname 'ha_archive'; install soname 'ha_archive';
create table t1 (a int) engine=archive; create table t1 (a int) engine=archive;
...@@ -9,4 +10,4 @@ t1.ARZ ...@@ -9,4 +10,4 @@ t1.ARZ
t1.frm t1.frm
drop table t1; drop table t1;
uninstall soname 'ha_archive'; uninstall soname 'ha_archive';
set debug_dbug='-d,unstable_db_type'; set debug_dbug=@save_dbug;
...@@ -3,13 +3,12 @@ ...@@ -3,13 +3,12 @@
# -- Bug#43138: DROP DATABASE failure does not clean up message list. # -- Bug#43138: DROP DATABASE failure does not clean up message list.
# -- # --
DROP DATABASE IF EXISTS mysql_test;
CREATE DATABASE mysql_test; CREATE DATABASE mysql_test;
CREATE TABLE mysql_test.t1(a INT); CREATE TABLE mysql_test.t1(a INT);
CREATE TABLE mysql_test.t2(b INT); CREATE TABLE mysql_test.t2(b INT);
CREATE TABLE mysql_test.t3(c INT); CREATE TABLE mysql_test.t3(c INT);
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug= "+d,bug43138"; SET SESSION debug_dbug= "+d,bug43138";
DROP DATABASE mysql_test; DROP DATABASE mysql_test;
...@@ -18,7 +17,7 @@ Error 1051 Unknown table 't1' ...@@ -18,7 +17,7 @@ Error 1051 Unknown table 't1'
Error 1051 Unknown table 't2' Error 1051 Unknown table 't2'
Error 1051 Unknown table 't3' Error 1051 Unknown table 't3'
SET SESSION debug_dbug= "-d,bug43138"; SET SESSION debug_dbug=@save_dbug;
# -- # --
# -- End of Bug#43138. # -- End of Bug#43138.
......
DROP TABLE IF EXISTS t1, t2;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
# #
# Bug#42438: Crash ha_partition::change_table_ptr # Bug#42438: Crash ha_partition::change_table_ptr
...@@ -18,6 +17,7 @@ ENGINE = MYISAM ...@@ -18,6 +17,7 @@ ENGINE = MYISAM
PARTITION p1 VALUES LESS THAN (20), PARTITION p1 VALUES LESS THAN (20),
PARTITION p2 VALUES LESS THAN (100), PARTITION p2 VALUES LESS THAN (100),
PARTITION p3 VALUES LESS THAN MAXVALUE ) */; PARTITION p3 VALUES LESS THAN MAXVALUE ) */;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug= "+d,sleep_before_create_table_no_lock"; 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_create_table_no_lock SIGNAL removing_partitioning WAIT_FOR waiting_for_alter';
SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed'; SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed';
...@@ -28,7 +28,7 @@ SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_alter'; ...@@ -28,7 +28,7 @@ SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL waiting_for_alter';
SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR partitioning_removed'; SET DEBUG_SYNC= 'rm_table_no_locks_before_delete_table WAIT_FOR partitioning_removed';
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
# Con 1 # Con 1
SET SESSION debug_dbug= "-d,sleep_before_create_table_no_lock"; SET SESSION debug_dbug=@save_dbug;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
# #
...@@ -51,12 +51,13 @@ SET DEBUG_SYNC= 'alter_table_before_open_tables SIGNAL removing_partitions WAIT_ ...@@ -51,12 +51,13 @@ SET DEBUG_SYNC= 'alter_table_before_open_tables SIGNAL removing_partitions WAIT_
SET DEBUG_SYNC= 'alter_table_before_rename_result_table WAIT_FOR delete_done'; SET DEBUG_SYNC= 'alter_table_before_rename_result_table WAIT_FOR delete_done';
ALTER TABLE t2 REMOVE PARTITIONING; ALTER TABLE t2 REMOVE PARTITIONING;
# Con default # Con default
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug= "+d,sleep_before_no_locks_delete_table"; SET SESSION debug_dbug= "+d,sleep_before_no_locks_delete_table";
SET DEBUG_SYNC= 'now WAIT_FOR removing_partitions'; 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_delete_table SIGNAL waiting_for_alter';
SET DEBUG_SYNC= 'rm_table_no_locks_before_binlog SIGNAL delete_done'; SET DEBUG_SYNC= 'rm_table_no_locks_before_binlog SIGNAL delete_done';
DROP TABLE IF EXISTS t2; DROP TABLE IF EXISTS t2;
SET SESSION debug_dbug= "-d,sleep_before_no_locks_delete_table"; SET SESSION debug_dbug=@save_dbug;
# Con 1 # Con 1
ERROR 42S02: Table 'test.t2' doesn't exist ERROR 42S02: Table 'test.t2' doesn't exist
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
......
...@@ -923,6 +923,7 @@ END; ...@@ -923,6 +923,7 @@ END;
CLOSE c; CLOSE c;
SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack
END| END|
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,bug23032_emit_warning"; SET SESSION debug_dbug="+d,bug23032_emit_warning";
CALL p1(); CALL p1();
Warning found! Warning found!
...@@ -942,7 +943,7 @@ End of Result Set found! ...@@ -942,7 +943,7 @@ End of Result Set found!
Level Code Message Level Code Message
Warning 1105 Unknown error Warning 1105 Unknown error
Error 1329 No data - zero rows fetched, selected, or processed Error 1329 No data - zero rows fetched, selected, or processed
SET SESSION debug_dbug="-d,bug23032_emit_warning"; SET SESSION debug_dbug=@save_dbug;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
# #
......
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
SET @save_dbug=@@debug_dbug;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376; DROP TABLE bug11754376;
SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG=@save_dbug;
...@@ -9,8 +9,9 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB; ...@@ -9,8 +9,9 @@ CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
# This will invoke test_normalize_table_name_low() in debug builds # This will invoke test_normalize_table_name_low() in debug builds
SET @save_dbug=@@debug_dbug;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
DROP TABLE bug11754376; DROP TABLE bug11754376;
SET SESSION DEBUG_DBUG='-d,test_normalize_table_name_low'; SET SESSION DEBUG_DBUG=@save_dbug;
...@@ -107,8 +107,7 @@ SLEEP 1; ...@@ -107,8 +107,7 @@ SLEEP 1;
--enable_reconnect --enable_reconnect
--source include/wait_until_connected_again.inc --source include/wait_until_connected_again.inc
# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required # Note: SET DEBUG_DBUG need not be reset, because the server was restarted
# because the session information is lost after server restart
--echo # Cleanup --echo # Cleanup
DROP TABLE t1; DROP TABLE t1;
# To be used with partition mgm commands like # To be used with partition mgm commands like
# ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING). # ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING).
--echo # Crash testing ADD PARTITION --echo # Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1"; SET SESSION debug_dbug="+d,crash_add_partition_1";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_2"; SET SESSION debug_dbug="+d,crash_add_partition_2";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_3"; SET SESSION debug_dbug="+d,crash_add_partition_3";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_4"; SET SESSION debug_dbug="+d,crash_add_partition_4";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_5"; SET SESSION debug_dbug="+d,crash_add_partition_5";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_6"; SET SESSION debug_dbug="+d,crash_add_partition_6";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_7"; SET SESSION debug_dbug="+d,crash_add_partition_7";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_8"; SET SESSION debug_dbug="+d,crash_add_partition_8";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_9"; SET SESSION debug_dbug="+d,crash_add_partition_9";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_10"; SET SESSION debug_dbug="+d,crash_add_partition_10";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
...@@ -2,39 +2,40 @@ ...@@ -2,39 +2,40 @@
# ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION. # ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION.
--echo # Test change partition (REORGANIZE/REBUILD/COALESCE --echo # Test change partition (REORGANIZE/REBUILD/COALESCE
--echo # or ADD HASH PARTITION). --echo # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1"; SET SESSION debug_dbug="+d,crash_change_partition_1";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_2"; SET SESSION debug_dbug="+d,crash_change_partition_2";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_3"; SET SESSION debug_dbug="+d,crash_change_partition_3";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_4"; SET SESSION debug_dbug="+d,crash_change_partition_4";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_5"; SET SESSION debug_dbug="+d,crash_change_partition_5";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_6"; SET SESSION debug_dbug="+d,crash_change_partition_6";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_7"; SET SESSION debug_dbug="+d,crash_change_partition_7";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_8"; SET SESSION debug_dbug="+d,crash_change_partition_8";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_9"; SET SESSION debug_dbug="+d,crash_change_partition_9";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_10"; SET SESSION debug_dbug="+d,crash_change_partition_10";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_10"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_11"; SET SESSION debug_dbug="+d,crash_change_partition_11";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_11"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_12"; SET SESSION debug_dbug="+d,crash_change_partition_12";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_12"; SET SESSION debug_dbug=@save_dbug;
# To be used with partition mgm commands like # To be used with partition mgm commands like
# ALTER TABLE t1 DROP PARTITION. # ALTER TABLE t1 DROP PARTITION.
--echo # Test DROP PARTITION --echo # Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1"; SET SESSION debug_dbug="+d,crash_drop_partition_1";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_2"; SET SESSION debug_dbug="+d,crash_drop_partition_2";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_3"; SET SESSION debug_dbug="+d,crash_drop_partition_3";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_4"; SET SESSION debug_dbug="+d,crash_drop_partition_4";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_5"; SET SESSION debug_dbug="+d,crash_drop_partition_5";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_6"; SET SESSION debug_dbug="+d,crash_drop_partition_6";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_7"; SET SESSION debug_dbug="+d,crash_drop_partition_7";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_8"; SET SESSION debug_dbug="+d,crash_drop_partition_8";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_9"; SET SESSION debug_dbug="+d,crash_drop_partition_9";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# To be used with partition mgm commands like # To be used with partition mgm commands like
# ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING). # ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING).
--echo # Error recovery testing ADD PARTITION --echo # Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1"; SET SESSION debug_dbug="+d,fail_add_partition_1";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_2"; SET SESSION debug_dbug="+d,fail_add_partition_2";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_3"; SET SESSION debug_dbug="+d,fail_add_partition_3";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_4"; SET SESSION debug_dbug="+d,fail_add_partition_4";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_5"; SET SESSION debug_dbug="+d,fail_add_partition_5";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_6"; SET SESSION debug_dbug="+d,fail_add_partition_6";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_7"; SET SESSION debug_dbug="+d,fail_add_partition_7";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_8"; SET SESSION debug_dbug="+d,fail_add_partition_8";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_9"; SET SESSION debug_dbug="+d,fail_add_partition_9";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_10"; SET SESSION debug_dbug="+d,fail_add_partition_10";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
...@@ -2,39 +2,40 @@ ...@@ -2,39 +2,40 @@
# ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION. # ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION.
--echo # Error recovery change partition (REORGANIZE/REBUILD/COALESCE --echo # Error recovery change partition (REORGANIZE/REBUILD/COALESCE
--echo # or ADD HASH PARTITION). --echo # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1"; SET SESSION debug_dbug="+d,fail_change_partition_1";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_2"; SET SESSION debug_dbug="+d,fail_change_partition_2";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_3"; SET SESSION debug_dbug="+d,fail_change_partition_3";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_4"; SET SESSION debug_dbug="+d,fail_change_partition_4";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_5"; SET SESSION debug_dbug="+d,fail_change_partition_5";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_6"; SET SESSION debug_dbug="+d,fail_change_partition_6";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_7"; SET SESSION debug_dbug="+d,fail_change_partition_7";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_8"; SET SESSION debug_dbug="+d,fail_change_partition_8";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_9"; SET SESSION debug_dbug="+d,fail_change_partition_9";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_10"; SET SESSION debug_dbug="+d,fail_change_partition_10";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_10"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_11"; SET SESSION debug_dbug="+d,fail_change_partition_11";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_11"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_12"; SET SESSION debug_dbug="+d,fail_change_partition_12";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_12"; SET SESSION debug_dbug=@save_dbug;
# To be used with partition mgm commands like # To be used with partition mgm commands like
# ALTER TABLE t1 DROP PARTITION. # ALTER TABLE t1 DROP PARTITION.
--echo # Error recovery DROP PARTITION --echo # Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1"; SET SESSION debug_dbug="+d,fail_drop_partition_1";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_2"; SET SESSION debug_dbug="+d,fail_drop_partition_2";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_3"; SET SESSION debug_dbug="+d,fail_drop_partition_3";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_4"; SET SESSION debug_dbug="+d,fail_drop_partition_4";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_5"; SET SESSION debug_dbug="+d,fail_drop_partition_5";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_6"; SET SESSION debug_dbug="+d,fail_drop_partition_6";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_7"; SET SESSION debug_dbug="+d,fail_drop_partition_7";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_8"; SET SESSION debug_dbug="+d,fail_drop_partition_8";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_9"; SET SESSION debug_dbug="+d,fail_drop_partition_9";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
--source include/not_valgrind.inc --source include/not_valgrind.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--let $DATADIR= `SELECT @@datadir;` --let $DATADIR= `SELECT @@datadir;`
--echo # --echo #
...@@ -29,6 +25,7 @@ INSERT INTO t1 VALUES (6, 'X 6 row'), (7, 'Seventh row'), (8, 'Last row'); ...@@ -29,6 +25,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 ADD INDEX new_b_index (b);
ALTER TABLE t1 DROP INDEX new_b_index; ALTER TABLE t1 DROP INDEX new_b_index;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index"; SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index";
--error ER_NO_PARTITION_FOR_GIVEN_VALUE --error ER_NO_PARTITION_FOR_GIVEN_VALUE
...@@ -44,7 +41,7 @@ SHOW CREATE TABLE t1; ...@@ -44,7 +41,7 @@ SHOW CREATE TABLE t1;
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index"; SET SESSION debug_dbug = @save_dbug;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
......
...@@ -6,10 +6,6 @@ ...@@ -6,10 +6,6 @@
--source include/not_valgrind.inc --source include/not_valgrind.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--let $DATADIR= `SELECT @@datadir;` --let $DATADIR= `SELECT @@datadir;`
let $engine= 'MyISAM'; let $engine= 'MyISAM';
......
...@@ -7,6 +7,7 @@ if (!$HA_ARCHIVE_SO) { ...@@ -7,6 +7,7 @@ if (!$HA_ARCHIVE_SO) {
let $mysqld_datadir= `select @@datadir`; let $mysqld_datadir= `select @@datadir`;
SET @save_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type'; set debug_dbug='+d,unstable_db_type';
install soname 'ha_archive'; install soname 'ha_archive';
...@@ -21,5 +22,4 @@ drop table t1; ...@@ -21,5 +22,4 @@ drop table t1;
--list_files $mysqld_datadir/test --list_files $mysqld_datadir/test
uninstall soname 'ha_archive'; uninstall soname 'ha_archive';
set debug_dbug='-d,unstable_db_type'; set debug_dbug=@save_dbug;
...@@ -10,17 +10,13 @@ ...@@ -10,17 +10,13 @@
--echo # -- --echo # --
--echo --echo
--disable_warnings
DROP DATABASE IF EXISTS mysql_test;
--enable_warnings
--echo
CREATE DATABASE mysql_test; CREATE DATABASE mysql_test;
CREATE TABLE mysql_test.t1(a INT); CREATE TABLE mysql_test.t1(a INT);
CREATE TABLE mysql_test.t2(b INT); CREATE TABLE mysql_test.t2(b INT);
CREATE TABLE mysql_test.t3(c INT); CREATE TABLE mysql_test.t3(c INT);
--echo --echo
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug= "+d,bug43138"; SET SESSION debug_dbug= "+d,bug43138";
--echo --echo
...@@ -28,7 +24,7 @@ SET SESSION debug_dbug= "+d,bug43138"; ...@@ -28,7 +24,7 @@ SET SESSION debug_dbug= "+d,bug43138";
DROP DATABASE mysql_test; DROP DATABASE mysql_test;
--echo --echo
SET SESSION debug_dbug= "-d,bug43138"; SET SESSION debug_dbug=@save_dbug;
--echo --echo
--echo # -- --echo # --
......
...@@ -6,10 +6,7 @@ ...@@ -6,10 +6,7 @@
--source include/have_partition.inc --source include/have_partition.inc
--source include/have_debug_sync.inc --source include/have_debug_sync.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
--enable_warnings
--echo # --echo #
--echo # Bug#42438: Crash ha_partition::change_table_ptr --echo # Bug#42438: Crash ha_partition::change_table_ptr
...@@ -30,6 +27,7 @@ ENGINE = MYISAM ...@@ -30,6 +27,7 @@ ENGINE = MYISAM
PARTITION p1 VALUES LESS THAN (20), PARTITION p1 VALUES LESS THAN (20),
PARTITION p2 VALUES LESS THAN (100), PARTITION p2 VALUES LESS THAN (100),
PARTITION p3 VALUES LESS THAN MAXVALUE ) */; PARTITION p3 VALUES LESS THAN MAXVALUE ) */;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug= "+d,sleep_before_create_table_no_lock"; 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_create_table_no_lock SIGNAL removing_partitioning WAIT_FOR waiting_for_alter';
SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed'; SET DEBUG_SYNC= 'alter_table_before_main_binlog SIGNAL partitioning_removed';
...@@ -43,7 +41,7 @@ DROP TABLE IF EXISTS t1; ...@@ -43,7 +41,7 @@ DROP TABLE IF EXISTS t1;
--echo # Con 1 --echo # Con 1
connection con1; connection con1;
--reap --reap
SET SESSION debug_dbug= "-d,sleep_before_create_table_no_lock"; SET SESSION debug_dbug=@save_dbug;
connection default; connection default;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
connection con1; connection con1;
...@@ -70,12 +68,13 @@ SET DEBUG_SYNC= 'alter_table_before_rename_result_table WAIT_FOR delete_done'; ...@@ -70,12 +68,13 @@ SET DEBUG_SYNC= 'alter_table_before_rename_result_table WAIT_FOR delete_done';
--send ALTER TABLE t2 REMOVE PARTITIONING --send ALTER TABLE t2 REMOVE PARTITIONING
connection default; connection default;
--echo # Con default --echo # Con default
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug= "+d,sleep_before_no_locks_delete_table"; SET SESSION debug_dbug= "+d,sleep_before_no_locks_delete_table";
SET DEBUG_SYNC= 'now WAIT_FOR removing_partitions'; 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_delete_table SIGNAL waiting_for_alter';
SET DEBUG_SYNC= 'rm_table_no_locks_before_binlog SIGNAL delete_done'; SET DEBUG_SYNC= 'rm_table_no_locks_before_binlog SIGNAL delete_done';
DROP TABLE IF EXISTS t2; 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 --echo # Con 1
connection con1; connection con1;
--error ER_NO_SUCH_TABLE --error ER_NO_SUCH_TABLE
......
...@@ -696,9 +696,10 @@ END| ...@@ -696,9 +696,10 @@ END|
delimiter ;| delimiter ;|
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,bug23032_emit_warning"; SET SESSION debug_dbug="+d,bug23032_emit_warning";
CALL p1(); CALL p1();
SET SESSION debug_dbug="-d,bug23032_emit_warning"; SET SESSION debug_dbug=@save_dbug;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment