You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: enhance ALTER TABLE support with UNIQUE KEY and INVISIBLE index - #2234
This PR adds support for two MySQL DDL statements:
ALTER TABLE ADD CONSTRAINT UNIQUE KEY syntax ALTER TABLE ALTER INDEX INVISIBLE syntax
Problem Solved
Previously, JSqlParser couldn't properly parse the following SQL statements:
ALTERTABLE sbtest1 ADD CONSTRAINT UNIQUE KEY ux_c3 (c3);
ALTERTABLE sbtest1 ALTER INDEX c4 INVISIBLE;
These are valid MySQL syntax for adding a unique constraint with a custom name and for making an index invisible to the query optimizer while keeping it maintained.
Description
This PR adds support for two MySQL DDL statements:
ALTER TABLE ADD CONSTRAINT UNIQUE KEY syntaxALTER TABLE ALTER INDEX INVISIBLE syntaxProblem Solved
Previously, JSqlParser couldn't properly parse the following SQL statements:
These are valid MySQL syntax for adding a unique constraint with a custom name and for making an index invisible to the query optimizer while keeping it maintained.
Related Issue
#2076