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

Confusing error ER_PARTITION_INSTEAD_OF_SUBPARTITION upon trying to convert table to partition

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.7(EOL), 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
    • 10.11
    • Partitioning
    • None

    Description

      --source include/have_partition.inc
       
      create table t (a int, b int)
      partition by range (a)
      subpartition by hash(b) subpartitions 2 (
       partition p0 values less than (100)
      );
      create table t1 (a int, b int);
      alter table t convert table t1 to partition p2 values less than (maxvalue);
       
      # Cleanup
      drop table if exists t, t1;
      

      11.4 875377ad824473774c833b1aff4346ba3133f092

      query 'alter table t convert table t1 to partition p2 values less than (maxvalue)' failed:
      ER_PARTITION_INSTEAD_OF_SUBPARTITION (1734): Subpartitioned table, use subpartition instead of partition
      

      There should probably be some error, at least I don't see an obvious way to convert a table to a partition in a subpartitioned table. However, it should be more like "not applicable to subpartitioned table" or something like that.

      Maybe the logic was copied from EXCHANGE PARTITION. However, there the error makes sense, because indeed, a subpartition can be replaced with a table.

      Attachments

        Issue Links

          Activity

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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