Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8348

Add catchall to all table partitioning for list partitions

Details

    Description

      Not all table partitioning has the ability to add a so called "catch all". The catch all is present in range partitioning:
      partition last values less than(MAXVALUE)

      The proposal is to add similar statements to list partitioning: Proposed syntax:
      partition last values not in other

      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)
      PARTITION BY LIST(c1) (
      PARTITION p0 VALUES (1, 4, 7),
      PARTITION p1 VALUES (2, 5, 8),
      PARTITION p3 VALUES(DEFAULT)

      We should probably use the DEFAULT syntax for this.

      Attachments

        Issue Links

          Activity

            As far as several columns expression possible, we have to support
            PARTITION p1 VALUES IN ((default, 2))
            hopefully it will not conflict with default values of correspondent column in users understanding...

            sanja Oleksandr Byelkin added a comment - As far as several columns expression possible, we have to support PARTITION p1 VALUES IN ((default, 2)) hopefully it will not conflict with default values of correspondent column in users understanding...
            sanja Oleksandr Byelkin added a comment - - edited

            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:

            PARTITION BY LIST (partitioning_expression)
            (
            	PARTITION partition_name VALUES IN (value_list),
            	[ PARTITION partition_name VALUES IN (value_list), ... ]
                    [ PARTITION partition_name DEFAULT ]
            )
            

            PARTITION BY LIST COLUMNS(column_list)
            (
            	PARTITION partition_name VALUES IN ((value_list),(value_list),...),
            	[ PARTITION partition_name VALUES IN ((value_list),(value_list), ...) ]
                    [ PARTITION partition_name DEFAULT ]
            )
            

            sanja Oleksandr Byelkin added a comment - - edited 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: PARTITION BY LIST (partitioning_expression) ( PARTITION partition_name VALUES IN (value_list), [ PARTITION partition_name VALUES IN (value_list), ... ] [ PARTITION partition_name DEFAULT ] ) PARTITION BY LIST COLUMNS(column_list) ( PARTITION partition_name VALUES IN ((value_list),(value_list),...), [ PARTITION partition_name VALUES IN ((value_list),(value_list), ...) ] [ PARTITION partition_name DEFAULT ] )

            revision-id: 442a3d4766f9115bfd496dd4fafd38f7aeb0e273 (mariadb-10.2.1-52-g442a3d4)
            parent(s): 1eb58ff3b8569d7dad1f5c180a5e55683e53d205
            committer: Oleksandr Byelkin
            timestamp: 2016-09-02 15:09:12 +0200
            message:

            MDEV-8348: Add catchall to all table partitioning for list partitions

            DEFAULT partition support added to LIST and LIST COLUMN partitioning.
            Partitions Prunning added for DEFAULT partititon.

            sanja Oleksandr Byelkin added a comment - revision-id: 442a3d4766f9115bfd496dd4fafd38f7aeb0e273 (mariadb-10.2.1-52-g442a3d4) parent(s): 1eb58ff3b8569d7dad1f5c180a5e55683e53d205 committer: Oleksandr Byelkin timestamp: 2016-09-02 15:09:12 +0200 message: MDEV-8348 : Add catchall to all table partitioning for list partitions DEFAULT partition support added to LIST and LIST COLUMN partitioning. Partitions Prunning added for DEFAULT partititon. —

            revision-id: 06310902e5754fc2ead73d903267bb9fa85b85b2 (mariadb-10.2.1-52-g0631090)
            parent(s): 1eb58ff3b8569d7dad1f5c180a5e55683e53d205
            committer: Oleksandr Byelkin
            timestamp: 2016-09-06 22:52:39 +0200
            message:

            MDEV-8348: Add catchall to all table partitioning for list partitions

            DEFAULT partition support added to LIST and LIST COLUMN partitioning.
            Partitions Prunning added for DEFAULT partititon.

            sanja Oleksandr Byelkin added a comment - revision-id: 06310902e5754fc2ead73d903267bb9fa85b85b2 (mariadb-10.2.1-52-g0631090) parent(s): 1eb58ff3b8569d7dad1f5c180a5e55683e53d205 committer: Oleksandr Byelkin timestamp: 2016-09-06 22:52:39 +0200 message: MDEV-8348 : Add catchall to all table partitioning for list partitions DEFAULT partition support added to LIST and LIST COLUMN partitioning. Partitions Prunning added for DEFAULT partititon. —
            Krishnadas Krishnadas added a comment -

            DBS test cases for MDEV-8348 MDEV-8348.zip

            Krishnadas Krishnadas added a comment - DBS test cases for MDEV-8348 MDEV-8348.zip

            People

              sanja Oleksandr Byelkin
              Norbert van Nobelen Norbert van Nobelen
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.