Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table)
CREATE TABLE tp1 LIKE archive;
ALTER TABLE tp1 REMOVE PARTITIONING;
ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE tp1;
ALTER TABLE archive DROP PARTITION p1;
Instead one should be able to do:
ALTER TABLE archive CONVERT PARTITION p1 TO TABLE tp1;
The operation crash safety must be protected by DDL logging.
Attachments
Issue Links
- causes
-
MDEV-26767 Server crashes when rename table and alter storage engine
-
- Closed
-
- 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-22165 CONVERT TABLE: move in partition from existing table
-
- Closed
-
-
MDEV-31013 CONVERT PARTITION is not documented in the KB
-
- Closed
-
-
MDEV-22164 WITHOUT VALIDATION for EXCHANGE PARTITION/CONVERT IN
-
- 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 ] |
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 ] | Aleksey Midenkov [ midenok ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Description |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE p1 LIKE archive; ALTER TABLE p1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive EXTRACT PARTITION p1 AS TABLE p1; |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE p1 LIKE archive; ALTER TABLE p1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive EXTRACT PARTITION p1 AS TABLE p1; The operation crash safety must be protected by DDL logging. |
Link |
This issue relates to |
Description |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE p1 LIKE archive; ALTER TABLE p1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive EXTRACT PARTITION p1 AS TABLE p1; The operation crash safety must be protected by DDL logging. |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE p1 LIKE archive; ALTER TABLE p1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive EXPORT PARTITION p1 AS TABLE p1; The operation crash safety must be protected by DDL logging. |
Summary | Make it easier to move out a table from a partitioned table | EXPORT PARTITION: move out a table from a partitioned table |
Description |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE p1 LIKE archive; ALTER TABLE p1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE p1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive EXPORT PARTITION p1 AS TABLE p1; The operation crash safety must be protected by DDL logging. |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE tp1 LIKE archive; ALTER TABLE tp1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE tp1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive EXPORT PARTITION p1 AS TABLE tp1; The operation crash safety must be protected by DDL logging. |
Summary | EXPORT PARTITION: move out a table from a partitioned table | MIGRATE PARTITION: move out partition into a table |
Description |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE tp1 LIKE archive; ALTER TABLE tp1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE tp1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive EXPORT PARTITION p1 AS TABLE tp1; The operation crash safety must be protected by DDL logging. |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE tp1 LIKE archive; ALTER TABLE tp1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE tp1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive MIGRATE PARTITION p1 TO [TABLE] tp1; The operation crash safety must be protected by DDL logging. |
Link |
This issue relates to |
Assignee | Aleksey Midenkov [ midenok ] | Oleksandr Byelkin [ sanja ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Michael Widenius [ monty ] |
Assignee | Michael Widenius [ monty ] | Sergei Golubchik [ serg ] |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Summary | MIGRATE PARTITION: move out partition into a table | CONVERT PARTITION: move out partition into a table |
Description |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE tp1 LIKE archive; ALTER TABLE tp1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE tp1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive MIGRATE PARTITION p1 TO [TABLE] tp1; The operation crash safety must be protected by DDL logging. |
Moving a table out from a partitioned table is new quite cumbersome:
('archive' is here a partitioned table and 'p1' is a normal table) CREATE TABLE tp1 LIKE archive; ALTER TABLE tp1 REMOVE PARTITIONING; ALTER TABLE archive EXCHANGE PARTITION p1 WITH TABLE tp1; ALTER TABLE archive DROP PARTITION p1; Instead one should be able to do: ALTER TABLE archive CONVERT PARTITION p1 TO TABLE tp1; The operation crash safety must be protected by DDL logging. |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Assignee | Aleksey Midenkov [ midenok ] | Elena Stepanova [ elenst ] |
Link | This issue relates to TODO-3118 [ TODO-3118 ] |
Due Date | 2021-09-14 |
Assignee | Elena Stepanova [ elenst ] | Ramesh Sivaraman [ JIRAUSER48189 ] |
Link |
This issue causes |
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 [ 106793 ] | MariaDB v4 [ 134233 ] |
Link | This issue blocks MENT-1453 [ MENT-1453 ] |
Link | This issue blocks MENT-1454 [ MENT-1454 ] |
Link | This issue blocks MENT-1453 [ MENT-1453 ] |
Link |
This issue is blocked by |
Labels | Preview_10.7 |
Link |
This issue relates to |
Link |
This issue relates to |
Link |
This issue relates to |
Should tp1 be locked under lock tables?
LOCK TABLES t1 WRITE;
ALTER TABLE t1 EXPORT PARTITION p1 AS TABLE tp1;
SELECT * from tp1;
Table 'tp1' was not locked with LOCK TABLES
I think this is a good idea to lock tp1 as well otherwise there is no guarantee of data consistency between t1 and tp1.