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';
install soname 'ha_archive';
create table t1 (a int) engine=archive;
......@@ -9,4 +10,4 @@ t1.ARZ
t1.frm
drop table t1;
uninstall soname 'ha_archive';
set debug_dbug='-d,unstable_db_type';
set debug_dbug=@save_dbug;
......@@ -3,13 +3,12 @@
# -- Bug#43138: DROP DATABASE failure does not clean up message list.
# --
DROP DATABASE IF EXISTS mysql_test;
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);
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug= "+d,bug43138";
DROP DATABASE mysql_test;
......@@ -18,7 +17,7 @@ Error 1051 Unknown table 't1'
Error 1051 Unknown table 't2'
Error 1051 Unknown table 't3'
SET SESSION debug_dbug= "-d,bug43138";
SET SESSION debug_dbug=@save_dbug;
# --
# -- End of Bug#43138.
......
DROP TABLE IF EXISTS t1, t2;
SET DEBUG_SYNC= 'RESET';
#
# Bug#42438: Crash ha_partition::change_table_ptr
......@@ -18,6 +17,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';
......@@ -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';
DROP TABLE IF EXISTS t1;
# 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';
#
......@@ -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';
ALTER TABLE t2 REMOVE PARTITIONING;
# 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;
# Con 1
ERROR 42S02: Table 'test.t2' doesn't exist
SET DEBUG_SYNC= 'RESET';
......
......@@ -923,6 +923,7 @@ END;
CLOSE c;
SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack
END|
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,bug23032_emit_warning";
CALL p1();
Warning found!
......@@ -942,7 +943,7 @@ End of Result Set found!
Level Code Message
Warning 1105 Unknown error
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 TABLE t1;
#
......
CREATE TABLE bug11754376 (c INT) ENGINE=INNODB;
SET @save_dbug=@@debug_dbug;
SET SESSION DEBUG_DBUG='+d,test_normalize_table_name_low';
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;
# 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';
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;
--enable_reconnect
--source include/wait_until_connected_again.inc
# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
# because the session information is lost after server restart
# Note: SET DEBUG_DBUG need not be reset, because the server was restarted
--echo # Cleanup
DROP TABLE t1;
# To be used with partition mgm commands like
# ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING).
--echo # Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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 @@
# ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION.
--echo # Test change partition (REORGANIZE/REBUILD/COALESCE
--echo # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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
# ALTER TABLE t1 DROP PARTITION.
--echo # Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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
# ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING).
--echo # Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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 @@
# ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION.
--echo # Error recovery change partition (REORGANIZE/REBUILD/COALESCE
--echo # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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
# ALTER TABLE t1 DROP PARTITION.
--echo # Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--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";
--source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_9";
SET SESSION debug_dbug=@save_dbug;
DROP TABLE IF EXISTS t1;
#
# Bug#12696518/Bug#11766879/60106:DIFF BETWEEN # OF INDEXES IN MYSQL
# VS INNODB, PARTITONING, ON INDEX CREATE
......@@ -13,6 +12,7 @@ INSERT INTO t1 VALUES (3, 'row id 3'), (4, '4 row'), (5, 'row5');
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 SESSION debug_dbug = "+d,ha_partition_fail_final_add_index";
ALTER TABLE t1 ADD INDEX (b);
ERROR HY000: Table has no partition for value 0
......@@ -59,7 +59,7 @@ a b
6 X 6 row
7 Seventh row
8 Last row
SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index";
SET SESSION debug_dbug = @save_dbug;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
......@@ -83,6 +83,7 @@ call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
flush tables;
# Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -147,7 +148,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -214,7 +215,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -281,7 +282,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -348,7 +349,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -416,7 +417,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -484,7 +485,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -552,7 +553,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -622,7 +623,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -690,7 +691,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -758,8 +759,9 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_10";
SET SESSION debug_dbug=@save_dbug;
# Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -880,7 +882,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1001,7 +1003,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1122,7 +1124,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1243,7 +1245,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1364,7 +1366,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1485,7 +1487,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1606,7 +1608,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1731,7 +1733,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1856,7 +1858,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -1981,8 +1983,9 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_10";
SET SESSION debug_dbug=@save_dbug;
# Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2046,7 +2049,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2112,7 +2115,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2178,7 +2181,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2238,7 +2241,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2298,7 +2301,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2358,7 +2361,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2416,7 +2419,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2473,7 +2476,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2530,8 +2533,9 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_9";
SET SESSION debug_dbug=@save_dbug;
# Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2650,7 +2654,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2769,7 +2773,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2888,7 +2892,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -2995,7 +2999,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3102,7 +3106,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3209,7 +3213,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3316,7 +3320,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3423,7 +3427,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3530,9 +3534,10 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_9";
SET SESSION debug_dbug=@save_dbug;
# Test change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3598,7 +3603,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3666,7 +3671,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3734,7 +3739,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3804,7 +3809,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3874,7 +3879,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -3946,7 +3951,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4018,7 +4023,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4088,7 +4093,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4158,7 +4163,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4228,7 +4233,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_10";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4297,7 +4302,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_11";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4366,9 +4371,10 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_12";
SET SESSION debug_dbug=@save_dbug;
# Error recovery change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4491,7 +4497,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4614,7 +4620,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4737,7 +4743,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4860,7 +4866,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -4983,7 +4989,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -5110,7 +5116,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -5237,7 +5243,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -5364,7 +5370,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -5491,7 +5497,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -5618,7 +5624,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_10";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -5745,7 +5751,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_11";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB'
......@@ -5872,4 +5878,4 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_12";
SET SESSION debug_dbug=@save_dbug;
DROP TABLE IF EXISTS t1;
# Test crash and failure recovery in fast_alter_partition_table.
#
# Bug#53676: Unexpected errors and possible table corruption on
......@@ -9,6 +8,7 @@ DROP TABLE IF EXISTS t1;
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
flush tables;
# Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -79,7 +79,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -152,7 +152,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -225,7 +225,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -298,7 +298,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -373,7 +373,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -448,7 +448,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -523,7 +523,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -601,7 +601,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -677,7 +677,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -753,8 +753,9 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_10";
SET SESSION debug_dbug=@save_dbug;
# Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -883,7 +884,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1012,7 +1013,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1141,7 +1142,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1270,7 +1271,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1399,7 +1400,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1528,7 +1529,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1657,7 +1658,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1792,7 +1793,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -1927,7 +1928,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2062,8 +2063,9 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_10";
SET SESSION debug_dbug=@save_dbug;
# Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2133,7 +2135,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2205,7 +2207,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2277,7 +2279,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2342,7 +2344,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2407,7 +2409,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2472,7 +2474,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2535,7 +2537,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2596,7 +2598,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2657,8 +2659,9 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_9";
SET SESSION debug_dbug=@save_dbug;
# Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2785,7 +2788,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -2912,7 +2915,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3039,7 +3042,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3152,7 +3155,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3265,7 +3268,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3378,7 +3381,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3491,7 +3494,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3604,7 +3607,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3717,9 +3720,10 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_9";
SET SESSION debug_dbug=@save_dbug;
# Test change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3791,7 +3795,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3865,7 +3869,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -3939,7 +3943,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4017,7 +4021,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4095,7 +4099,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4176,7 +4180,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4257,7 +4261,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4336,7 +4340,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4415,7 +4419,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4494,7 +4498,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_10";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4571,7 +4575,7 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_11";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4648,9 +4652,10 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_change_partition_12";
SET SESSION debug_dbug=@save_dbug;
# Error recovery change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4781,7 +4786,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -4912,7 +4917,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5043,7 +5048,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5174,7 +5179,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5305,7 +5310,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5442,7 +5447,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5579,7 +5584,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5716,7 +5721,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5853,7 +5858,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_9";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -5990,7 +5995,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_10";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -6127,7 +6132,7 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_11";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM'
......@@ -6264,4 +6269,4 @@ a b
4 Original from partition p0
UNLOCK TABLES;
DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_12";
SET SESSION debug_dbug=@save_dbug;
......@@ -7,10 +7,6 @@
--source include/not_valgrind.inc
--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--let $DATADIR= `SELECT @@datadir;`
--echo #
......@@ -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 DROP INDEX new_b_index;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index";
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
......@@ -44,7 +41,7 @@ SHOW CREATE TABLE t1;
--sorted_result
SELECT * FROM t1;
SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index";
SET SESSION debug_dbug = @save_dbug;
SHOW CREATE TABLE t1;
DROP TABLE t1;
......
......@@ -6,10 +6,6 @@
--source include/not_valgrind.inc
--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--let $DATADIR= `SELECT @@datadir;`
let $engine= 'MyISAM';
......
......@@ -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;
......@@ -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 # --
......
......@@ -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
......
......@@ -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;
......
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