Skip to content

[BUG] JSQLParser 5.1 : MySQL : unique index parse fail #2182

Open
@ThinkSure

Description

@ThinkSure

Always check against the Latest SNAPSHOT of JSQLParser and the Syntax Diagram


Failing SQL Feature:

  • mysql unique index parse fail
    
    

SQL Example:

  • Simplified Query Example, focusing on the failing feature
ALTER TABLE `goods` ADD unique `aaa` ( `cate_id` );



Software Information:

  • JSqlParser 5.1
  • MySQL
    

Tips:

When I add a unique index and specify the name of the index, the parsing will report an error.As the following example

ALTER TABLE `goods` ADD unique `aaa` ( `cate_id` );


But if I don't specify the index name, the parsing will be successful.As the following example

ALTER TABLE `goods` ADD unique ( `cate_id` );



Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions