Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16101

ADD PARTITION on table partitioned by list does not work with more than 32 list values.

    XMLWordPrintable

Details

    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));
      

      Attachments

        Activity

          People

            jacob-mathew Jacob Mathew (Inactive)
            Richard Richard Stracke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.