[MDEV-8348] Add catchall to all table partitioning for list partitions Created: 2015-06-22 Updated: 2020-04-06 Resolved: 2016-09-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Alter Table |
| Fix Version/s: | 10.2.2 |
| Type: | Task | Priority: | Minor |
| Reporter: | Norbert van Nobelen | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Compatibility | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Epic Link: | Oracle Compatibility | ||||||||||||||||||||||||||||||||||||
| Sprint: | 10.2.2-1, 10.2.2-2 | ||||||||||||||||||||||||||||||||||||
| Description |
|
Not all table partitioning has the ability to add a so called "catch all". The catch all is present in range partitioning: The proposal is to add similar statements to list partitioning: Proposed syntax: Benefits: No more insert exceptions, giving the DBA more choices in applying this partitioning with less effort. Oracle uses the following syntax for this: CREATE TABLE h2 (c1 NUMBER,c2 NUMBER) We should probably use the DEFAULT syntax for this. |
| Comments |
| Comment by Oleksandr Byelkin [ 2016-08-24 ] | ||||||||||||
|
DEFAULT looks ok. | ||||||||||||
| Comment by Oleksandr Byelkin [ 2016-08-24 ] | ||||||||||||
|
VALUES LESS THAN (MAXVALUE) is effectively DEFAULT partition for RANGE partition so probably it has sens to make syntax sugar here. | ||||||||||||
| Comment by Oleksandr Byelkin [ 2016-08-24 ] | ||||||||||||
|
Actual LIST partitioning syntax in MariaDB is
IMHO following syntax is what correspond to it:
"PARTITION partition_name VALUES IN (DEFAULT)" looks strange IMHO. | ||||||||||||
| Comment by Oleksandr Byelkin [ 2016-08-24 ] | ||||||||||||
|
After discussing it with Sergei Petrunia we decided that with current approach it will be done automatically. | ||||||||||||
| Comment by Oleksandr Byelkin [ 2016-08-25 ] | ||||||||||||
|
As far as several columns expression possible, we have to support | ||||||||||||
| Comment by Oleksandr Byelkin [ 2016-08-26 ] | ||||||||||||
|
Taking into account complications with deciding where to put record (2,3) when we have partitions (DEFAULT,3) and (2, DEFAULT) it will be better to have only one partition which catch all missed records. So syntax will be following:
| ||||||||||||
| Comment by Oleksandr Byelkin [ 2016-09-02 ] | ||||||||||||
|
revision-id: 442a3d4766f9115bfd496dd4fafd38f7aeb0e273 (mariadb-10.2.1-52-g442a3d4)
DEFAULT partition support added to LIST and LIST COLUMN partitioning. — | ||||||||||||
| Comment by Oleksandr Byelkin [ 2016-09-06 ] | ||||||||||||
|
revision-id: 06310902e5754fc2ead73d903267bb9fa85b85b2 (mariadb-10.2.1-52-g0631090)
DEFAULT partition support added to LIST and LIST COLUMN partitioning. — | ||||||||||||
| Comment by Krishnadas [ 2016-10-04 ] | ||||||||||||
|
DBS test cases for |