[MDEV-31213] CONVERT TABLE TO PARTITION: allow copy rows to avoid partition restrictions Created: 2023-05-08  Updated: 2023-05-21

Status: Open
Project: MariaDB Server
Component/s: Partitioning
Fix Version/s: None

Type: Task Priority: Major
Reporter: Aleksey Midenkov Assignee: Aleksey Midenkov
Resolution: Unresolved Votes: 1
Labels: None

Issue Links:
Blocks
is blocked by MDEV-27180 Fully atomic partitioning DDL operations Stalled
Relates
relates to MDEV-25495 Auto-drop old history partition for s... In Review
relates to MDEV-31212 Range partition: allow ADD PARTITION ... Open

 Description   

Reproduce

create or replace table t1 (x int)
partition by range columns (x) (
  partition p0 values less than (10),
  partition p1 values less than (20),
  partition pn values less than maxvalue);
 
insert into t1 values (21);
 
alter table t1 convert partition pn to table pn;
alter table t1 add partition (partition p2 values less than (30));
alter table t1 convert table pn to partition pn values less than maxvalue;

Result

alter table t1 convert table pn to partition pn values less than maxvalue;
ERROR 1737 (HY000): Found a row that does not match the partition

Expected

CONVERT TABLE succeeds, row 21 is moved to partition p2.



 Comments   
Comment by Federico Razzoli [ 2023-05-21 ]

When this task is done and MDEV-27180 is also done, will this operation be crash-safe?

I agree that this improvement is needed, but I wouldn't like to have it at the expense of crash-safeness.

Generated at Thu Feb 08 10:22:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.