Commit cbfd6882 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 5.5 into 10.1

parents 5ef12244 ea61b796
SET @save_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type';
install soname 'ha_archive';
create table t1 (a int) engine=archive;
......@@ -30,4 +31,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.
......
......@@ -6,6 +6,7 @@ SET @@GLOBAL.log_output='TABLE';
FLUSH SLOW LOGS;
SET @@GLOBAL.slow_query_log=ON;
SET @@GLOBAL.log_slow_admin_statements=ON;
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,simulate_slow_query";
CREATE PROCEDURE show_slow_log()
BEGIN
......@@ -129,7 +130,7 @@ sql_text
#
# Clean up
#
SET SESSION debug_dbug="-d,simulate_slow_query";
SET SESSION debug_dbug=@save_dbug;
TRUNCATE mysql.slow_log;
SET @@global.slow_query_log= @org_slow_query_log;
SET @@global.log_output= @org_log_output;
......
DROP TABLE IF EXISTS t1, t2;
SET DEBUG_SYNC= 'RESET';
#
# Bug#42438: Crash ha_partition::change_table_ptr
......
......@@ -919,6 +919,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!
......@@ -938,7 +939,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;
#
......
# 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 WL#4445: EXCHANGE PARTITION WITH TABLE.
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_1";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_2";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_3";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_4";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_5";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_6";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_7";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_8";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_9";
--source suite/parts/inc/partition_crash_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_abort_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;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_1";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_2";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_3";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_4";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_5";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_6";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_7";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_8";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_9";
--source suite/parts/inc/partition_fail_t2.inc
SET SESSION debug_dbug="-d,exchange_partition_fail_9";
SET SESSION debug_dbug=@save_dbug;
DROP TABLE IF EXISTS t1;
#
# Bug#13737949: CRASH IN HA_PARTITION::INDEX_INIT
# Bug#18694052: SERVER CRASH IN HA_PARTITION::INIT_RECORD_PRIORITY_QUEUE
......@@ -7,10 +6,11 @@ CREATE TABLE t1 (a INT, b VARCHAR(64), KEY(b,a))
PARTITION BY HASH (a) PARTITIONS 3;
INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"),
(6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine");
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,ha_partition_fail_index_init";
SELECT * FROM t1 WHERE b = "Seven";
ERROR HY000: Table has no partition for value 0
SET SESSION debug_dbug="-d,ha_partition_fail_index_init";
SET SESSION debug_dbug=@save_dbug;
SELECT * FROM t1 WHERE b = "Seven";
a b
7 Seven
......@@ -20,6 +20,7 @@ DROP TABLE t1;
# Verify ddl_log in case of crashing.
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
call mtr.add_suppression('InnoDB: The log sequence numbers [0-9]+ and [0-9]+ in ibdata files do not match the log sequence number [0-9]+ in the ib_logfiles!');
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_1";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -131,7 +132,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_2";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -243,7 +244,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_3";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -355,7 +356,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_4";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -467,7 +468,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_5";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -579,7 +580,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_6";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -691,7 +692,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_7";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -803,7 +804,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_8";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -915,7 +916,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_9";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1027,7 +1028,8 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_9";
SET SESSION debug_dbug=@save_dbug;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1129,7 +1131,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1231,7 +1233,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1333,7 +1335,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1435,7 +1437,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1537,7 +1539,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1639,7 +1641,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1741,7 +1743,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1843,7 +1845,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64));
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -1945,4 +1947,4 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_9";
SET SESSION debug_dbug=@save_dbug;
DROP TABLE IF EXISTS t1;
call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was");
call mtr.add_suppression("InnoDB: Error: table .* does not exist in the InnoDB internal");
call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table ");
......@@ -12,6 +11,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'
......@@ -76,7 +76,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'
......@@ -143,7 +143,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'
......@@ -210,7 +210,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'
......@@ -277,7 +277,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'
......@@ -345,7 +345,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'
......@@ -413,7 +413,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'
......@@ -481,7 +481,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'
......@@ -551,7 +551,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'
......@@ -619,7 +619,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'
......@@ -687,8 +687,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'
......@@ -809,7 +810,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'
......@@ -930,7 +931,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'
......@@ -1051,7 +1052,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'
......@@ -1172,7 +1173,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'
......@@ -1293,7 +1294,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'
......@@ -1414,7 +1415,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'
......@@ -1535,7 +1536,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'
......@@ -1660,7 +1661,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'
......@@ -1785,7 +1786,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'
......@@ -1910,8 +1911,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'
......@@ -1975,7 +1977,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'
......@@ -2041,7 +2043,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'
......@@ -2107,7 +2109,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'
......@@ -2167,7 +2169,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'
......@@ -2227,7 +2229,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'
......@@ -2287,7 +2289,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'
......@@ -2345,7 +2347,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'
......@@ -2402,7 +2404,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'
......@@ -2459,8 +2461,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'
......@@ -2579,7 +2582,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'
......@@ -2698,7 +2701,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'
......@@ -2817,7 +2820,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'
......@@ -2924,7 +2927,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'
......@@ -3031,7 +3034,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'
......@@ -3138,7 +3141,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'
......@@ -3245,7 +3248,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'
......@@ -3352,7 +3355,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'
......@@ -3459,9 +3462,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'
......@@ -3527,7 +3531,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'
......@@ -3595,7 +3599,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'
......@@ -3663,7 +3667,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'
......@@ -3733,7 +3737,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'
......@@ -3803,7 +3807,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'
......@@ -3873,7 +3877,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'
......@@ -3945,7 +3949,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'
......@@ -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_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'
......@@ -4087,7 +4091,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'
......@@ -4157,7 +4161,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'
......@@ -4226,7 +4230,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'
......@@ -4295,9 +4299,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'
......@@ -4420,7 +4425,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'
......@@ -4543,7 +4548,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'
......@@ -4666,7 +4671,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'
......@@ -4789,7 +4794,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'
......@@ -4912,7 +4917,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'
......@@ -5035,7 +5040,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'
......@@ -5162,7 +5167,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'
......@@ -5289,7 +5294,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'
......@@ -5416,7 +5421,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'
......@@ -5543,7 +5548,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'
......@@ -5670,7 +5675,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'
......@@ -5797,13 +5802,14 @@ 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;
#
# WL#4445: EXCHANGE PARTITION WITH TABLE
# Verify ddl_log and InnoDB in case of crashing.
call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was ");
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
call mtr.add_suppression("table .* does not exist in the InnoDB internal");
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -5908,7 +5914,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6013,7 +6019,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6118,7 +6124,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6223,7 +6229,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6328,7 +6334,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6433,7 +6439,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6538,7 +6544,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6643,7 +6649,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6748,7 +6754,8 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_9";
SET SESSION debug_dbug=@save_dbug;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6846,7 +6853,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6944,7 +6951,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7042,7 +7049,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7140,7 +7147,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7238,7 +7245,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7336,7 +7343,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7434,7 +7441,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7532,7 +7539,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7630,4 +7637,4 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_9";
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'
......@@ -4173,7 +4177,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'
......@@ -4254,7 +4258,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'
......@@ -4335,7 +4339,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'
......@@ -4414,7 +4418,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'
......@@ -4493,7 +4497,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'
......@@ -4570,7 +4574,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'
......@@ -4647,9 +4651,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'
......@@ -4780,7 +4785,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'
......@@ -4911,7 +4916,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'
......@@ -5042,7 +5047,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'
......@@ -5173,7 +5178,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'
......@@ -5304,7 +5309,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'
......@@ -5435,7 +5440,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'
......@@ -5572,7 +5577,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'
......@@ -5709,7 +5714,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'
......@@ -5846,7 +5851,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'
......@@ -5983,7 +5988,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'
......@@ -6120,7 +6125,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'
......@@ -6257,4 +6262,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;
......@@ -8,10 +8,6 @@
# Crash tests don't work with embedded
--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
# Partitioning test that require debug features
--echo #
......@@ -22,10 +18,11 @@ CREATE TABLE t1 (a INT, b VARCHAR(64), KEY(b,a))
PARTITION BY HASH (a) PARTITIONS 3;
INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"),
(6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine");
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,ha_partition_fail_index_init";
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
SELECT * FROM t1 WHERE b = "Seven";
SET SESSION debug_dbug="-d,ha_partition_fail_index_init";
SET SESSION debug_dbug=@save_dbug;
SELECT * FROM t1 WHERE b = "Seven";
DROP TABLE t1;
......
......@@ -9,10 +9,6 @@
# Crash tests don't work with embedded
--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--let $DATADIR= `SELECT @@datadir;`
# Waiting for wl#6723
......@@ -34,6 +30,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
......@@ -49,7 +46,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';
......@@ -27,5 +28,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 # --
......
......@@ -9,6 +9,7 @@ SET @@GLOBAL.log_output='TABLE';
FLUSH SLOW LOGS;
SET @@GLOBAL.slow_query_log=ON;
SET @@GLOBAL.log_slow_admin_statements=ON;
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,simulate_slow_query";
DELIMITER $$;
......@@ -118,7 +119,7 @@ CALL show_slow_log();
--echo # Clean up
--echo #
SET SESSION debug_dbug="-d,simulate_slow_query";
SET SESSION debug_dbug=@save_dbug;
TRUNCATE mysql.slow_log;
SET @@global.slow_query_log= @org_slow_query_log;
SET @@global.log_output= @org_log_output;
......
......@@ -8,10 +8,7 @@
--source include/have_debug.inc
--source include/have_innodb.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
......
......@@ -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;
......
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2018, MariaDB Corporation.
Copyright (c) 2016, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -2130,14 +2130,14 @@ ibuf_add_free_page(void)
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
page = buf_block_get_frame(block);
mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST,
MLOG_2BYTES, &mtr);
/* Add the page to the free list and update the ibuf size data */
flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, &mtr);
mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST,
MLOG_2BYTES, &mtr);
ibuf->seg_size++;
ibuf->free_list_len++;
......
......@@ -12,6 +12,7 @@ call mtr.add_suppression("TokuDB: 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 = 'TokuDB'
......@@ -70,7 +71,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 = 'TokuDB'
......@@ -131,7 +132,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 = 'TokuDB'
......@@ -192,7 +193,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 = 'TokuDB'
......@@ -253,7 +254,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 = 'TokuDB'
......@@ -314,7 +315,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 = 'TokuDB'
......@@ -375,7 +376,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 = 'TokuDB'
......@@ -436,7 +437,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 = 'TokuDB'
......@@ -498,7 +499,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 = 'TokuDB'
......@@ -558,7 +559,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 = 'TokuDB'
......@@ -618,8 +619,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 = 'TokuDB'
......@@ -732,7 +734,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 = 'TokuDB'
......@@ -845,7 +847,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 = 'TokuDB'
......@@ -958,7 +960,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 = 'TokuDB'
......@@ -1071,7 +1073,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 = 'TokuDB'
......@@ -1184,7 +1186,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 = 'TokuDB'
......@@ -1297,7 +1299,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 = 'TokuDB'
......@@ -1410,7 +1412,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 = 'TokuDB'
......@@ -1525,7 +1527,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 = 'TokuDB'
......@@ -1640,7 +1642,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 = 'TokuDB'
......@@ -1755,8 +1757,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 = 'TokuDB'
......@@ -1814,7 +1817,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 = 'TokuDB'
......@@ -1874,7 +1877,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 = 'TokuDB'
......@@ -1934,7 +1937,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 = 'TokuDB'
......@@ -1989,7 +1992,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 = 'TokuDB'
......@@ -2044,7 +2047,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 = 'TokuDB'
......@@ -2099,7 +2102,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 = 'TokuDB'
......@@ -2152,7 +2155,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 = 'TokuDB'
......@@ -2205,7 +2208,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 = 'TokuDB'
......@@ -2258,8 +2261,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 = 'TokuDB'
......@@ -2370,7 +2374,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 = 'TokuDB'
......@@ -2481,7 +2485,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 = 'TokuDB'
......@@ -2592,7 +2596,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 = 'TokuDB'
......@@ -2693,7 +2697,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 = 'TokuDB'
......@@ -2794,7 +2798,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 = 'TokuDB'
......@@ -2895,7 +2899,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 = 'TokuDB'
......@@ -2996,7 +3000,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 = 'TokuDB'
......@@ -3097,7 +3101,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 = 'TokuDB'
......@@ -3198,9 +3202,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 = 'TokuDB'
......@@ -3260,7 +3265,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 = 'TokuDB'
......@@ -3322,7 +3327,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 = 'TokuDB'
......@@ -3384,7 +3389,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 = 'TokuDB'
......@@ -3446,7 +3451,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 = 'TokuDB'
......@@ -3508,7 +3513,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 = 'TokuDB'
......@@ -3570,7 +3575,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 = 'TokuDB'
......@@ -3633,7 +3638,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 = 'TokuDB'
......@@ -3696,7 +3701,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 = 'TokuDB'
......@@ -3757,7 +3762,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 = 'TokuDB'
......@@ -3818,7 +3823,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 = 'TokuDB'
......@@ -3879,7 +3884,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 = 'TokuDB'
......@@ -3940,9 +3945,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 = 'TokuDB'
......@@ -4057,7 +4063,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 = 'TokuDB'
......@@ -4172,7 +4178,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 = 'TokuDB'
......@@ -4287,7 +4293,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 = 'TokuDB'
......@@ -4402,7 +4408,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 = 'TokuDB'
......@@ -4517,7 +4523,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 = 'TokuDB'
......@@ -4632,7 +4638,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 = 'TokuDB'
......@@ -4749,7 +4755,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 = 'TokuDB'
......@@ -4866,7 +4872,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 = 'TokuDB'
......@@ -4983,7 +4989,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 = 'TokuDB'
......@@ -5100,7 +5106,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 = 'TokuDB'
......@@ -5217,7 +5223,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 = 'TokuDB'
......@@ -5334,13 +5340,14 @@ 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;
#
# WL#4445: EXCHANGE PARTITION WITH TABLE
# Verify ddl_log and TokuDB in case of crashing.
call mtr.add_suppression("TokuDB: Warning: allocated tablespace .*, old maximum was ");
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
call mtr.add_suppression("table .* does not exist in the TokuDB internal");
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -5436,7 +5443,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -5532,7 +5539,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -5628,7 +5635,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -5724,7 +5731,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -5820,7 +5827,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -5916,7 +5923,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6012,7 +6019,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6108,7 +6115,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6204,7 +6211,8 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_abort_9";
SET SESSION debug_dbug=@save_dbug;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6296,7 +6304,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_1";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6388,7 +6396,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_2";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6480,7 +6488,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_3";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6572,7 +6580,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_4";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6664,7 +6672,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_5";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6756,7 +6764,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_6";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6848,7 +6856,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_7";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -6940,7 +6948,7 @@ a b
7 Original from table t2
8 Original from table t2
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_8";
SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB;
INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
......@@ -7032,4 +7040,4 @@ a b
3 Original from partition p0
4 Original from partition p0
DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_9";
SET SESSION debug_dbug=@save_dbug;
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2018, MariaDB Corporation.
Copyright (c) 2016, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -2171,14 +2171,14 @@ ibuf_add_free_page(void)
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
page = buf_block_get_frame(block);
mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST,
MLOG_2BYTES, &mtr);
/* Add the page to the free list and update the ibuf size data */
flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, &mtr);
mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST,
MLOG_2BYTES, &mtr);
ibuf->seg_size++;
ibuf->free_list_len++;
......
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