[#7651] Error Parsing Script for DDLDatabase when column name is called index

This commit is contained in:
lukaseder 2018-07-10 11:50:07 +02:00
parent c7060ef4cc
commit 896d00406b

View File

@ -2347,8 +2347,8 @@ final class ParserImpl implements Parser {
else if (constraint == null && (parseKeywordIf(ctx, "KEY") || parseKeywordIf(ctx, "INDEX"))) {
int p2 = ctx.position();
// [#7348] Look ahead if the next tokens indicate a MySQL index definition
if (parseIf(ctx, '(') || parseIdentifierIf(ctx) != null) {
// [#7348] [#7651] Look ahead if the next tokens indicate a MySQL index definition
if (parseIf(ctx, '(') || (parseIdentifierIf(ctx) != null && parseIf(ctx, '('))) {
ctx.position(p2);
indexes.add(parseIndexSpecification(ctx, tableName));
continue columnLoop;