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;
......@@ -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++;
......
/*****************************************************************************
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