[jOOQ/jOOQ#12712] Parser mis-interprets KEY columns as MySQL KEY (INDEX) specification if unquoted and of type VARCHAR(n)
This commit is contained in:
parent
d071fda2ef
commit
4f25c51d03
@ -4279,11 +4279,14 @@ final class DefaultParseContext extends AbstractScope implements ParseContext {
|
||||
|
||||
int p2 = position();
|
||||
|
||||
// [#7348] [#7651] [#9132] Look ahead if the next tokens
|
||||
// indicate a MySQL index definition
|
||||
if (parseIf('(') || (parseIdentifierIf() != null
|
||||
&& parseUsingIndexTypeIf()
|
||||
&& parseIf('('))) {
|
||||
// [#7348] [#7651] [#9132] [#12712]
|
||||
// Look ahead if the next tokens indicate a MySQL index definition
|
||||
if (parseIf('(') || (
|
||||
parseDataTypeIf(false) == null
|
||||
&& parseIdentifierIf() != null
|
||||
&& parseUsingIndexTypeIf()
|
||||
&& parseIf('('))
|
||||
) {
|
||||
position(p2);
|
||||
indexes.add(parseIndexSpecification(tableName));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user