diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-09-11 17:55:27 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-09-11 17:55:27 +0300 |
commit | 15139964d52539a8bb96d090fa1b5b26921eab3e (patch) | |
tree | 926d23e30e2c3aa09014a8005db95ad543694357 /mysql-test/suite/parts | |
parent | 54f79a0f7fc8b1b30073391319f1b2c37b4cc015 (diff) | |
parent | 40b743f99e8ca5ac479e8c559f8316b606033582 (diff) | |
download | mariadb-git-15139964d52539a8bb96d090fa1b5b26921eab3e.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test/suite/parts')
-rw-r--r-- | mysql-test/suite/parts/r/debug_fail_myisam.result | 6482 |
1 files changed, 0 insertions, 6482 deletions
diff --git a/mysql-test/suite/parts/r/debug_fail_myisam.result b/mysql-test/suite/parts/r/debug_fail_myisam.result deleted file mode 100644 index 04297563c50..00000000000 --- a/mysql-test/suite/parts/r/debug_fail_myisam.result +++ /dev/null @@ -1,6482 +0,0 @@ -# Test crash and failure recovery in fast_alter_partition_table. -# -# Bug#53676: Unexpected errors and possible table corruption on -# ADD PARTITION and LOCK TABLE -# Bug#53770: Server crash at handler.cc:2076 on LOAD DATA -# after timed out COALESCE PARTITION -# Extended crash recovery testing of fast_alter_partition_table. -call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); -flush tables; -# Crash testing ADD PARTITION -SET @save_dbug=@@debug_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_1"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_2"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_3"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_4"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_5"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_6"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_7"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_8"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_9"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_add_partition_10"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -# Error recovery testing ADD PARTITION -SET @save_dbug=@@debug_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_1"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_2"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_3"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_4"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_5"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_6"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_7"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_8"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_9"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_add_partition_10"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 ADD PARTITION -(PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -# Test DROP PARTITION -SET @save_dbug=@@debug_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_1"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_2"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_3"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_4"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_5"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_6"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_7"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_8"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_drop_partition_9"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -# Error recovery DROP PARTITION -SET @save_dbug=@@debug_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_1"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_2"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_3"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_4"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_5"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_6"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_7"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_8"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_drop_partition_9"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 DROP PARTITION p10; -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -# Test change partition (REORGANIZE/REBUILD/COALESCE -# or ADD HASH PARTITION). -SET @save_dbug=@@debug_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_1"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_2"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_3"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_4"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10#TMP#.MYD -t1#P#p10#TMP#.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20#TMP#.MYD -t1#P#p20#TMP#.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_5"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10#TMP#.MYD -t1#P#p10#TMP#.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20#TMP#.MYD -t1#P#p20#TMP#.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_6"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10#TMP#.MYD -t1#P#p10#TMP#.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20#TMP#.MYD -t1#P#p20#TMP#.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_7"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10#TMP#.MYD -t1#P#p10#TMP#.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20#TMP#.MYD -t1#P#p20#TMP#.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_8"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -#sql-shadow-t1.frm -#sql-shadow-t1.par -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10#TMP#.MYD -t1#P#p10#TMP#.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20#TMP#.MYD -t1#P#p20#TMP#.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_9"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10#TMP#.MYD -t1#P#p10#TMP#.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20#TMP#.MYD -t1#P#p20#TMP#.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_10"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10#TMP#.MYD -t1#P#p10#TMP#.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20#TMP#.MYD -t1#P#p20#TMP#.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_11"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,crash_change_partition_12"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before crash -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Lost connection to server during query -# State after crash (before recovery) -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -# State after crash recovery -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -# Error recovery change partition (REORGANIZE/REBUILD/COALESCE -# or ADD HASH PARTITION). -SET @save_dbug=@@debug_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_1"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_2"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_3"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_4"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_5"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_6"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_7"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_8"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_9"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_10"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_11"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; -SET SESSION debug_dbug="+d,fail_change_partition_12"; -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -DROP TABLE t1; -# Same test under LOCK TABLE -CREATE TABLE t1 (a INT, b VARCHAR(64)) -ENGINE = 'MyISAM' -PARTITION BY LIST (a) -(PARTITION p0 VALUES IN (0,1,2,3,4,5,6,7,8,9), -PARTITION p10 VALUES IN (11,12,13,14,15,16,17,18,19)); -INSERT INTO t1 VALUES (1, "Original from partition p0"), (2, "Original from partition p0"), (3, "Original from partition p0"), (4, "Original from partition p0"), (11, "Original from partition p1"), (12, "Original from partition p1"), (13, "Original from partition p1"), (14, "Original from partition p1"); -# State before failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (11,12,13,14,15,16,17,18,19) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -LOCK TABLE t1 WRITE; -ALTER TABLE t1 REORGANIZE PARTITION p10 INTO -(PARTITION p10 VALUES IN (10,11,12,13,14,15,16,17,18,19), -PARTITION p20 VALUES IN (20,21,22,23,24,25,26,27,28,29)); -ERROR HY000: Unknown error -# State after failure -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p10.MYD -t1#P#p10.MYI -t1#P#p20.MYD -t1#P#p20.MYI -t1.frm -t1.par -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `a` int(11) DEFAULT NULL, - `b` varchar(64) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 - PARTITION BY LIST (`a`) -(PARTITION `p0` VALUES IN (0,1,2,3,4,5,6,7,8,9) ENGINE = MyISAM, - PARTITION `p10` VALUES IN (10,11,12,13,14,15,16,17,18,19) ENGINE = MyISAM, - PARTITION `p20` VALUES IN (20,21,22,23,24,25,26,27,28,29) ENGINE = MyISAM) -SELECT * FROM t1; -a b -1 Original from partition p0 -11 Original from partition p1 -12 Original from partition p1 -13 Original from partition p1 -14 Original from partition p1 -2 Original from partition p0 -3 Original from partition p0 -4 Original from partition p0 -UNLOCK TABLES; -DROP TABLE t1; -SET SESSION debug_dbug=@save_dbug; |