Commit 966d97b5 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.1 into 10.2

parents 1fd1ef25 c0c003be
...@@ -2,11 +2,10 @@ ...@@ -2,11 +2,10 @@
# #
# Index merge tests # Index merge tests
# #
# The variables # The variable
# $engine_type -- storage engine to be tested
# $merge_table_support -- 1 storage engine supports merge tables # $merge_table_support -- 1 storage engine supports merge tables
# -- 0 storage engine does not support merge tables # -- 0 storage engine does not support merge tables
# have to be set before sourcing this script. # has to be set before sourcing this script.
# #
# Note: The comments/expectations refer to MyISAM. # Note: The comments/expectations refer to MyISAM.
# They might be not valid for other storage engines. # They might be not valid for other storage engines.
...@@ -16,15 +15,10 @@ ...@@ -16,15 +15,10 @@
# old name was t/index_merge.test # old name was t/index_merge.test
# main code went into include/index_merge1.inc # main code went into include/index_merge1.inc
# #
--source include/have_sequence.inc
--echo #---------------- Index merge test 1 ------------------------------------------- --echo #---------------- Index merge test 1 -------------------------------------------
eval SET SESSION STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t0, t1, t2, t3, t4;
--enable_warnings
# Create and fill a table with simple keys # Create and fill a table with simple keys
create table t0 create table t0
( (
...@@ -32,20 +26,7 @@ create table t0 ...@@ -32,20 +26,7 @@ create table t0
INDEX i1(key1) INDEX i1(key1)
); );
--disable_query_log insert into t0(key1) select seq from seq_1_to_1024;
insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8);
let $1=7;
set @d=8;
begin;
while ($1)
{
eval insert into t0 select key1+@d from t0;
eval set @d=@d*2;
dec $1;
}
commit;
--enable_query_log
alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key2 int not null, add index i2(key2);
alter table t0 add key3 int not null, add index i3(key3); alter table t0 add key3 int not null, add index i3(key3);
...@@ -217,7 +198,7 @@ create table t4 ( ...@@ -217,7 +198,7 @@ create table t4 (
index i2_2(key2, key2_1) index i2_2(key2, key2_1)
); );
insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0; insert into t4 select seq,seq,seq div 10, seq % 10, seq % 10, seq from seq_1_to_1024;
# the following will be handled by index_merge: # the following will be handled by index_merge:
select * from t4 where key1a = 3 or key1b = 4; select * from t4 where key1a = 3 or key1b = 4;
...@@ -392,14 +373,13 @@ if ($merge_table_support) ...@@ -392,14 +373,13 @@ if ($merge_table_support)
# #
# BUG#17314: Index_merge/intersection not choosen by the optimizer for MERGE tables # BUG#17314: Index_merge/intersection not choosen by the optimizer for MERGE tables
# #
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 ( create table t1 (
a int, b int, a int, b int,
filler1 char(200), filler2 char(200), filler1 char(200), filler2 char(200),
key(a),key(b) key(a),key(b)
); );
insert into t1 select @v:= A.a, @v, 't1', 'filler2' from t0 A, t0 B, t0 C; insert into t1 select @v:= seq % 10, @v, 't1', 'filler2' from seq_1_to_1000;
create table t2 like t1; create table t2 like t1;
create table t3 ( create table t3 (
...@@ -413,8 +393,7 @@ explain select * from t1 where a=1 and b=1; ...@@ -413,8 +393,7 @@ explain select * from t1 where a=1 and b=1;
--replace_column 9 # --replace_column 9 #
explain select * from t3 where a=1 and b=1; explain select * from t3 where a=1 and b=1;
drop table t3; drop table t1, t2, t3;
drop table t0, t1, t2;
} }
# #
...@@ -513,16 +492,13 @@ DROP TABLE t1; ...@@ -513,16 +492,13 @@ DROP TABLE t1;
--echo # --echo #
--echo # BUG#40974: Incorrect query results when using clause evaluated using range check --echo # BUG#40974: Incorrect query results when using clause evaluated using range check
--echo # --echo #
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int); create table t1 (a int);
insert into t1 values (1),(2); insert into t1 values (1),(2);
create table t2(a int, b int); create table t2(a int, b int);
insert into t2 values (1,1), (2, 1000); insert into t2 values (1,1), (2, 1000);
create table t3 (a int, b int, filler char(100), key(a), key(b)); create table t3 (a int, b int, filler char(100), key(a), key(b));
insert into t3 select 1000, 1000,'filler' from t0 A, t0 B, t0 C; insert into t3 select 1000, 1000,'filler' from seq_1_to_1000;
insert into t3 values (1,1,'data'); insert into t3 values (1,1,'data');
insert into t3 values (1,1,'data'); insert into t3 values (1,1,'data');
-- echo The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3) -- echo The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3)
...@@ -534,20 +510,14 @@ select * from t1 ...@@ -534,20 +510,14 @@ select * from t1
where exists (select 1 from t2, t3 where exists (select 1 from t2, t3
where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1));
drop table t0, t1, t2, t3; drop table t1, t2, t3;
--echo # --echo #
--echo # BUG#44810: index merge and order by with low sort_buffer_size --echo # BUG#44810: index merge and order by with low sort_buffer_size
--echo # crashes server! --echo # crashes server!
--echo # --echo #
CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B)); CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B));
INSERT INTO t1 VALUES (REPEAT('a',128),REPEAT('b',128)); INSERT INTO t1 SELECT REPEAT('a',128),REPEAT('b',128) FROM seq_1_to_64;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
SET SESSION sort_buffer_size=1024*8; SET SESSION sort_buffer_size=1024*8;
EXPLAIN EXPLAIN
SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%'
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
# #
# Index merge tests # Index merge tests
# #
# The variable
# $engine_type -- storage engine to be tested
# has to be set before sourcing this script.
#
# Note: The comments/expectations refer to InnoDB. # Note: The comments/expectations refer to InnoDB.
# They might be not valid for other storage engines. # They might be not valid for other storage engines.
# #
...@@ -14,15 +10,10 @@ ...@@ -14,15 +10,10 @@
# old name was t/index_merge_innodb.test # old name was t/index_merge_innodb.test
# main code went into include/index_merge2.inc # main code went into include/index_merge2.inc
# #
--source include/have_sequence.inc
--echo #---------------- Index merge test 2 ------------------------------------------- --echo #---------------- Index merge test 2 -------------------------------------------
eval SET SESSION STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
create table t1 create table t1
( (
key1 int not null, key1 int not null,
...@@ -32,16 +23,7 @@ create table t1 ...@@ -32,16 +23,7 @@ create table t1
INDEX i2(key2) INDEX i2(key2)
); );
--disable_query_log INSERT INTO t1 SELECT seq,200-seq FROM seq_0_to_200;
let $1=200;
begin;
while ($1)
{
eval insert into t1 values (200-$1, $1);
dec $1;
}
commit;
--enable_query_log
# No primary key # No primary key
explain select * from t1 where key1 < 5 or key2 > 197; explain select * from t1 where key1 < 5 or key2 > 197;
...@@ -80,16 +62,8 @@ create table t1 ( ...@@ -80,16 +62,8 @@ create table t1 (
index (key2) index (key2)
); );
show warnings; show warnings;
--disable_query_log INSERT INTO t1 (key1, key2, filler)
let $1=30; SELECT seq/4, seq/8, 'filler-data' FROM seq_30_to_0;
begin;
while ($1)
{
eval insert into t1 (key1, key2, filler) values ($1/4, $1/8, 'filler-data');
dec $1;
}
commit;
--enable_query_log
explain select pk from t1 where key1 = 1 and key2 = 1; explain select pk from t1 where key1 = 1 and key2 = 1;
select pk from t1 where key2 = 1 and key1 = 1; select pk from t1 where key2 = 1 and key1 = 1;
select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1; select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1;
...@@ -331,19 +305,7 @@ create table t1 ...@@ -331,19 +305,7 @@ create table t1
key3 int not null default 0 key3 int not null default 0
); );
insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); insert into t1(key1) select seq from seq_1_to_1024;
let $1=7;
set @d=8;
begin;
while ($1)
{
eval insert into t1 (key1) select key1+@d from t1;
eval set @d=@d*2;
dec $1;
}
commit;
alter table t1 add index i2(key2); alter table t1 add index i2(key2);
alter table t1 add index i3(key3); alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1; update t1 set key2=key1,key3=key1;
......
...@@ -2,24 +2,15 @@ ...@@ -2,24 +2,15 @@
# #
# 2-sweeps read Index_merge test # 2-sweeps read Index_merge test
# #
# The variable
# $engine_type -- storage engine to be tested
# has to be set before sourcing this script.
#
# Last update: # Last update:
# 2006-08-02 ML test refactored # 2006-08-02 ML test refactored
# old name was index_merge_innodb2.test # old name was index_merge_innodb2.test
# main code went into include/index_merge_2sweeps.inc # main code went into include/index_merge_2sweeps.inc
# #
--source include/have_sequence.inc
--echo #---------------- 2-sweeps read Index merge test 2 ------------------------------- --echo #---------------- 2-sweeps read Index merge test 2 -------------------------------
eval SET SESSION STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1 ( create table t1 (
pk int primary key, pk int primary key,
key1 int, key1 int,
...@@ -30,17 +21,8 @@ create table t1 ( ...@@ -30,17 +21,8 @@ create table t1 (
index(key2) index(key2)
); );
insert into t1 select seq, seq, seq, 'filler-data', 'filler-data-2'
--disable_query_log from seq_1000_to_1;
begin;
let $1=1000;
while ($1)
{
eval insert into t1 values($1, $1, $1, 'filler-data','filler-data-2');
dec $1;
}
commit;
--enable_query_log
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
......
...@@ -17,11 +17,6 @@ ...@@ -17,11 +17,6 @@
--echo #---------------- ROR-index_merge tests ----------------------- --echo #---------------- ROR-index_merge tests -----------------------
eval SET SESSION STORAGE_ENGINE = $engine_type;
--disable_warnings
drop table if exists t0,t1,t2;
--enable_warnings
create table t1 create table t1
( (
/* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */ /* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
# #
# Clustered PK ROR-index_merge tests # Clustered PK ROR-index_merge tests
# #
# The variable
# $engine_type -- storage engine to be tested
# has to be set before sourcing this script.
#
# Note: The comments/expectations refer to InnoDB. # Note: The comments/expectations refer to InnoDB.
# They might be not valid for other storage engines. # They might be not valid for other storage engines.
# #
...@@ -15,13 +11,9 @@ ...@@ -15,13 +11,9 @@
# main code went into include/index_merge_ror_cpk.inc # main code went into include/index_merge_ror_cpk.inc
# #
--echo #---------------- Clustered PK ROR-index_merge tests ----------------------------- --source include/have_sequence.inc
eval SET SESSION STORAGE_ENGINE = $engine_type;
--disable_warnings --echo #---------------- Clustered PK ROR-index_merge tests -----------------------------
drop table if exists t1;
--enable_warnings
create table t1 create table t1
( (
......
SET @save_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type'; set debug_dbug='+d,unstable_db_type';
install soname 'ha_archive'; install soname 'ha_archive';
create table t1 (a int) engine=archive; create table t1 (a int) engine=archive;
...@@ -32,4 +33,4 @@ t1.frm ...@@ -32,4 +33,4 @@ t1.frm
drop table t1; drop table t1;
db.opt db.opt
uninstall soname 'ha_archive'; uninstall soname 'ha_archive';
set debug_dbug='-d,unstable_db_type'; set debug_dbug=@save_dbug;
connect disable_purge,localhost,root,,;
# Disable the purge of InnoDB history, to make the test run faster.
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
SET STORAGE_ENGINE = InnoDB;
set @optimizer_switch_save= @@optimizer_switch; set @optimizer_switch_save= @@optimizer_switch;
set optimizer_switch='index_merge_sort_intersection=off'; set optimizer_switch='index_merge_sort_intersection=off';
#---------------- Index merge test 2 ------------------------------------------- #---------------- Index merge test 2 -------------------------------------------
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1,t2;
create table t1 create table t1
( (
key1 int not null, key1 int not null,
...@@ -10,6 +13,7 @@ key2 int not null, ...@@ -10,6 +13,7 @@ key2 int not null,
INDEX i1(key1), INDEX i1(key1),
INDEX i2(key2) INDEX i2(key2)
); );
INSERT INTO t1 SELECT seq,200-seq FROM seq_0_to_200;
explain select * from t1 where key1 < 5 or key2 > 197; explain select * from t1 where key1 < 5 or key2 > 197;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where 1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 8 Using sort_union(i1,i2); Using where
...@@ -67,6 +71,8 @@ index (key2) ...@@ -67,6 +71,8 @@ index (key2)
); );
show warnings; show warnings;
Level Code Message Level Code Message
INSERT INTO t1 (key1, key2, filler)
SELECT seq/4, seq/8, 'filler-data' FROM seq_30_to_0;
explain select pk from t1 where key1 = 1 and key2 = 1; explain select pk from t1 where key1 = 1 and key2 = 1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge key1,key2 key1,key2 5,4 NULL 1 Using intersect(key1,key2); Using where; Using index 1 SIMPLE t1 index_merge key1,key2 key1,key2 5,4 NULL 1 Using intersect(key1,key2); Using where; Using index
...@@ -292,24 +298,7 @@ key1 int not null, ...@@ -292,24 +298,7 @@ key1 int not null,
key2 int not null default 0, key2 int not null default 0,
key3 int not null default 0 key3 int not null default 0
); );
insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); insert into t1(key1) select seq from seq_1_to_1024;
set @d=8;
begin;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
commit;
alter table t1 add index i2(key2); alter table t1 add index i2(key2);
alter table t1 add index i3(key3); alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1; update t1 set key2=key1,key3=key1;
...@@ -388,8 +377,6 @@ a b ...@@ -388,8 +377,6 @@ a b
1 b 1 b
DROP TABLE t1, t2; DROP TABLE t1, t2;
#---------------- 2-sweeps read Index merge test 2 ------------------------------- #---------------- 2-sweeps read Index merge test 2 -------------------------------
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1;
create table t1 ( create table t1 (
pk int primary key, pk int primary key,
key1 int, key1 int,
...@@ -399,6 +386,8 @@ filler2 char(200), ...@@ -399,6 +386,8 @@ filler2 char(200),
index(key1), index(key1),
index(key2) index(key2)
); );
insert into t1 select seq, seq, seq, 'filler-data', 'filler-data-2'
from seq_1000_to_1;
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
pk key1 key2 filler filler2 pk key1 key2 filler filler2
2 2 2 filler-data filler-data-2 2 2 2 filler-data filler-data-2
...@@ -526,8 +515,6 @@ pk key1 key2 filler filler2 ...@@ -526,8 +515,6 @@ pk key1 key2 filler filler2
54 54 54 filler-data filler-data-2 54 54 54 filler-data filler-data-2
drop table t1; drop table t1;
#---------------- Clustered PK ROR-index_merge tests ----------------------------- #---------------- Clustered PK ROR-index_merge tests -----------------------------
SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1;
create table t1 create table t1
( (
pk1 int not null, pk1 int not null,
...@@ -668,34 +655,27 @@ DROP TABLE t1,t2; ...@@ -668,34 +655,27 @@ DROP TABLE t1,t2;
# #
# BUG#56862/640419: Wrong result with sort_union index merge when one # BUG#56862/640419: Wrong result with sort_union index merge when one
# of the merged index scans is the primary key scan # of the merged index scans is the primary key scan
# #
CREATE TABLE t0(a int, b int) ENGINE=MyISAM;
CREATE TABLE t1 ( CREATE TABLE t1 (
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
a int, a int,
b int, b int,
INDEX idx(a)) INDEX idx(a))
ENGINE=INNODB; ENGINE=INNODB;
begin; INSERT INTO t0(a,b) VALUES
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; INSERT INTO t0(a,b) SELECT a+20, b+2000 FROM t0;
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; INSERT INTO t0(a,b) SELECT a+40, b+4000 FROM t0;
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; INSERT INTO t0(a,b) SELECT a+80, b+8000 FROM t0;
INSERT INTO t1(a,b) SELECT a,b FROM t1; begin;
INSERT INTO t1(a,b) SELECT a,b FROM t1; INSERT INTO t1(a,b) SELECT t0.a,t0.b FROM t0, seq_1_to_1024;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0); INSERT INTO t1 VALUES (1000000, 0, 0);
commit; commit;
DROP TABLE t0;
SET SESSION sort_buffer_size = 1024*36; SET SESSION sort_buffer_size = 1024*36;
set @tmp_optimizer_switch=@@optimizer_switch; set @tmp_optimizer_switch=@@optimizer_switch;
set optimizer_switch='derived_merge=off,derived_with_keys=off'; set optimizer_switch='derived_merge=off,derived_with_keys=off';
...@@ -759,8 +739,6 @@ DROP TABLE t1; ...@@ -759,8 +739,6 @@ DROP TABLE t1;
# #
# BUG#1006164: Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows # BUG#1006164: Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows
# #
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 ( create table t1 (
pk int auto_increment, pk int auto_increment,
zone_id int, zone_id int,
...@@ -769,7 +747,7 @@ primary key(pk), ...@@ -769,7 +747,7 @@ primary key(pk),
key (zone_id), key (zone_id),
key (modified) key (modified)
) engine=innodb; ) engine=innodb;
insert into t1 (zone_id, modified) select 0,0 from t0 A, t0 B, t0 C, t0 D; insert into t1 (zone_id, modified) select 0,0 from seq_1_to_10000;
update t1 set zone_id=487, modified=9 where pk=7259; update t1 set zone_id=487, modified=9 where pk=7259;
update t1 set zone_id=487, modified=9 where pk=7260; update t1 set zone_id=487, modified=9 where pk=7260;
update t1 set zone_id=830, modified=9 where pk=8434; update t1 set zone_id=830, modified=9 where pk=8434;
...@@ -787,7 +765,7 @@ DELETE t1 FROM t1 WHERE t1.zone_id=830 AND modified=9; ...@@ -787,7 +765,7 @@ DELETE t1 FROM t1 WHERE t1.zone_id=830 AND modified=9;
commit; commit;
select * from t1 where t1.zone_id=830 AND modified=9; select * from t1 where t1.zone_id=830 AND modified=9;
pk zone_id modified pk zone_id modified
drop table t0, t1; drop table t1;
# #
# MDEV-376: Wrong result (missing rows) with index_merge+index_merge_intersection, join # MDEV-376: Wrong result (missing rows) with index_merge+index_merge_intersection, join
# #
...@@ -822,14 +800,11 @@ PRIMARY KEY (pk), ...@@ -822,14 +800,11 @@ PRIMARY KEY (pk),
KEY key1 (key1), KEY key1 (key1),
KEY key2 (key2) KEY key2 (key2)
) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; ) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
create table t2(a int);
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t3(a int);
insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D;
insert into t1 (key1, key2, col1,col2,col3,col4) insert into t1 (key1, key2, col1,col2,col3,col4)
select a,a, a,a,a,a from t3; select seq,seq,seq,seq,seq,seq from seq_1_to_10000;
SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5); SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5);
sum(col1) sum(col1)
33632261 33632261
drop table t1,t2,t3; drop table t1;
set optimizer_switch=@tmp_optimizer_switch; set optimizer_switch=@tmp_optimizer_switch;
disconnect disable_purge;
SET STORAGE_ENGINE = MyISAM;
set @optimizer_switch_save= @@optimizer_switch; set @optimizer_switch_save= @@optimizer_switch;
set optimizer_switch='index_merge_sort_intersection=off'; set optimizer_switch='index_merge_sort_intersection=off';
#---------------- Index merge test 1 ------------------------------------------- #---------------- Index merge test 1 -------------------------------------------
SET SESSION STORAGE_ENGINE = MyISAM;
drop table if exists t0, t1, t2, t3, t4;
create table t0 create table t0
( (
key1 int not null, key1 int not null,
INDEX i1(key1) INDEX i1(key1)
); );
insert into t0(key1) select seq from seq_1_to_1024;
alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key2 int not null, add index i2(key2);
alter table t0 add key3 int not null, add index i3(key3); alter table t0 add key3 int not null, add index i3(key3);
alter table t0 add key4 int not null, add index i4(key4); alter table t0 add key4 int not null, add index i4(key4);
...@@ -228,7 +228,7 @@ index i2_2(key2, key2_1) ...@@ -228,7 +228,7 @@ index i2_2(key2, key2_1)
); );
Warnings: Warnings:
Note 1831 Duplicate index `i2_2`. This is deprecated and will be disallowed in a future release Note 1831 Duplicate index `i2_2`. This is deprecated and will be disallowed in a future release
insert into t4 select key1,key1,key1 div 10, key1 % 10, key1 % 10, key1 from t0; insert into t4 select seq,seq,seq div 10, seq % 10, seq % 10, seq from seq_1_to_1024;
select * from t4 where key1a = 3 or key1b = 4; select * from t4 where key1a = 3 or key1b = 4;
key1a key1b key2 key2_1 key2_2 key3 key1a key1b key2 key2_1 key2_2 key3
3 3 0 3 3 3 3 3 0 3 3 3
...@@ -414,14 +414,12 @@ explain select * from t1 force index(cola,colb) WHERE cola = 'foo' AND colb = 'b ...@@ -414,14 +414,12 @@ explain select * from t1 force index(cola,colb) WHERE cola = 'foo' AND colb = 'b
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge cola,colb cola,colb 3,3 NULL 32 Using intersect(cola,colb); Using where 1 SIMPLE t1 index_merge cola,colb cola,colb 3,3 NULL 32 Using intersect(cola,colb); Using where
drop table t1; drop table t1;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 ( create table t1 (
a int, b int, a int, b int,
filler1 char(200), filler2 char(200), filler1 char(200), filler2 char(200),
key(a),key(b) key(a),key(b)
); );
insert into t1 select @v:= A.a, @v, 't1', 'filler2' from t0 A, t0 B, t0 C; insert into t1 select @v:= seq % 10, @v, 't1', 'filler2' from seq_1_to_1000;
create table t2 like t1; create table t2 like t1;
create table t3 ( create table t3 (
a int, b int, a int, b int,
...@@ -434,8 +432,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -434,8 +432,7 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select * from t3 where a=1 and b=1; explain select * from t3 where a=1 and b=1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index_merge a,b a,b 5,5 NULL # Using intersect(a,b); Using where 1 SIMPLE t3 index_merge a,b a,b 5,5 NULL # Using intersect(a,b); Using where
drop table t3; drop table t1, t2, t3;
drop table t0, t1, t2;
CREATE TABLE t1(a INT); CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(1);
CREATE TABLE t2(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b)); CREATE TABLE t2(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b));
...@@ -540,14 +537,12 @@ DROP TABLE t1; ...@@ -540,14 +537,12 @@ DROP TABLE t1;
# #
# BUG#40974: Incorrect query results when using clause evaluated using range check # BUG#40974: Incorrect query results when using clause evaluated using range check
# #
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int); create table t1 (a int);
insert into t1 values (1),(2); insert into t1 values (1),(2);
create table t2(a int, b int); create table t2(a int, b int);
insert into t2 values (1,1), (2, 1000); insert into t2 values (1,1), (2, 1000);
create table t3 (a int, b int, filler char(100), key(a), key(b)); create table t3 (a int, b int, filler char(100), key(a), key(b));
insert into t3 select 1000, 1000,'filler' from t0 A, t0 B, t0 C; insert into t3 select 1000, 1000,'filler' from seq_1_to_1000;
insert into t3 values (1,1,'data'); insert into t3 values (1,1,'data');
insert into t3 values (1,1,'data'); insert into t3 values (1,1,'data');
The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3) The plan should be ALL/ALL/ALL(Range checked for each record (index map: 0x3)
...@@ -564,19 +559,13 @@ where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1)); ...@@ -564,19 +559,13 @@ where t2.a=t1.a and (t3.a=t2.b or t3.b=t2.b or t3.b=t2.b+1));
a a
1 1
2 2
drop table t0, t1, t2, t3; drop table t1, t2, t3;
# #
# BUG#44810: index merge and order by with low sort_buffer_size # BUG#44810: index merge and order by with low sort_buffer_size
# crashes server! # crashes server!
# #
CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B)); CREATE TABLE t1(a VARCHAR(128),b VARCHAR(128),KEY(A),KEY(B));
INSERT INTO t1 VALUES (REPEAT('a',128),REPEAT('b',128)); INSERT INTO t1 SELECT REPEAT('a',128),REPEAT('b',128) FROM seq_1_to_64;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
SET SESSION sort_buffer_size=1024*8; SET SESSION sort_buffer_size=1024*8;
EXPLAIN EXPLAIN
SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%' SELECT * FROM t1 FORCE INDEX(a,b) WHERE a LIKE 'a%' OR b LIKE 'b%'
...@@ -589,8 +578,6 @@ SET SESSION sort_buffer_size=DEFAULT; ...@@ -589,8 +578,6 @@ SET SESSION sort_buffer_size=DEFAULT;
DROP TABLE t1; DROP TABLE t1;
End of 5.0 tests End of 5.0 tests
#---------------- ROR-index_merge tests ----------------------- #---------------- ROR-index_merge tests -----------------------
SET SESSION STORAGE_ENGINE = MyISAM;
drop table if exists t0,t1,t2;
create table t1 create table t1
( (
/* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */ /* Field names reflect value(rowid) distribution, st=STairs, swt= SaWTooth */
...@@ -839,8 +826,6 @@ SELECT * FROM t1; ...@@ -839,8 +826,6 @@ SELECT * FROM t1;
c1 c2 c3 c1 c2 c3
DROP TABLE t1,t2; DROP TABLE t1,t2;
#---------------- Index merge test 2 ------------------------------------------- #---------------- Index merge test 2 -------------------------------------------
SET SESSION STORAGE_ENGINE = MyISAM;
drop table if exists t1,t2;
create table t1 create table t1
( (
key1 int not null, key1 int not null,
...@@ -848,6 +833,7 @@ key2 int not null, ...@@ -848,6 +833,7 @@ key2 int not null,
INDEX i1(key1), INDEX i1(key1),
INDEX i2(key2) INDEX i2(key2)
); );
INSERT INTO t1 SELECT seq,200-seq FROM seq_0_to_200;
explain select * from t1 where key1 < 5 or key2 > 197; explain select * from t1 where key1 < 5 or key2 > 197;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where 1 SIMPLE t1 index_merge i1,i2 i1,i2 4,4 NULL 10 Using sort_union(i1,i2); Using where
...@@ -905,6 +891,8 @@ index (key2) ...@@ -905,6 +891,8 @@ index (key2)
); );
show warnings; show warnings;
Level Code Message Level Code Message
INSERT INTO t1 (key1, key2, filler)
SELECT seq/4, seq/8, 'filler-data' FROM seq_30_to_0;
explain select pk from t1 where key1 = 1 and key2 = 1; explain select pk from t1 where key1 = 1 and key2 = 1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,key2 key1 5 const 4 Using where 1 SIMPLE t1 ref key1,key2 key1 5 const 4 Using where
...@@ -1130,24 +1118,7 @@ key1 int not null, ...@@ -1130,24 +1118,7 @@ key1 int not null,
key2 int not null default 0, key2 int not null default 0,
key3 int not null default 0 key3 int not null default 0
); );
insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); insert into t1(key1) select seq from seq_1_to_1024;
set @d=8;
begin;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
insert into t1 (key1) select key1+@d from t1;
set @d=@d*2;
commit;
alter table t1 add index i2(key2); alter table t1 add index i2(key2);
alter table t1 add index i3(key3); alter table t1 add index i3(key3);
update t1 set key2=key1,key3=key1; update t1 set key2=key1,key3=key1;
...@@ -1226,8 +1197,6 @@ a b ...@@ -1226,8 +1197,6 @@ a b
1 b 1 b
DROP TABLE t1, t2; DROP TABLE t1, t2;
#---------------- 2-sweeps read Index merge test 2 ------------------------------- #---------------- 2-sweeps read Index merge test 2 -------------------------------
SET SESSION STORAGE_ENGINE = MyISAM;
drop table if exists t1;
create table t1 ( create table t1 (
pk int primary key, pk int primary key,
key1 int, key1 int,
...@@ -1237,6 +1206,8 @@ filler2 char(200), ...@@ -1237,6 +1206,8 @@ filler2 char(200),
index(key1), index(key1),
index(key2) index(key2)
); );
insert into t1 select seq, seq, seq, 'filler-data', 'filler-data-2'
from seq_1000_to_1;
select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 ); select * from t1 where (key1 >= 2 and key1 <= 10) or (pk >= 4 and pk <=8 );
pk key1 key2 filler filler2 pk key1 key2 filler filler2
10 10 10 filler-data filler-data-2 10 10 10 filler-data filler-data-2
...@@ -1364,8 +1335,6 @@ pk key1 key2 filler filler2 ...@@ -1364,8 +1335,6 @@ pk key1 key2 filler filler2
1 1 1 filler-data filler-data-2 1 1 1 filler-data filler-data-2
drop table t1; drop table t1;
#---------------- Clustered PK ROR-index_merge tests ----------------------------- #---------------- Clustered PK ROR-index_merge tests -----------------------------
SET SESSION STORAGE_ENGINE = MyISAM;
drop table if exists t1;
create table t1 create table t1
( (
pk1 int not null, pk1 int not null,
...@@ -1726,22 +1695,7 @@ create table t0 ...@@ -1726,22 +1695,7 @@ create table t0
key1 int not null, key1 int not null,
INDEX i1(key1) INDEX i1(key1)
); );
insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); insert into t0 select * from seq_1_to_1024;
set @d=8;
insert into t0 select key1+ @d from t0;
set @d=@d*2;
insert into t0 select key1+ @d from t0;
set @d=@d*2;
insert into t0 select key1+ @d from t0;
set @d=@d*2;
insert into t0 select key1+ @d from t0;
set @d=@d*2;
insert into t0 select key1+ @d from t0;
set @d=@d*2;
insert into t0 select key1+ @d from t0;
set @d=@d*2;
insert into t0 select key1+ @d from t0;
set @d=@d*2;
alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key2 int not null, add index i2(key2);
alter table t0 add key3 int not null, add index i3(key3); alter table t0 add key3 int not null, add index i3(key3);
alter table t0 add key8 int not null, add index i8(key8); alter table t0 add key8 int not null, add index i8(key8);
......
...@@ -6,6 +6,7 @@ SET @@GLOBAL.log_output='TABLE'; ...@@ -6,6 +6,7 @@ SET @@GLOBAL.log_output='TABLE';
FLUSH SLOW LOGS; FLUSH SLOW LOGS;
SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.slow_query_log=ON;
SET @@GLOBAL.log_slow_admin_statements=ON; SET @@GLOBAL.log_slow_admin_statements=ON;
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,simulate_slow_query"; SET SESSION debug_dbug="+d,simulate_slow_query";
CREATE PROCEDURE show_slow_log() CREATE PROCEDURE show_slow_log()
BEGIN BEGIN
...@@ -129,7 +130,7 @@ sql_text ...@@ -129,7 +130,7 @@ sql_text
# #
# Clean up # Clean up
# #
SET SESSION debug_dbug="-d,simulate_slow_query"; SET SESSION debug_dbug=@save_dbug;
TRUNCATE mysql.slow_log; TRUNCATE mysql.slow_log;
SET @@global.slow_query_log= @org_slow_query_log; SET @@global.slow_query_log= @org_slow_query_log;
SET @@global.log_output= @org_log_output; SET @@global.log_output= @org_log_output;
......
DROP TABLE IF EXISTS t1, t2;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
# #
# Bug#42438: Crash ha_partition::change_table_ptr # Bug#42438: Crash ha_partition::change_table_ptr
......
...@@ -919,6 +919,7 @@ END; ...@@ -919,6 +919,7 @@ END;
CLOSE c; CLOSE c;
SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack
END| END|
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,bug23032_emit_warning"; SET SESSION debug_dbug="+d,bug23032_emit_warning";
CALL p1(); CALL p1();
Warning found! Warning found!
...@@ -938,7 +939,7 @@ End of Result Set found! ...@@ -938,7 +939,7 @@ End of Result Set found!
Level Code Message Level Code Message
Warning 1105 Unknown error Warning 1105 Unknown error
Error 1329 No data - zero rows fetched, selected, or processed Error 1329 No data - zero rows fetched, selected, or processed
SET SESSION debug_dbug="-d,bug23032_emit_warning"; SET SESSION debug_dbug=@save_dbug;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
# #
......
# To be used with partition mgm commands like # To be used with partition mgm commands like
# ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING). # ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING).
--echo # Crash testing ADD PARTITION --echo # Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1"; SET SESSION debug_dbug="+d,crash_add_partition_1";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_2"; SET SESSION debug_dbug="+d,crash_add_partition_2";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_3"; SET SESSION debug_dbug="+d,crash_add_partition_3";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_4"; SET SESSION debug_dbug="+d,crash_add_partition_4";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_5"; SET SESSION debug_dbug="+d,crash_add_partition_5";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_6"; SET SESSION debug_dbug="+d,crash_add_partition_6";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_7"; SET SESSION debug_dbug="+d,crash_add_partition_7";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_8"; SET SESSION debug_dbug="+d,crash_add_partition_8";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_9"; SET SESSION debug_dbug="+d,crash_add_partition_9";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_10"; SET SESSION debug_dbug="+d,crash_add_partition_10";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
...@@ -2,39 +2,40 @@ ...@@ -2,39 +2,40 @@
# ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION. # ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION.
--echo # Test change partition (REORGANIZE/REBUILD/COALESCE --echo # Test change partition (REORGANIZE/REBUILD/COALESCE
--echo # or ADD HASH PARTITION). --echo # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1"; SET SESSION debug_dbug="+d,crash_change_partition_1";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_2"; SET SESSION debug_dbug="+d,crash_change_partition_2";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_3"; SET SESSION debug_dbug="+d,crash_change_partition_3";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_4"; SET SESSION debug_dbug="+d,crash_change_partition_4";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_5"; SET SESSION debug_dbug="+d,crash_change_partition_5";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_6"; SET SESSION debug_dbug="+d,crash_change_partition_6";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_7"; SET SESSION debug_dbug="+d,crash_change_partition_7";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_8"; SET SESSION debug_dbug="+d,crash_change_partition_8";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_9"; SET SESSION debug_dbug="+d,crash_change_partition_9";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_10"; SET SESSION debug_dbug="+d,crash_change_partition_10";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_10"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_11"; SET SESSION debug_dbug="+d,crash_change_partition_11";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_11"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_12"; SET SESSION debug_dbug="+d,crash_change_partition_12";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_change_partition_12"; SET SESSION debug_dbug=@save_dbug;
# To be used with partition mgm commands like # To be used with partition mgm commands like
# ALTER TABLE t1 DROP PARTITION. # ALTER TABLE t1 DROP PARTITION.
--echo # Test DROP PARTITION --echo # Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1"; SET SESSION debug_dbug="+d,crash_drop_partition_1";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_2"; SET SESSION debug_dbug="+d,crash_drop_partition_2";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_3"; SET SESSION debug_dbug="+d,crash_drop_partition_3";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_4"; SET SESSION debug_dbug="+d,crash_drop_partition_4";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_5"; SET SESSION debug_dbug="+d,crash_drop_partition_5";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_6"; SET SESSION debug_dbug="+d,crash_drop_partition_6";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_7"; SET SESSION debug_dbug="+d,crash_drop_partition_7";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_8"; SET SESSION debug_dbug="+d,crash_drop_partition_8";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_9"; SET SESSION debug_dbug="+d,crash_drop_partition_9";
--source suite/parts/inc/partition_crash.inc --source suite/parts/inc/partition_crash.inc
SET SESSION debug_dbug="-d,crash_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# To be used with WL#4445: EXCHANGE PARTITION WITH TABLE. # To be used with WL#4445: EXCHANGE PARTITION WITH TABLE.
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_abort_1"; SET SESSION debug_dbug="+d,exchange_partition_abort_1";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_2";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_3";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_4";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_5";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_6";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_7";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_8";
--source suite/parts/inc/partition_crash_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_abort_9";
--source suite/parts/inc/partition_crash_t2.inc --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 # To be used with partition mgm commands like
# ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING). # ALTER TABLE t1 ADD PARTITION (LIST/RANGE PARTITIONING).
--echo # Error recovery testing ADD PARTITION --echo # Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1"; SET SESSION debug_dbug="+d,fail_add_partition_1";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_2"; SET SESSION debug_dbug="+d,fail_add_partition_2";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_3"; SET SESSION debug_dbug="+d,fail_add_partition_3";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_4"; SET SESSION debug_dbug="+d,fail_add_partition_4";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_5"; SET SESSION debug_dbug="+d,fail_add_partition_5";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_6"; SET SESSION debug_dbug="+d,fail_add_partition_6";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_7"; SET SESSION debug_dbug="+d,fail_add_partition_7";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_8"; SET SESSION debug_dbug="+d,fail_add_partition_8";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_9"; SET SESSION debug_dbug="+d,fail_add_partition_9";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_10"; SET SESSION debug_dbug="+d,fail_add_partition_10";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
...@@ -2,39 +2,40 @@ ...@@ -2,39 +2,40 @@
# ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION. # ALTER TABLE t1 COALESCE/REBUILD/REORGANIZE PARTITION.
--echo # Error recovery change partition (REORGANIZE/REBUILD/COALESCE --echo # Error recovery change partition (REORGANIZE/REBUILD/COALESCE
--echo # or ADD HASH PARTITION). --echo # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1"; SET SESSION debug_dbug="+d,fail_change_partition_1";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_2"; SET SESSION debug_dbug="+d,fail_change_partition_2";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_3"; SET SESSION debug_dbug="+d,fail_change_partition_3";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_4"; SET SESSION debug_dbug="+d,fail_change_partition_4";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_5"; SET SESSION debug_dbug="+d,fail_change_partition_5";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_6"; SET SESSION debug_dbug="+d,fail_change_partition_6";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_7"; SET SESSION debug_dbug="+d,fail_change_partition_7";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_8"; SET SESSION debug_dbug="+d,fail_change_partition_8";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_9"; SET SESSION debug_dbug="+d,fail_change_partition_9";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_10"; SET SESSION debug_dbug="+d,fail_change_partition_10";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_10"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_11"; SET SESSION debug_dbug="+d,fail_change_partition_11";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_11"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_12"; SET SESSION debug_dbug="+d,fail_change_partition_12";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_change_partition_12"; SET SESSION debug_dbug=@save_dbug;
# To be used with partition mgm commands like # To be used with partition mgm commands like
# ALTER TABLE t1 DROP PARTITION. # ALTER TABLE t1 DROP PARTITION.
--echo # Error recovery DROP PARTITION --echo # Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1"; SET SESSION debug_dbug="+d,fail_drop_partition_1";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_1"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_2"; SET SESSION debug_dbug="+d,fail_drop_partition_2";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_2"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_3"; SET SESSION debug_dbug="+d,fail_drop_partition_3";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_3"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_4"; SET SESSION debug_dbug="+d,fail_drop_partition_4";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_4"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_5"; SET SESSION debug_dbug="+d,fail_drop_partition_5";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_5"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_6"; SET SESSION debug_dbug="+d,fail_drop_partition_6";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_6"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_7"; SET SESSION debug_dbug="+d,fail_drop_partition_7";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_7"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_8"; SET SESSION debug_dbug="+d,fail_drop_partition_8";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_8"; SET SESSION debug_dbug=@save_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_9"; SET SESSION debug_dbug="+d,fail_drop_partition_9";
--source suite/parts/inc/partition_fail.inc --source suite/parts/inc/partition_fail.inc
SET SESSION debug_dbug="-d,fail_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,exchange_partition_fail_1"; SET SESSION debug_dbug="+d,exchange_partition_fail_1";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_2";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_3";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_4";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_5";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_6";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_7";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_8";
--source suite/parts/inc/partition_fail_t2.inc --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"; SET SESSION debug_dbug="+d,exchange_partition_fail_9";
--source suite/parts/inc/partition_fail_t2.inc --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#13737949: CRASH IN HA_PARTITION::INDEX_INIT
# Bug#18694052: SERVER CRASH IN HA_PARTITION::INIT_RECORD_PRIORITY_QUEUE # 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)) ...@@ -7,10 +6,11 @@ CREATE TABLE t1 (a INT, b VARCHAR(64), KEY(b,a))
PARTITION BY HASH (a) PARTITIONS 3; PARTITION BY HASH (a) PARTITIONS 3;
INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"), INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"),
(6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine"); (6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine");
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,ha_partition_fail_index_init"; SET SESSION debug_dbug="+d,ha_partition_fail_index_init";
SELECT * FROM t1 WHERE b = "Seven"; SELECT * FROM t1 WHERE b = "Seven";
ERROR HY000: Table has no partition for value 0 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"; SELECT * FROM t1 WHERE b = "Seven";
a b a b
7 Seven 7 Seven
...@@ -20,6 +20,7 @@ DROP TABLE t1; ...@@ -20,6 +20,7 @@ DROP TABLE t1;
# Verify ddl_log in case of crashing. # 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("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!'); 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -134,7 +135,7 @@ a b ...@@ -134,7 +135,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -249,7 +250,7 @@ a b ...@@ -249,7 +250,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -364,7 +365,7 @@ a b ...@@ -364,7 +365,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -479,7 +480,7 @@ a b ...@@ -479,7 +480,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -594,7 +595,7 @@ a b ...@@ -594,7 +595,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -709,7 +710,7 @@ a b ...@@ -709,7 +710,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -824,7 +825,7 @@ a b ...@@ -824,7 +825,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -939,7 +940,7 @@ a b ...@@ -939,7 +940,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1054,7 +1055,8 @@ a b ...@@ -1054,7 +1055,8 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t2; 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1158,7 +1160,7 @@ a b ...@@ -1158,7 +1160,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1262,7 +1264,7 @@ a b ...@@ -1262,7 +1264,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1366,7 +1368,7 @@ a b ...@@ -1366,7 +1368,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1470,7 +1472,7 @@ a b ...@@ -1470,7 +1472,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1574,7 +1576,7 @@ a b ...@@ -1574,7 +1576,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1678,7 +1680,7 @@ a b ...@@ -1678,7 +1680,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1782,7 +1784,7 @@ a b ...@@ -1782,7 +1784,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1886,7 +1888,7 @@ a b ...@@ -1886,7 +1888,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)); 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -1990,4 +1992,4 @@ a b ...@@ -1990,4 +1992,4 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t2; 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: 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: Error: table .* does not exist in the InnoDB internal");
call mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop table "); 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 "); ...@@ -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"); call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
flush tables; flush tables;
# Crash testing ADD PARTITION # Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1"; SET SESSION debug_dbug="+d,crash_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -79,7 +79,7 @@ a b ...@@ -79,7 +79,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -149,7 +149,7 @@ a b ...@@ -149,7 +149,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -219,7 +219,7 @@ a b ...@@ -219,7 +219,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -289,7 +289,7 @@ a b ...@@ -289,7 +289,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -360,7 +360,7 @@ a b ...@@ -360,7 +360,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -431,7 +431,7 @@ a b ...@@ -431,7 +431,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -502,7 +502,7 @@ a b ...@@ -502,7 +502,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -575,7 +575,7 @@ a b ...@@ -575,7 +575,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -646,7 +646,7 @@ a b ...@@ -646,7 +646,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -717,8 +717,9 @@ a b ...@@ -717,8 +717,9 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
# Error recovery testing ADD PARTITION # Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1"; SET SESSION debug_dbug="+d,fail_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -843,7 +844,7 @@ a b ...@@ -843,7 +844,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -968,7 +969,7 @@ a b ...@@ -968,7 +969,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1093,7 +1094,7 @@ a b ...@@ -1093,7 +1094,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1218,7 +1219,7 @@ a b ...@@ -1218,7 +1219,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1343,7 +1344,7 @@ a b ...@@ -1343,7 +1344,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1468,7 +1469,7 @@ a b ...@@ -1468,7 +1469,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1593,7 +1594,7 @@ a b ...@@ -1593,7 +1594,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1722,7 +1723,7 @@ a b ...@@ -1722,7 +1723,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1851,7 +1852,7 @@ a b ...@@ -1851,7 +1852,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -1980,8 +1981,9 @@ a b ...@@ -1980,8 +1981,9 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
# Test DROP PARTITION # Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1"; SET SESSION debug_dbug="+d,crash_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2048,7 +2050,7 @@ a b ...@@ -2048,7 +2050,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2117,7 +2119,7 @@ a b ...@@ -2117,7 +2119,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2186,7 +2188,7 @@ a b ...@@ -2186,7 +2188,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2249,7 +2251,7 @@ a b ...@@ -2249,7 +2251,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2312,7 +2314,7 @@ a b ...@@ -2312,7 +2314,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2375,7 +2377,7 @@ a b ...@@ -2375,7 +2377,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2436,7 +2438,7 @@ a b ...@@ -2436,7 +2438,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2496,7 +2498,7 @@ a b ...@@ -2496,7 +2498,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2556,8 +2558,9 @@ a b ...@@ -2556,8 +2558,9 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# Error recovery DROP PARTITION # Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1"; SET SESSION debug_dbug="+d,fail_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2680,7 +2683,7 @@ a b ...@@ -2680,7 +2683,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2803,7 +2806,7 @@ a b ...@@ -2803,7 +2806,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -2926,7 +2929,7 @@ a b ...@@ -2926,7 +2929,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3037,7 +3040,7 @@ a b ...@@ -3037,7 +3040,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3148,7 +3151,7 @@ a b ...@@ -3148,7 +3151,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3259,7 +3262,7 @@ a b ...@@ -3259,7 +3262,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3370,7 +3373,7 @@ a b ...@@ -3370,7 +3373,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3481,7 +3484,7 @@ a b ...@@ -3481,7 +3484,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3592,9 +3595,10 @@ a b ...@@ -3592,9 +3595,10 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# Test change partition (REORGANIZE/REBUILD/COALESCE # Test change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION). # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1"; SET SESSION debug_dbug="+d,crash_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3663,7 +3667,7 @@ a b ...@@ -3663,7 +3667,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3734,7 +3738,7 @@ a b ...@@ -3734,7 +3738,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3805,7 +3809,7 @@ a b ...@@ -3805,7 +3809,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3878,7 +3882,7 @@ a b ...@@ -3878,7 +3882,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -3951,7 +3955,7 @@ a b ...@@ -3951,7 +3955,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4024,7 +4028,7 @@ a b ...@@ -4024,7 +4028,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4099,7 +4103,7 @@ a b ...@@ -4099,7 +4103,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4174,7 +4178,7 @@ a b ...@@ -4174,7 +4178,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4247,7 +4251,7 @@ a b ...@@ -4247,7 +4251,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4320,7 +4324,7 @@ a b ...@@ -4320,7 +4324,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4392,7 +4396,7 @@ a b ...@@ -4392,7 +4396,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4464,9 +4468,10 @@ a b ...@@ -4464,9 +4468,10 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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 # Error recovery change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION). # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1"; SET SESSION debug_dbug="+d,fail_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4593,7 +4598,7 @@ a b ...@@ -4593,7 +4598,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4720,7 +4725,7 @@ a b ...@@ -4720,7 +4725,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4847,7 +4852,7 @@ a b ...@@ -4847,7 +4852,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -4974,7 +4979,7 @@ a b ...@@ -4974,7 +4979,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -5101,7 +5106,7 @@ a b ...@@ -5101,7 +5106,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -5228,7 +5233,7 @@ a b ...@@ -5228,7 +5233,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -5359,7 +5364,7 @@ a b ...@@ -5359,7 +5364,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -5490,7 +5495,7 @@ a b ...@@ -5490,7 +5495,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -5621,7 +5626,7 @@ a b ...@@ -5621,7 +5626,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -5752,7 +5757,7 @@ a b ...@@ -5752,7 +5757,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -5883,7 +5888,7 @@ a b ...@@ -5883,7 +5888,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'InnoDB' ENGINE = 'InnoDB'
...@@ -6014,13 +6019,14 @@ a b ...@@ -6014,13 +6019,14 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_12"; SET SESSION debug_dbug=@save_dbug;
# #
# WL#4445: EXCHANGE PARTITION WITH TABLE # WL#4445: EXCHANGE PARTITION WITH TABLE
# Verify ddl_log and InnoDB in case of crashing. # Verify ddl_log and InnoDB in case of crashing.
call mtr.add_suppression("InnoDB: Warning: allocated tablespace .*, old maximum was "); 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("Attempting backtrace. You can use the following information to find out");
call mtr.add_suppression("table .* does not exist in the InnoDB internal"); 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6128,7 +6134,7 @@ a b ...@@ -6128,7 +6134,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6236,7 +6242,7 @@ a b ...@@ -6236,7 +6242,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6344,7 +6350,7 @@ a b ...@@ -6344,7 +6350,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6452,7 +6458,7 @@ a b ...@@ -6452,7 +6458,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6560,7 +6566,7 @@ a b ...@@ -6560,7 +6566,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6668,7 +6674,7 @@ a b ...@@ -6668,7 +6674,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6776,7 +6782,7 @@ a b ...@@ -6776,7 +6782,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6884,7 +6890,7 @@ a b ...@@ -6884,7 +6890,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6992,7 +6998,8 @@ a b ...@@ -6992,7 +6998,8 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t2; 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7092,7 +7099,7 @@ a b ...@@ -7092,7 +7099,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7192,7 +7199,7 @@ a b ...@@ -7192,7 +7199,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7292,7 +7299,7 @@ a b ...@@ -7292,7 +7299,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7392,7 +7399,7 @@ a b ...@@ -7392,7 +7399,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7492,7 +7499,7 @@ a b ...@@ -7492,7 +7499,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7592,7 +7599,7 @@ a b ...@@ -7592,7 +7599,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7692,7 +7699,7 @@ a b ...@@ -7692,7 +7699,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7792,7 +7799,7 @@ a b ...@@ -7792,7 +7799,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = InnoDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7892,4 +7899,4 @@ a b ...@@ -7892,4 +7899,4 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t2; 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. # Test crash and failure recovery in fast_alter_partition_table.
# #
# Bug#53676: Unexpected errors and possible table corruption on # Bug#53676: Unexpected errors and possible table corruption on
...@@ -9,6 +8,7 @@ DROP TABLE IF EXISTS t1; ...@@ -9,6 +8,7 @@ DROP TABLE IF EXISTS t1;
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
flush tables; flush tables;
# Crash testing ADD PARTITION # Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1"; SET SESSION debug_dbug="+d,crash_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -82,7 +82,7 @@ a b ...@@ -82,7 +82,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -158,7 +158,7 @@ a b ...@@ -158,7 +158,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -234,7 +234,7 @@ a b ...@@ -234,7 +234,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -310,7 +310,7 @@ a b ...@@ -310,7 +310,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -388,7 +388,7 @@ a b ...@@ -388,7 +388,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -466,7 +466,7 @@ a b ...@@ -466,7 +466,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -544,7 +544,7 @@ a b ...@@ -544,7 +544,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -625,7 +625,7 @@ a b ...@@ -625,7 +625,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -704,7 +704,7 @@ a b ...@@ -704,7 +704,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -783,8 +783,9 @@ a b ...@@ -783,8 +783,9 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
# Error recovery testing ADD PARTITION # Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1"; SET SESSION debug_dbug="+d,fail_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -917,7 +918,7 @@ a b ...@@ -917,7 +918,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1050,7 +1051,7 @@ a b ...@@ -1050,7 +1051,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1183,7 +1184,7 @@ a b ...@@ -1183,7 +1184,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1316,7 +1317,7 @@ a b ...@@ -1316,7 +1317,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1449,7 +1450,7 @@ a b ...@@ -1449,7 +1450,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1582,7 +1583,7 @@ a b ...@@ -1582,7 +1583,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1715,7 +1716,7 @@ a b ...@@ -1715,7 +1716,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1854,7 +1855,7 @@ a b ...@@ -1854,7 +1855,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -1993,7 +1994,7 @@ a b ...@@ -1993,7 +1994,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2132,8 +2133,9 @@ a b ...@@ -2132,8 +2133,9 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
# Test DROP PARTITION # Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1"; SET SESSION debug_dbug="+d,crash_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2206,7 +2208,7 @@ a b ...@@ -2206,7 +2208,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2281,7 +2283,7 @@ a b ...@@ -2281,7 +2283,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2356,7 +2358,7 @@ a b ...@@ -2356,7 +2358,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2424,7 +2426,7 @@ a b ...@@ -2424,7 +2426,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2492,7 +2494,7 @@ a b ...@@ -2492,7 +2494,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2560,7 +2562,7 @@ a b ...@@ -2560,7 +2562,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2626,7 +2628,7 @@ a b ...@@ -2626,7 +2628,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2690,7 +2692,7 @@ a b ...@@ -2690,7 +2692,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2754,8 +2756,9 @@ a b ...@@ -2754,8 +2756,9 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# Error recovery DROP PARTITION # Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1"; SET SESSION debug_dbug="+d,fail_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -2886,7 +2889,7 @@ a b ...@@ -2886,7 +2889,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3017,7 +3020,7 @@ a b ...@@ -3017,7 +3020,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3148,7 +3151,7 @@ a b ...@@ -3148,7 +3151,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3265,7 +3268,7 @@ a b ...@@ -3265,7 +3268,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3382,7 +3385,7 @@ a b ...@@ -3382,7 +3385,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3499,7 +3502,7 @@ a b ...@@ -3499,7 +3502,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3616,7 +3619,7 @@ a b ...@@ -3616,7 +3619,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3733,7 +3736,7 @@ a b ...@@ -3733,7 +3736,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3850,9 +3853,10 @@ a b ...@@ -3850,9 +3853,10 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# Test change partition (REORGANIZE/REBUILD/COALESCE # Test change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION). # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1"; SET SESSION debug_dbug="+d,crash_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -3927,7 +3931,7 @@ a b ...@@ -3927,7 +3931,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4004,7 +4008,7 @@ a b ...@@ -4004,7 +4008,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4081,7 +4085,7 @@ a b ...@@ -4081,7 +4085,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4162,7 +4166,7 @@ a b ...@@ -4162,7 +4166,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4243,7 +4247,7 @@ a b ...@@ -4243,7 +4247,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4324,7 +4328,7 @@ a b ...@@ -4324,7 +4328,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4408,7 +4412,7 @@ a b ...@@ -4408,7 +4412,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4492,7 +4496,7 @@ a b ...@@ -4492,7 +4496,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4574,7 +4578,7 @@ a b ...@@ -4574,7 +4578,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4656,7 +4660,7 @@ a b ...@@ -4656,7 +4660,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4736,7 +4740,7 @@ a b ...@@ -4736,7 +4740,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4816,9 +4820,10 @@ a b ...@@ -4816,9 +4820,10 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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 # Error recovery change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION). # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1"; SET SESSION debug_dbug="+d,fail_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -4953,7 +4958,7 @@ a b ...@@ -4953,7 +4958,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -5088,7 +5093,7 @@ a b ...@@ -5088,7 +5093,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -5223,7 +5228,7 @@ a b ...@@ -5223,7 +5228,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -5358,7 +5363,7 @@ a b ...@@ -5358,7 +5363,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -5493,7 +5498,7 @@ a b ...@@ -5493,7 +5498,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -5628,7 +5633,7 @@ a b ...@@ -5628,7 +5633,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -5769,7 +5774,7 @@ a b ...@@ -5769,7 +5774,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -5910,7 +5915,7 @@ a b ...@@ -5910,7 +5915,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -6051,7 +6056,7 @@ a b ...@@ -6051,7 +6056,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -6192,7 +6197,7 @@ a b ...@@ -6192,7 +6197,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -6333,7 +6338,7 @@ a b ...@@ -6333,7 +6338,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'MyISAM' ENGINE = 'MyISAM'
...@@ -6474,4 +6479,4 @@ a b ...@@ -6474,4 +6479,4 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_12"; SET SESSION debug_dbug=@save_dbug;
...@@ -8,10 +8,6 @@ ...@@ -8,10 +8,6 @@
# Crash tests don't work with embedded # Crash tests don't work with embedded
--source include/not_embedded.inc --source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
# Partitioning test that require debug features # Partitioning test that require debug features
--echo # --echo #
...@@ -22,10 +18,11 @@ CREATE TABLE t1 (a INT, b VARCHAR(64), KEY(b,a)) ...@@ -22,10 +18,11 @@ CREATE TABLE t1 (a INT, b VARCHAR(64), KEY(b,a))
PARTITION BY HASH (a) PARTITIONS 3; PARTITION BY HASH (a) PARTITIONS 3;
INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"), INSERT INTO t1 VALUES (1, "1"), (2, "2"), (3, "3"), (4, "Four"), (5, "Five"),
(6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine"); (6, "Six"), (7, "Seven"), (8, "Eight"), (9, "Nine");
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,ha_partition_fail_index_init"; SET SESSION debug_dbug="+d,ha_partition_fail_index_init";
--error ER_NO_PARTITION_FOR_GIVEN_VALUE --error ER_NO_PARTITION_FOR_GIVEN_VALUE
SELECT * FROM t1 WHERE b = "Seven"; 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"; SELECT * FROM t1 WHERE b = "Seven";
DROP TABLE t1; DROP TABLE t1;
......
...@@ -9,10 +9,6 @@ ...@@ -9,10 +9,6 @@
# Crash tests don't work with embedded # Crash tests don't work with embedded
--source include/not_embedded.inc --source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--let $DATADIR= `SELECT @@datadir;` --let $DATADIR= `SELECT @@datadir;`
# Waiting for wl#6723 # Waiting for wl#6723
...@@ -34,6 +30,7 @@ INSERT INTO t1 VALUES (6, 'X 6 row'), (7, 'Seventh row'), (8, 'Last row'); ...@@ -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 ADD INDEX new_b_index (b);
ALTER TABLE t1 DROP INDEX new_b_index; ALTER TABLE t1 DROP INDEX new_b_index;
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index"; SET SESSION debug_dbug = "+d,ha_partition_fail_final_add_index";
--error ER_NO_PARTITION_FOR_GIVEN_VALUE --error ER_NO_PARTITION_FOR_GIVEN_VALUE
...@@ -49,7 +46,7 @@ SHOW CREATE TABLE t1; ...@@ -49,7 +46,7 @@ SHOW CREATE TABLE t1;
--sorted_result --sorted_result
SELECT * FROM t1; SELECT * FROM t1;
SET SESSION debug_dbug = "-d,ha_partition_fail_final_add_index"; SET SESSION debug_dbug = @save_dbug;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
} }
......
...@@ -6,10 +6,6 @@ ...@@ -6,10 +6,6 @@
--source include/not_valgrind.inc --source include/not_valgrind.inc
--source include/not_embedded.inc --source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
--let $DATADIR= `SELECT @@datadir;` --let $DATADIR= `SELECT @@datadir;`
let $engine= 'MyISAM'; let $engine= 'MyISAM';
......
...@@ -7,6 +7,7 @@ if (!$HA_ARCHIVE_SO) { ...@@ -7,6 +7,7 @@ if (!$HA_ARCHIVE_SO) {
let $mysqld_datadir= `select @@datadir`; let $mysqld_datadir= `select @@datadir`;
SET @save_dbug = @@debug_dbug;
set debug_dbug='+d,unstable_db_type'; set debug_dbug='+d,unstable_db_type';
install soname 'ha_archive'; install soname 'ha_archive';
...@@ -27,5 +28,4 @@ drop table t1; ...@@ -27,5 +28,4 @@ drop table t1;
--list_files $mysqld_datadir/test --list_files $mysqld_datadir/test
uninstall soname 'ha_archive'; uninstall soname 'ha_archive';
set debug_dbug='-d,unstable_db_type'; set debug_dbug=@save_dbug;
...@@ -14,7 +14,12 @@ ...@@ -14,7 +14,12 @@
--source include/not_staging.inc --source include/not_staging.inc
--source include/have_innodb.inc --source include/have_innodb.inc
let $engine_type= InnoDB; connect disable_purge,localhost,root,,;
--echo # Disable the purge of InnoDB history, to make the test run faster.
START TRANSACTION WITH CONSISTENT SNAPSHOT;
connection default;
SET STORAGE_ENGINE = InnoDB;
# InnoDB does not support Merge tables (affects include/index_merge1.inc) # InnoDB does not support Merge tables (affects include/index_merge1.inc)
let $merge_table_support= 0; let $merge_table_support= 0;
...@@ -37,7 +42,9 @@ set optimizer_switch='index_merge_sort_intersection=off'; ...@@ -37,7 +42,9 @@ set optimizer_switch='index_merge_sort_intersection=off';
--echo # --echo #
--echo # BUG#56862/640419: Wrong result with sort_union index merge when one --echo # BUG#56862/640419: Wrong result with sort_union index merge when one
--echo # of the merged index scans is the primary key scan --echo # of the merged index scans is the primary key scan
--echo # --echo #
CREATE TABLE t0(a int, b int) ENGINE=MyISAM;
CREATE TABLE t1 ( CREATE TABLE t1 (
pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, pk int NOT NULL AUTO_INCREMENT PRIMARY KEY,
...@@ -46,27 +53,19 @@ CREATE TABLE t1 ( ...@@ -46,27 +53,19 @@ CREATE TABLE t1 (
INDEX idx(a)) INDEX idx(a))
ENGINE=INNODB; ENGINE=INNODB;
begin; INSERT INTO t0(a,b) VALUES
INSERT INTO t1(a,b) VALUES
(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500),
(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800),
(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700),
(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000);
INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; INSERT INTO t0(a,b) SELECT a+20, b+2000 FROM t0;
INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; INSERT INTO t0(a,b) SELECT a+40, b+4000 FROM t0;
INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; INSERT INTO t0(a,b) SELECT a+80, b+8000 FROM t0;
INSERT INTO t1(a,b) SELECT a,b FROM t1; begin;
INSERT INTO t1(a,b) SELECT a,b FROM t1; INSERT INTO t1(a,b) SELECT t0.a,t0.b FROM t0, seq_1_to_1024;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1(a,b) SELECT a,b FROM t1;
INSERT INTO t1 VALUES (1000000, 0, 0); INSERT INTO t1 VALUES (1000000, 0, 0);
commit; commit;
DROP TABLE t0;
SET SESSION sort_buffer_size = 1024*36; SET SESSION sort_buffer_size = 1024*36;
set @tmp_optimizer_switch=@@optimizer_switch; set @tmp_optimizer_switch=@@optimizer_switch;
...@@ -131,9 +130,6 @@ DROP TABLE t1; ...@@ -131,9 +130,6 @@ DROP TABLE t1;
--echo # BUG#1006164: Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows --echo # BUG#1006164: Multi-table DELETE that uses innodb + index_merge/intersect may fail to delete rows
--echo # --echo #
create table t0(a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 ( create table t1 (
pk int auto_increment, pk int auto_increment,
zone_id int, zone_id int,
...@@ -143,7 +139,7 @@ create table t1 ( ...@@ -143,7 +139,7 @@ create table t1 (
key (modified) key (modified)
) engine=innodb; ) engine=innodb;
insert into t1 (zone_id, modified) select 0,0 from t0 A, t0 B, t0 C, t0 D; insert into t1 (zone_id, modified) select 0,0 from seq_1_to_10000;
update t1 set zone_id=487, modified=9 where pk=7259; update t1 set zone_id=487, modified=9 where pk=7259;
update t1 set zone_id=487, modified=9 where pk=7260; update t1 set zone_id=487, modified=9 where pk=7260;
update t1 set zone_id=830, modified=9 where pk=8434; update t1 set zone_id=830, modified=9 where pk=8434;
...@@ -157,7 +153,7 @@ DELETE t1 FROM t1 WHERE t1.zone_id=830 AND modified=9; ...@@ -157,7 +153,7 @@ DELETE t1 FROM t1 WHERE t1.zone_id=830 AND modified=9;
commit; commit;
select * from t1 where t1.zone_id=830 AND modified=9; select * from t1 where t1.zone_id=830 AND modified=9;
drop table t0, t1; drop table t1;
--echo # --echo #
--echo # MDEV-376: Wrong result (missing rows) with index_merge+index_merge_intersection, join --echo # MDEV-376: Wrong result (missing rows) with index_merge+index_merge_intersection, join
...@@ -197,14 +193,10 @@ KEY key1 (key1), ...@@ -197,14 +193,10 @@ KEY key1 (key1),
KEY key2 (key2) KEY key2 (key2)
) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; ) ENGINE=InnoDB AUTO_INCREMENT=12860259 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
create table t2(a int);
insert into t2 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t3(a int);
insert into t3 select A.a + B.a* 10 + C.a * 100 + D.a*1000 from t2 A, t2 B, t2 C, t2 D;
insert into t1 (key1, key2, col1,col2,col3,col4) insert into t1 (key1, key2, col1,col2,col3,col4)
select a,a, a,a,a,a from t3; select seq,seq,seq,seq,seq,seq from seq_1_to_10000;
SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5); SELECT sum(col1) FROM t1 FORCE INDEX (key1,key2) WHERE (key1 between 10 and 8191+10) or (key2= 5);
drop table t1,t2,t3; drop table t1;
set optimizer_switch=@tmp_optimizer_switch; set optimizer_switch=@tmp_optimizer_switch;
disconnect disable_purge;
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# include/index_merge*.inc files # include/index_merge*.inc files
# #
let $engine_type= MyISAM; SET STORAGE_ENGINE = MyISAM;
# MyISAM supports Merge tables # MyISAM supports Merge tables
let $merge_table_support= 1; let $merge_table_support= 1;
...@@ -33,7 +33,7 @@ insert into t1 select ...@@ -33,7 +33,7 @@ insert into t1 select
A.a * B.a*10 + C.a*100, A.a * B.a*10 + C.a*100,
A.a, A.a,
'filler' 'filler'
from t0 A, t0 B, t0 C; from t0 A, t0 B, t0 C;
--echo This should use union: --echo This should use union:
explain select * from t1 where a=1 or b=1; explain select * from t1 where a=1 or b=1;
...@@ -253,15 +253,7 @@ create table t0 ...@@ -253,15 +253,7 @@ create table t0
INDEX i1(key1) INDEX i1(key1)
); );
insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8); insert into t0 select * from seq_1_to_1024;
let $1=7;
set @d=8;
while ($1)
{
eval insert into t0 select key1+ @d from t0;
eval set @d=@d*2;
dec $1;
}
alter table t0 add key2 int not null, add index i2(key2); alter table t0 add key2 int not null, add index i2(key2);
alter table t0 add key3 int not null, add index i3(key3); alter table t0 add key3 int not null, add index i3(key3);
alter table t0 add key8 int not null, add index i8(key8); alter table t0 add key8 int not null, add index i8(key8);
......
...@@ -9,6 +9,7 @@ SET @@GLOBAL.log_output='TABLE'; ...@@ -9,6 +9,7 @@ SET @@GLOBAL.log_output='TABLE';
FLUSH SLOW LOGS; FLUSH SLOW LOGS;
SET @@GLOBAL.slow_query_log=ON; SET @@GLOBAL.slow_query_log=ON;
SET @@GLOBAL.log_slow_admin_statements=ON; SET @@GLOBAL.log_slow_admin_statements=ON;
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,simulate_slow_query"; SET SESSION debug_dbug="+d,simulate_slow_query";
DELIMITER $$; DELIMITER $$;
...@@ -118,7 +119,7 @@ CALL show_slow_log(); ...@@ -118,7 +119,7 @@ CALL show_slow_log();
--echo # Clean up --echo # Clean up
--echo # --echo #
SET SESSION debug_dbug="-d,simulate_slow_query"; SET SESSION debug_dbug=@save_dbug;
TRUNCATE mysql.slow_log; TRUNCATE mysql.slow_log;
SET @@global.slow_query_log= @org_slow_query_log; SET @@global.slow_query_log= @org_slow_query_log;
SET @@global.log_output= @org_log_output; SET @@global.log_output= @org_log_output;
......
...@@ -8,10 +8,7 @@ ...@@ -8,10 +8,7 @@
--source include/have_debug.inc --source include/have_debug.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1, t2;
SET DEBUG_SYNC= 'RESET'; SET DEBUG_SYNC= 'RESET';
--enable_warnings
--echo # --echo #
--echo # Bug#42438: Crash ha_partition::change_table_ptr --echo # Bug#42438: Crash ha_partition::change_table_ptr
......
...@@ -696,9 +696,10 @@ END| ...@@ -696,9 +696,10 @@ END|
delimiter ;| delimiter ;|
SET @save_dbug = @@debug_dbug;
SET SESSION debug_dbug="+d,bug23032_emit_warning"; SET SESSION debug_dbug="+d,bug23032_emit_warning";
CALL p1(); CALL p1();
SET SESSION debug_dbug="-d,bug23032_emit_warning"; SET SESSION debug_dbug=@save_dbug;
DROP PROCEDURE p1; DROP PROCEDURE p1;
DROP TABLE t1; DROP TABLE t1;
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2018, MariaDB Corporation. Copyright (c) 2013, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -267,6 +267,13 @@ buf_dblwr_create() ...@@ -267,6 +267,13 @@ buf_dblwr_create()
ut_ad(rw_lock_get_x_lock_count(&new_block->lock) == 1); ut_ad(rw_lock_get_x_lock_count(&new_block->lock) == 1);
page_no = new_block->page.id.page_no(); page_no = new_block->page.id.page_no();
/* We only do this in the debug build, to ensure that
both the check in buf_flush_init_for_writing() and
recv_parse_or_apply_log_rec_body() will see a valid
page type. The flushes of new_block are actually
unnecessary here. */
ut_d(mlog_write_ulint(FIL_PAGE_TYPE + new_block->frame,
FIL_PAGE_TYPE_SYS, MLOG_2BYTES, &mtr));
if (i == FSP_EXTENT_SIZE / 2) { if (i == FSP_EXTENT_SIZE / 2) {
ut_a(page_no == FSP_EXTENT_SIZE); ut_a(page_no == FSP_EXTENT_SIZE);
...@@ -329,6 +336,7 @@ buf_dblwr_create() ...@@ -329,6 +336,7 @@ buf_dblwr_create()
/* Flush the modified pages to disk and make a checkpoint */ /* Flush the modified pages to disk and make a checkpoint */
log_make_checkpoint(); log_make_checkpoint();
buf_dblwr_being_created = FALSE;
/* Remove doublewrite pages from LRU */ /* Remove doublewrite pages from LRU */
buf_pool_invalidate(); buf_pool_invalidate();
......
...@@ -854,7 +854,9 @@ buf_flush_init_for_writing( ...@@ -854,7 +854,9 @@ buf_flush_init_for_writing(
ut_ad(block == NULL || block->frame == page); ut_ad(block == NULL || block->frame == page);
ut_ad(block == NULL || page_zip_ == NULL ut_ad(block == NULL || page_zip_ == NULL
|| &block->page.zip == page_zip_); || &block->page.zip == page_zip_);
ut_ad(!srv_safe_truncate || !block == !newest_lsn);
ut_ad(page); ut_ad(page);
ut_ad(!srv_safe_truncate || !newest_lsn || fil_page_get_type(page));
if (page_zip_) { if (page_zip_) {
page_zip_des_t* page_zip; page_zip_des_t* page_zip;
......
...@@ -1992,14 +1992,14 @@ ibuf_add_free_page(void) ...@@ -1992,14 +1992,14 @@ ibuf_add_free_page(void)
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW); buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
page = buf_block_get_frame(block); 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 */ /* Add the page to the free list and update the ibuf size data */
flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, &mtr); 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->seg_size++;
ibuf->free_list_len++; ibuf->free_list_len++;
......
...@@ -12,6 +12,7 @@ call mtr.add_suppression("TokuDB: Warning: MySQL is trying to drop table "); ...@@ -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"); call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
flush tables; flush tables;
# Crash testing ADD PARTITION # Crash testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_add_partition_1"; SET SESSION debug_dbug="+d,crash_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -73,7 +74,7 @@ a b ...@@ -73,7 +74,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -137,7 +138,7 @@ a b ...@@ -137,7 +138,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -201,7 +202,7 @@ a b ...@@ -201,7 +202,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -265,7 +266,7 @@ a b ...@@ -265,7 +266,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -329,7 +330,7 @@ a b ...@@ -329,7 +330,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -393,7 +394,7 @@ a b ...@@ -393,7 +394,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -457,7 +458,7 @@ a b ...@@ -457,7 +458,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -522,7 +523,7 @@ a b ...@@ -522,7 +523,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -585,7 +586,7 @@ a b ...@@ -585,7 +586,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -648,8 +649,9 @@ a b ...@@ -648,8 +649,9 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
# Error recovery testing ADD PARTITION # Error recovery testing ADD PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_add_partition_1"; SET SESSION debug_dbug="+d,fail_add_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -766,7 +768,7 @@ a b ...@@ -766,7 +768,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -883,7 +885,7 @@ a b ...@@ -883,7 +885,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1000,7 +1002,7 @@ a b ...@@ -1000,7 +1002,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1117,7 +1119,7 @@ a b ...@@ -1117,7 +1119,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1234,7 +1236,7 @@ a b ...@@ -1234,7 +1236,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1351,7 +1353,7 @@ a b ...@@ -1351,7 +1353,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1468,7 +1470,7 @@ a b ...@@ -1468,7 +1470,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1587,7 +1589,7 @@ a b ...@@ -1587,7 +1589,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1706,7 +1708,7 @@ a b ...@@ -1706,7 +1708,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_add_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1825,8 +1827,9 @@ a b ...@@ -1825,8 +1827,9 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_add_partition_10"; SET SESSION debug_dbug=@save_dbug;
# Test DROP PARTITION # Test DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_drop_partition_1"; SET SESSION debug_dbug="+d,crash_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1887,7 +1890,7 @@ a b ...@@ -1887,7 +1890,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -1950,7 +1953,7 @@ a b ...@@ -1950,7 +1953,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2013,7 +2016,7 @@ a b ...@@ -2013,7 +2016,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2071,7 +2074,7 @@ a b ...@@ -2071,7 +2074,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2129,7 +2132,7 @@ a b ...@@ -2129,7 +2132,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2187,7 +2190,7 @@ a b ...@@ -2187,7 +2190,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2243,7 +2246,7 @@ a b ...@@ -2243,7 +2246,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2299,7 +2302,7 @@ a b ...@@ -2299,7 +2302,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2355,8 +2358,9 @@ a b ...@@ -2355,8 +2358,9 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,crash_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# Error recovery DROP PARTITION # Error recovery DROP PARTITION
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_drop_partition_1"; SET SESSION debug_dbug="+d,fail_drop_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2471,7 +2475,7 @@ a b ...@@ -2471,7 +2475,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2586,7 +2590,7 @@ a b ...@@ -2586,7 +2590,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2701,7 +2705,7 @@ a b ...@@ -2701,7 +2705,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2806,7 +2810,7 @@ a b ...@@ -2806,7 +2810,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -2911,7 +2915,7 @@ a b ...@@ -2911,7 +2915,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3016,7 +3020,7 @@ a b ...@@ -3016,7 +3020,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3121,7 +3125,7 @@ a b ...@@ -3121,7 +3125,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3226,7 +3230,7 @@ a b ...@@ -3226,7 +3230,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_drop_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3331,9 +3335,10 @@ a b ...@@ -3331,9 +3335,10 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_drop_partition_9"; SET SESSION debug_dbug=@save_dbug;
# Test change partition (REORGANIZE/REBUILD/COALESCE # Test change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION). # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,crash_change_partition_1"; SET SESSION debug_dbug="+d,crash_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3396,7 +3401,7 @@ a b ...@@ -3396,7 +3401,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3461,7 +3466,7 @@ a b ...@@ -3461,7 +3466,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3526,7 +3531,7 @@ a b ...@@ -3526,7 +3531,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3591,7 +3596,7 @@ a b ...@@ -3591,7 +3596,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3656,7 +3661,7 @@ a b ...@@ -3656,7 +3661,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3721,7 +3726,7 @@ a b ...@@ -3721,7 +3726,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3787,7 +3792,7 @@ a b ...@@ -3787,7 +3792,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3853,7 +3858,7 @@ a b ...@@ -3853,7 +3858,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3917,7 +3922,7 @@ a b ...@@ -3917,7 +3922,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -3981,7 +3986,7 @@ a b ...@@ -3981,7 +3986,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4045,7 +4050,7 @@ a b ...@@ -4045,7 +4050,7 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,crash_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4109,9 +4114,10 @@ a b ...@@ -4109,9 +4114,10 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t1; 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 # Error recovery change partition (REORGANIZE/REBUILD/COALESCE
# or ADD HASH PARTITION). # or ADD HASH PARTITION).
SET @save_dbug=@@debug_dbug;
SET SESSION debug_dbug="+d,fail_change_partition_1"; SET SESSION debug_dbug="+d,fail_change_partition_1";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4230,7 +4236,7 @@ a b ...@@ -4230,7 +4236,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_2";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4349,7 +4355,7 @@ a b ...@@ -4349,7 +4355,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_3";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4468,7 +4474,7 @@ a b ...@@ -4468,7 +4474,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_4";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4587,7 +4593,7 @@ a b ...@@ -4587,7 +4593,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_5";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4706,7 +4712,7 @@ a b ...@@ -4706,7 +4712,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_6";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4825,7 +4831,7 @@ a b ...@@ -4825,7 +4831,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_7";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -4946,7 +4952,7 @@ a b ...@@ -4946,7 +4952,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_8";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -5067,7 +5073,7 @@ a b ...@@ -5067,7 +5073,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_9";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -5188,7 +5194,7 @@ a b ...@@ -5188,7 +5194,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_10";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -5309,7 +5315,7 @@ a b ...@@ -5309,7 +5315,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_11";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -5430,7 +5436,7 @@ a b ...@@ -5430,7 +5436,7 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; 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"; SET SESSION debug_dbug="+d,fail_change_partition_12";
CREATE TABLE t1 (a INT, b VARCHAR(64)) CREATE TABLE t1 (a INT, b VARCHAR(64))
ENGINE = 'TokuDB' ENGINE = 'TokuDB'
...@@ -5551,13 +5557,14 @@ a b ...@@ -5551,13 +5557,14 @@ a b
4 Original from partition p0 4 Original from partition p0
UNLOCK TABLES; UNLOCK TABLES;
DROP TABLE t1; DROP TABLE t1;
SET SESSION debug_dbug="-d,fail_change_partition_12"; SET SESSION debug_dbug=@save_dbug;
# #
# WL#4445: EXCHANGE PARTITION WITH TABLE # WL#4445: EXCHANGE PARTITION WITH TABLE
# Verify ddl_log and TokuDB in case of crashing. # Verify ddl_log and TokuDB in case of crashing.
call mtr.add_suppression("TokuDB: Warning: allocated tablespace .*, old maximum was "); 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("Attempting backtrace. You can use the following information to find out");
call mtr.add_suppression("table .* does not exist in the TokuDB internal"); 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -5656,7 +5663,7 @@ a b ...@@ -5656,7 +5663,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -5755,7 +5762,7 @@ a b ...@@ -5755,7 +5762,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -5854,7 +5861,7 @@ a b ...@@ -5854,7 +5861,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -5953,7 +5960,7 @@ a b ...@@ -5953,7 +5960,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6052,7 +6059,7 @@ a b ...@@ -6052,7 +6059,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6151,7 +6158,7 @@ a b ...@@ -6151,7 +6158,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6250,7 +6257,7 @@ a b ...@@ -6250,7 +6257,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6349,7 +6356,7 @@ a b ...@@ -6349,7 +6356,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_abort_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6448,7 +6455,8 @@ a b ...@@ -6448,7 +6455,8 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t2; 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_1";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6542,7 +6550,7 @@ a b ...@@ -6542,7 +6550,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_2";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6636,7 +6644,7 @@ a b ...@@ -6636,7 +6644,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_3";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6730,7 +6738,7 @@ a b ...@@ -6730,7 +6738,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_4";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6824,7 +6832,7 @@ a b ...@@ -6824,7 +6832,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_5";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -6918,7 +6926,7 @@ a b ...@@ -6918,7 +6926,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_6";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7012,7 +7020,7 @@ a b ...@@ -7012,7 +7020,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_7";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7106,7 +7114,7 @@ a b ...@@ -7106,7 +7114,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_8";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7200,7 +7208,7 @@ a b ...@@ -7200,7 +7208,7 @@ a b
7 Original from table t2 7 Original from table t2
8 Original from table t2 8 Original from table t2
DROP 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"; SET SESSION debug_dbug="+d,exchange_partition_fail_9";
CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; 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"); INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2");
...@@ -7294,4 +7302,4 @@ a b ...@@ -7294,4 +7302,4 @@ a b
3 Original from partition p0 3 Original from partition p0
4 Original from partition p0 4 Original from partition p0
DROP TABLE t2; DROP TABLE t2;
SET SESSION debug_dbug="-d,exchange_partition_fail_9"; SET SESSION debug_dbug=@save_dbug;
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2018, MariaDB Corporation. Copyright (c) 2013, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under 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 the terms of the GNU General Public License as published by the Free Software
...@@ -291,6 +291,13 @@ buf_dblwr_create() ...@@ -291,6 +291,13 @@ buf_dblwr_create()
ut_ad(rw_lock_get_x_lock_count(&new_block->lock) == 1); ut_ad(rw_lock_get_x_lock_count(&new_block->lock) == 1);
page_no = buf_block_get_page_no(new_block); page_no = buf_block_get_page_no(new_block);
/* We only do this in the debug build, to ensure that
both the check in buf_flush_init_for_writing() and
recv_parse_or_apply_log_rec_body() will see a valid
page type. The flushes of new_block are actually
unnecessary here. */
ut_d(mlog_write_ulint(FIL_PAGE_TYPE + new_block->frame,
FIL_PAGE_TYPE_SYS, MLOG_2BYTES, &mtr));
if (i == FSP_EXTENT_SIZE / 2) { if (i == FSP_EXTENT_SIZE / 2) {
ut_a(page_no == FSP_EXTENT_SIZE); ut_a(page_no == FSP_EXTENT_SIZE);
...@@ -353,6 +360,7 @@ buf_dblwr_create() ...@@ -353,6 +360,7 @@ buf_dblwr_create()
/* Flush the modified pages to disk and make a checkpoint */ /* Flush the modified pages to disk and make a checkpoint */
log_make_checkpoint_at(LSN_MAX, TRUE); log_make_checkpoint_at(LSN_MAX, TRUE);
buf_dblwr_being_created = FALSE;
/* Remove doublewrite pages from LRU */ /* Remove doublewrite pages from LRU */
buf_pool_invalidate(); buf_pool_invalidate();
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2017, MariaDB Corporation. Copyright (c) 2013, 2019, MariaDB Corporation.
Copyright (c) 2013, 2014, Fusion-io Copyright (c) 2013, 2014, Fusion-io
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
...@@ -787,6 +787,7 @@ buf_flush_init_for_writing( ...@@ -787,6 +787,7 @@ buf_flush_init_for_writing(
ib_uint32_t checksum = 0 /* silence bogus gcc warning */; ib_uint32_t checksum = 0 /* silence bogus gcc warning */;
ut_ad(page); ut_ad(page);
ut_ad(!newest_lsn || fil_page_get_type(page));
if (page_zip_) { if (page_zip_) {
page_zip_des_t* page_zip; page_zip_des_t* page_zip;
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved. 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 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 the terms of the GNU General Public License as published by the Free Software
...@@ -2171,14 +2171,14 @@ ibuf_add_free_page(void) ...@@ -2171,14 +2171,14 @@ ibuf_add_free_page(void)
buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW); buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW);
page = buf_block_get_frame(block); 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 */ /* Add the page to the free list and update the ibuf size data */
flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, &mtr); 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->seg_size++;
ibuf->free_list_len++; 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