Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
This statement
CREATE TABLE t1 ( |
c1 INT PRIMARY KEY |
) ENGINE MEMORY
|
makes c1 the primary key and uses the default index type (HASH for MEMORY engine).
If we want to use a BTREE index instead, then this does not work:
CREATE TABLE t1 ( |
c1 INT PRIMARY KEY TYPE BTREE |
) ENGINE MEMORY
|
the SQL parser bails out at 'TYPE BTREE'
If written like so, it works again:
CREATE TABLE t1 ( |
c1 INT, |
PRIMARY KEY (c1) TYPE BTREE |
) ENGINE MEMORY
|
The request is to extend the parser to accept an index TYPE when a column definition contains an attribute that would add an index for that column. That is not just PRIMARY KEY, but also UNIQUE.