BUG#15820 - Can create table with 1 partition, then doing ALTER .. ADD PARTITION crashes

It is ok for a partitioned table to have only 1 partition.  This test is just to show that
doing the ALTER TABLE ADD PARTITION doesn't crash the server.

partition_mgm_err.result:
  Added result block for test of bug #15820
partition_mgm_err.test:
  Added test block for bug #15820
parent 8f525432
...@@ -140,3 +140,5 @@ t1 CREATE TABLE `t1` ( ...@@ -140,3 +140,5 @@ t1 CREATE TABLE `t1` (
`a` int(11) default NULL `a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) PARTITIONS 2 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) PARTITIONS 2
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
...@@ -210,3 +210,9 @@ SHOW CREATE TABLE t1; ...@@ -210,3 +210,9 @@ SHOW CREATE TABLE t1;
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 2; ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 2;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
#
#BUG 15820 create table with 1 partition, doing ALTER TABLE ADD PARTITION fails
#
CREATE TABLE t1 (a INT) PARTITION BY HASH(a);
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment