Bug #62505 | ALTER TABLE ADD PARTITION fails for LIST partitions with more than 16 items | ||
---|---|---|---|
Submitted: | 22 Sep 2011 21:19 | Modified: | 20 Dec 2011 15:45 |
Reporter: | Nicholas Smith | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S2 (Serious) |
Version: | 5.5.15, 5.5.17 | OS: | Any (Windows 7 64-bit) |
Assigned to: | CPU Architecture: | Any | |
Tags: | ALTER TABLE, list, partition, regression |
[22 Sep 2011 21:19]
Nicholas Smith
[23 Sep 2011 7:15]
Valeriy Kravchuk
Thank you for the bug report. Indeed, in 5.1 it works: macbook-pro:5.1 openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.1.60 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE TABLE p_test (int_id int, timeslice_id smallint, period_duration int, kpiValue -> float, primary key (int_id)) ENGINE=MYISAM -> ; Query OK, 0 rows affected (0.19 sec) mysql> ALTER TABLE p_test PARTITION BY LIST(int_id) (PARTITION part_1 VALUES IN -> (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)); Query OK, 0 rows affected (0.12 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE p_test ADD PARTITION (PARTITION part_2 VALUES in -> (21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)) -> ; Query OK, 0 rows affected (0.99 sec) Records: 0 Duplicates: 0 Warnings: 0 While in 5.5 it does not work: macbook-pro:5.5 openxs$ bin/mysql -uroot test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.5.17-debug Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE TABLE p_test (int_id int, timeslice_id smallint, period_duration int, kpiValue float, primary key (int_id)) ENGINE=MYISAM; Query OK, 0 rows affected (0.05 sec) mysql> ALTER TABLE p_test PARTITION BY LIST(int_id) (PARTITION part_1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)); Query OK, 0 rows affected (0.11 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> ALTER TABLE p_test ADD PARTITION (PARTITION part_2 VALUES in (21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)); ERROR 1657 (HY000): Cannot have more than one value for this type of LIST partitioning Looks like a regression bug to me.
[27 Oct 2011 15:57]
Nicholas Smith
I see this issue has not been assigned or given a target fix version. Can you tell me when I might be able to expect that this issue will be fixed and available?
[20 Dec 2011 15:45]
Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at http://dev.mysql.com/doc/en/installing-source.html
[20 Dec 2011 15:46]
Jon Stephens
Documented bugfix as follows in the 5.6.5 changelog: Adding a partition to an existing LIST-partitioned table did not work correctly if the number of items in the new partition was greater than 16. This could happen when trying to add a partition using an ALTER TABLE ... ADD PARTITION statement, or an ALTER TABLE ... REORGANIZE PARTITION statement. This 16-item limit was not apparent when using either CREATE TABLE ... PARTITION BY LIST or ALTER TABLE ... PARTITION BY LIST. Closed.