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

Partition by system_time can be converted into table but not back

Details

    Description

      CONVERT PARTITION / CONVERT TABLE is asymmetrical for system versioning. A partition can be converted into a table, but it doesn't work the other way round:

      10.7 120a4caf

      create or replace table t (a int) with system versioning partition by system_time limit 10 partitions 3;
      alter table t convert partition p0 to table tp;
      alter table t convert table tp to partition p0;
      bug.t2                                   [ fail ]
              Test ended at 2022-10-21 00:36:09
       
      CURRENT_TEST: bug.t2
      mysqltest: At line 5: query 'alter table t convert table tp to partition p0' failed: ER_PARTITION_WRONG_TYPE (4113): Wrong partitioning type, expected type: `SYSTEM_TIME`
      

      Attachments

        Issue Links

          Activity

            Please review bb-10.7-midenok

            midenok Aleksey Midenkov added a comment - Please review bb-10.7-midenok

            approved

            nikitamalyavin Nikita Malyavin added a comment - approved

            I had to revert commit 1 of 2 (changing error messages) because it broke builds with cmake -DPLUGIN_PARTITION=NO.

            I think that the change needs to be implemented and reviewed in a separate ticket if it is considered useful.

            marko Marko Mäkelä added a comment - I had to revert commit 1 of 2 (changing error messages) because it broke builds with cmake -DPLUGIN_PARTITION=NO . I think that the change needs to be implemented and reviewed in a separate ticket if it is considered useful.

            For the record (since the history of this JIRA item doesn't make any sense and can be confusing): converting a table to a system-time partition still does not work, the problem described here was never fixed even though the resolution says it was; all that was done is a change of the error code/message, which now says "CONVERT TABLE TO PARTITION can only be used on RANGE/LIST partitions" for the scenario from the description.

            elenst Elena Stepanova added a comment - For the record (since the history of this JIRA item doesn't make any sense and can be confusing): converting a table to a system-time partition still does not work, the problem described here was never fixed even though the resolution says it was; all that was done is a change of the error code/message, which now says "CONVERT TABLE TO PARTITION can only be used on RANGE/LIST partitions" for the scenario from the description.

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.