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

CONVERT TABLE: move in partition from existing table

Details

    Description

      Adding a new table to a partitioned table is now quite cumbersome:
      ('archive' is here a partitioned table and p1 is a normal table)

      ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
      ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
      DROP TABLE p1;

      It would be nice to be able to do this in one step:
      ALTER TABLE archive CONVERT TABLE tp1 TO PARTITION p1 VALUES LESS THAN (200);

      The operation crash safety must be protected by DDL logging.

      Attachments

        Issue Links

          Activity

            monty Michael Widenius created issue -
            monty Michael Widenius made changes -
            Field Original Value New Value
            monty Michael Widenius made changes -
            Summary Making it easier to add a new table to a partitoned table Make it easier to add a new table to a partitoned table
            serg Sergei Golubchik made changes -
            Assignee Alexey Botchkov [ holyfoot ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.5 [ 23123 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Fix Version/s 10.6 [ 24028 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Assignee Alexey Botchkov [ holyfoot ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7 [ 24805 ]
            serg Sergei Golubchik made changes -
            Assignee Oleksandr Byelkin [ sanja ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            ralf.gebhardt Ralf Gebhardt made changes -
            Due Date 2021-09-14
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Dmitry Shulga [ JIRAUSER47315 ]
            shulga Dmitry Shulga made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            midenok Aleksey Midenkov made changes -
            midenok Aleksey Midenkov made changes -
            Summary Make it easier to add a new table to a partitoned table IMPORT PARTITION: add a new table to a partitoned table
            midenok Aleksey Midenkov made changes -
            Description Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200)) FROM TABLE p1;
            Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive IMPORT PARTITION (PARTITION p1 VALUES LESS THAN (200)) FROM TABLE p1;
            midenok Aleksey Midenkov made changes -
            Summary IMPORT PARTITION: add a new table to a partitoned table ADD PARTITION: migrate partition from existing table
            midenok Aleksey Midenkov made changes -
            Description Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive IMPORT PARTITION (PARTITION p1 VALUES LESS THAN (200)) FROM TABLE p1;
            Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive ADD PARTITION ([PARTITION] p1 VALUES LESS THAN (200)) MIGRATE [FROM] [TABLE] p1;

            As a syntax improvement we can make PARTITION optional in partition specification, as well as FROM and TABLE keywords.

            The operation crash safety must be protected by DDL logging.
            midenok Aleksey Midenkov made changes -
            serg Sergei Golubchik made changes -
            Comment [ A comment with security level 'Developers' was removed. ]
            midenok Aleksey Midenkov made changes -
            Summary ADD PARTITION: migrate partition from existing table MIGRATE PARTITION: move in partition from existing table
            midenok Aleksey Midenkov made changes -
            Description Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive ADD PARTITION ([PARTITION] p1 VALUES LESS THAN (200)) MIGRATE [FROM] [TABLE] p1;

            As a syntax improvement we can make PARTITION optional in partition specification, as well as FROM and TABLE keywords.

            The operation crash safety must be protected by DDL logging.
            Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive MIGRATE PARTITION ([PARTITION] p1 VALUES LESS THAN (200)) FROM [TABLE] p1;

            As a syntax improvement we can make PARTITION optional in partition specification, as well as FROM and TABLE keywords.

            The operation crash safety must be protected by DDL logging.
            midenok Aleksey Midenkov made changes -
            Description Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive MIGRATE PARTITION ([PARTITION] p1 VALUES LESS THAN (200)) FROM [TABLE] p1;

            As a syntax improvement we can make PARTITION optional in partition specification, as well as FROM and TABLE keywords.

            The operation crash safety must be protected by DDL logging.
            Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive MIGRATE PARTITION ([PARTITION] p1 VALUES LESS THAN (200)) FROM [TABLE] p1;

            The operation crash safety must be protected by DDL logging.
            midenok Aleksey Midenkov made changes -
            Summary MIGRATE PARTITION: move in partition from existing table CONVERT PARTITION: move in partition from existing table
            midenok Aleksey Midenkov made changes -
            Summary CONVERT PARTITION: move in partition from existing table CONVERT TABLE: move in partition from existing table
            midenok Aleksey Midenkov made changes -
            Description Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive MIGRATE PARTITION ([PARTITION] p1 VALUES LESS THAN (200)) FROM [TABLE] p1;

            The operation crash safety must be protected by DDL logging.
            Adding a new table to a partitioned table is now quite cumbersome:
            ('archive' is here a partitioned table and p1 is a normal table)

            ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200));
            ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1;
            DROP TABLE p1;

            It would be nice to be able to do this in one step:
            ALTER TABLE archive CONVERT TABLE tp1 TO PARTITION p1 VALUES LESS THAN (200);

            The operation crash safety must be protected by DDL logging.
            midenok Aleksey Midenkov made changes -
            Assignee Dmitry Shulga [ JIRAUSER47315 ] Aleksey Midenkov [ midenok ]
            midenok Aleksey Midenkov made changes -
            Status In Progress [ 3 ] Stalled [ 10000 ]
            midenok Aleksey Midenkov made changes -
            Assignee Aleksey Midenkov [ midenok ] Sergei Golubchik [ serg ]
            Status Stalled [ 10000 ] In Review [ 10002 ]
            serg Sergei Golubchik made changes -
            Assignee Sergei Golubchik [ serg ] Elena Stepanova [ elenst ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            serg Sergei Golubchik made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            Due Date 2021-09-14
            elenst Elena Stepanova made changes -
            Assignee Elena Stepanova [ elenst ] Ramesh Sivaraman [ JIRAUSER48189 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.7.1 [ 26120 ]
            Fix Version/s 10.7 [ 24805 ]
            Assignee Ramesh Sivaraman [ JIRAUSER48189 ] Aleksey Midenkov [ midenok ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            midenok Aleksey Midenkov made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 106792 ] MariaDB v4 [ 134232 ]
            elenst Elena Stepanova made changes -
            ralf.gebhardt Ralf Gebhardt made changes -
            midenok Aleksey Midenkov made changes -
            midenok Aleksey Midenkov made changes -
            midenok Aleksey Midenkov made changes -
            serg Sergei Golubchik made changes -
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -

            People

              midenok Aleksey Midenkov
              monty Michael Widenius
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.