-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
When mysqldump dumps tables, it adds a comment and this case is not yet supported :
create table t(
id int not null,
dt date not null,
primary key(id, dt)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
/*!50500 PARTITION BY RANGE COLUMNS(dt)
(PARTITION p20201231 VALUES LESS THAN ('2021-01-01') ENGINE = InnoDB,
PARTITION p20211230 VALUES LESS THAN ('2021-12-31') ENGINE = InnoDB,
PARTITION p20211231 VALUES LESS THAN ('2022-01-03') ENGINE = InnoDB,
PARTITION p20220103 VALUES LESS THAN ('2022-01-04') ENGINE = InnoDB,
PARTITION p20220104 VALUES LESS THAN ('2022-01-05') ENGINE = InnoDB,
PARTITION p20220105 VALUES LESS THAN ('2022-01-06') ENGINE = InnoDB
)*/;
This edge case is handled in the python parser :
| def find_partitioning_options(source): |
I suggest to use the antlr parser first, if it does not find the partitioning key, use the method as a fallback.
Metadata
Metadata
Assignees
Labels
dev-completeDevelopment completedDevelopment completed