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

engine options cannot be set together with partitioning

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 10.0.4, 5.2.14, 5.3.12, 5.5.33a
    • Fix Version/s: 5.5.34, 10.0.6
    • Component/s: None
    • Labels:
      None

      Description

      One cannot specify engine options when creating a partitioned table:

      > CREATE TABLE bar (id int, key (id) CLUSTERING=YES) ENGINE=TokuDB COMPRESSION=TOKUDB_LZMA PARTITION BY HASH(id) PARTITIONS 4;
      ERROR 1911 (HY000): Unknown option 'CLUSTERING
      

      but adding partitioning later works fine

      > CREATE TABLE bar (id int, key (id) CLUSTERING=YES) ENGINE=TokuDB COMPRESSION=TOKUDB_LZMA;
      Query OK, 0 rows affected (0.02 sec)
      
      > ALTER TABLE bar PARTITION BY HASH(id) PARTITIONS 4;
      Query OK, 0 rows affected (0.08 sec)
      Records: 0  Duplicates: 0  Warnings: 0
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              serg Sergei Golubchik added a comment - - edited

              This is consistent with how other table attributes work. For example INDEX/DATA DIRECTORY. Compare

              1)

              create table t2 (i int ) partition by range (i) ( partition p01 values less than (1000) data directory = '/tmp' index directory = '/tmp' );
              

              2)

              create table t2 (i int ) data directory = '/tmp' index directory = '/tmp' partition by range (i) ( partition p01 values less than (1000));
              

              In the second example the table is not created in /tmp, index/data clauses are ignored. Because they don't apply to a PARTITION engine, and, being, hard-coded, don't fail for unsupported engines.

              TokuDB specific clauses properly fail for a unsupported engine (like PARTITION). When partitioning is enabled, they should be specified per partition, not for the whole table. This is MDEV-5271

              Show
              serg Sergei Golubchik added a comment - - edited This is consistent with how other table attributes work. For example INDEX/DATA DIRECTORY. Compare 1) create table t2 (i int ) partition by range (i) ( partition p01 values less than (1000) data directory = '/tmp' index directory = '/tmp' ); 2) create table t2 (i int ) data directory = '/tmp' index directory = '/tmp' partition by range (i) ( partition p01 values less than (1000)); In the second example the table is not created in /tmp, index/data clauses are ignored. Because they don't apply to a PARTITION engine, and, being, hard-coded, don't fail for unsupported engines. TokuDB specific clauses properly fail for a unsupported engine (like PARTITION). When partitioning is enabled, they should be specified per partition, not for the whole table. This is MDEV-5271

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  serg Sergei Golubchik
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: