[MDEV-16101] ADD PARTITION on table partitioned by list does not work with more than 32 list values. Created: 2018-05-07  Updated: 2020-08-25  Resolved: 2018-05-14

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Partitioning
Affects Version/s: 10.2, 10.3
Fix Version/s: 10.2.15, 10.3.7

Type: Bug Priority: Major
Reporter: Richard Stracke Assignee: Jacob Mathew (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

Create table with 1 partition.

CREATE TABLE ts1 (a INT, PRIMARY KEY (`a`))
PARTITION BY LIST (`a`)
(PARTITION `p ts_0` VALUES IN (101,102,103,104,105,106,107,108,109,110,
                               111,112,113,114,115,116,117,118,119,120,
                               121,122,123,124,125,126,127,128,129,130,
                               131,132,133));

Now alter table with more than 32 list values yields the error
"SQL Error (1657) Cannot have more than one value for this type of LIST partitioning"

ALTER TABLE ts1 ADD PARTITION
(PARTITION `p ts_1` VALUES IN (1,2,3,4,5,6,7,8,9,10,
                               11,12,13,14,15,16,17,18,19,20,
                               21,22,23,24,25,26,27,28,29,30,
                               31,32,33));

With 32 or less list values, it works fine.

ALTER TABLE ts1 ADD PARTITION
(PARTITION `p ts_1` VALUES IN (1,2,3,4,5,6,7,8,9,10,
                               11,12,13,14,15,16,17,18,19,20,
                               21,22,23,24,25,26,27,28,29,30,
                               31,32));



 Comments   
Comment by Jacob Mathew (Inactive) [ 2018-05-12 ]

Holyfoot, please review my fix for this problem in commit 85bbea8 on my branch.

Comment by Jacob Mathew (Inactive) [ 2018-05-14 ]

Fix 8e0159 is pushed to 10.3 and 10.2.

Generated at Thu Feb 08 08:26:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.