[MDEV-22166] CONVERT PARTITION: move out partition into a table Created: 2020-04-06 Updated: 2023-11-23 Resolved: 2021-10-26 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Partitioning |
| Fix Version/s: | 10.7.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Michael Widenius | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Preview_10.7 | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Moving a table out from a partitioned table is new quite cumbersome: CREATE TABLE tp1 LIKE archive; 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. |
| Comments |
| Comment by Aleksey Midenkov [ 2021-08-06 ] |
|
Should tp1 be locked under lock tables? LOCK TABLES t1 WRITE; I think this is a good idea to lock tp1 as well otherwise there is no guarantee of data consistency between t1 and tp1. |
| Comment by Aleksey Midenkov [ 2021-08-17 ] |
|
Please review |
| Comment by Sergei Golubchik [ 2021-09-10 ] |
|
818407474d6 is mostly ok. a couple of minor comments. I presume logging changes are reviewed and ok'ed by Monty |