Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
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
- causes
-
MDEV-29841 Partition by system_time can be converted into table but not back
-
- Closed
-
-
MDEV-31014 Database privileges are insufficient for CONVERT TABLE TO PARTITION
-
- Closed
-
-
MDEV-33131 Server crash or assertion failure upon CONVERT <temporary table> TO PARTITION
-
- Open
-
-
MDEV-33146 CONVERT TABLE TO PARTITION does not work for default list partition
-
- Open
-
-
MDEV-33154 Confusing error ER_PARTITION_INSTEAD_OF_SUBPARTITION upon trying to convert table to partition
-
- Open
-
-
MDEV-33170 ASAN errors upon CONVERT TABLE TO PARTITION with query cache
-
- Open
-
- is blocked by
-
MDEV-17567 Atomic DDL
-
- Closed
-
- is part of
-
MDEV-22162 Make partitions more flexible to use
-
- Open
-
- relates to
-
MDEV-17567 Atomic DDL
-
- Closed
-
-
MDEV-22164 WITHOUT VALIDATION for EXCHANGE PARTITION/CONVERT IN
-
- Closed
-
-
MDEV-22166 CONVERT PARTITION: move out partition into a table
-
- Closed
-
-
MDEV-27180 Fully atomic partitioning DDL operations
-
- In Review
-
-
MDEV-31014 Database privileges are insufficient for CONVERT TABLE TO PARTITION
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link | This issue is part of MDEV-22162 [ MDEV-22162 ] |
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 |
Assignee | Alexey Botchkov [ holyfoot ] |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.5 [ 23123 ] |
Fix Version/s | 10.6 [ 24028 ] |
Assignee | Alexey Botchkov [ holyfoot ] |
Fix Version/s | 10.7 [ 24805 ] |
Assignee | Oleksandr Byelkin [ sanja ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Due Date | 2021-09-14 |
Assignee | Oleksandr Byelkin [ sanja ] | Dmitry Shulga [ JIRAUSER47315 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Link |
This issue relates to |
Summary | Make it easier to add a new table to a partitoned table | IMPORT PARTITION: add a new table to a partitoned table |
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; |
Summary | IMPORT PARTITION: add a new table to a partitoned table | ADD PARTITION: migrate partition from existing table |
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. |
Link |
This issue relates to |
Comment | [ A comment with security level 'Developers' was removed. ] |
Summary | ADD PARTITION: migrate partition from existing table | MIGRATE PARTITION: move in partition from existing table |
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. |
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. |
Summary | MIGRATE PARTITION: move in partition from existing table | CONVERT PARTITION: move in partition from existing table |
Summary | CONVERT PARTITION: move in partition from existing table | CONVERT TABLE: move in partition from existing table |
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. |
Assignee | Dmitry Shulga [ JIRAUSER47315 ] | Aleksey Midenkov [ midenok ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Elena Stepanova [ elenst ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Link | This issue relates to TODO-3118 [ TODO-3118 ] |
Due Date | 2021-09-14 |
Assignee | Elena Stepanova [ elenst ] | Ramesh Sivaraman [ JIRAUSER48189 ] |
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 ] |
Link | This issue relates to MDEV-27180 [ MDEV-27180 ] |
Workflow | MariaDB v3 [ 106792 ] | MariaDB v4 [ 134232 ] |
Link |
This issue causes |
Link | This issue blocks MENT-1454 [ MENT-1454 ] |
Link |
This issue is blocked by |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue relates to |
Link | This issue causes MDEV-33131 [ MDEV-33131 ] |
Link | This issue causes MDEV-33146 [ MDEV-33146 ] |
Link | This issue causes MDEV-33154 [ MDEV-33154 ] |
Link | This issue causes MDEV-33170 [ MDEV-33170 ] |
Just to be clear, the statement like the following one
"ALTER TABLE archive ADD PARTITION (PARTITION p1 VALUES LESS THAN (200)) FROM TABLE p1;"
borrowed from the task description doesn't imply dropping the table 'p1'.
In other words, after the statement be executed the table 'p1' does still exists and should be dropped explicitly if required.