-
-
Notifications
You must be signed in to change notification settings - Fork 584
Description
There are two parameters for CREATE TABLE and ALTER TABLE statements in MySQL that are only used for MySQL's MERGE engine (https://dev.mysql.com/doc/refman/8.0/en/merge-storage-engine.html)
There parameters are UNION and INSERT_METHOD
The statements look like this:
CREATE TABLE `t24534` (`c1` TINYINT KEY, c2 TINYINT NULL) UNION = (`c3`, `c4`) MAX_ROWS 4;
CREATE TABLE `t22e94` (`c1` NUMERIC UNIQUE, c2 NUMERIC PRIMARY KEY) INSERT_METHOD = LAST, MIN_ROWS 16;
(The = is optional, like with the other parameters.)
INSERT_METHOD has three accepted values: FIRST, LAST, and NO. We currently parse FIRST and NO, but don't parse LAST.
UNION may be slightly trickier to parse because we need to parse the parentheses and the identifiers within. The identifiers should just be a comma-separated list of table names.
We have no plans to support the MERGE engine, but we want to make these parameters consistent with other parameters that are tied to features we don't intend to support (like SECONDARY_ENGINE): Dolt should successfully parse these statements even if it doesn't use the parameter.