GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [BUG] 4.7: MySQL : Alter Add Key Encountered unexpected token: "comment" "COMMENT" · Issue #1906 · JSQLParser/JSqlParser

[BUG] 4.7: MySQL : Alter Add Key Encountered unexpected token: "comment" "COMMENT" #1906

New issue
Copy link
New issue
Copy link
Closed
#1919
Closed
[BUG] 4.7: MySQL : Alter Add Key Encountered unexpected token: "comment" "COMMENT"#1906
#1919
Copy link
Labels
DDLDDL statement relatedDDL statement relatedMySQLMySQL specific issueMySQL specific issueSponsor needed

Description

@linux2014linux
linux2014linux
opened on Nov 29, 2023
Issue body actions

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

Failing SQL Feature:

  net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "comment" "COMMENT"
    at line 1, column 51.

Was expecting one of:

    ","
    "DEFERRABLE"
    "DISABLE"
    "ENABLE"
    "NOT"
    "NOVALIDATE"
    "USING"
    "VALIDATE"
    <EOF>
    <ST_SEMICOLON>


	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parseStatement(CCJSqlParserUtil.java:315)
	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:116)
	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:85)
	at net.sf.jsqlparser.parser.CCJSqlParserUtil.parse(CCJSqlParserUtil.java:62)

SQL Example:

    alter table `student` add key `idx_name` (`name`) comment 'index name';

Software Information:

  • JSqlParser version 4.7
  • MySQL

Activity

  1. manticore-projects
    added
    MySQLMySQL specific issueMySQL specific issue
    DDLDDL statement relatedDDL statement related
    Sponsor needed
    on Dec 6, 2023
  2. jxnu-liguobin
    added 2 commits that reference this issue on Dec 15, 2023

    Closed JSQLParser#1906, Add `COMMENT` for `ALTER ADD` and format jjt …

    This issue will close once commit 084354f is merged into the 'master' branch.
    084354f

    Closed JSQLParser#1906, Add `COMMENT` for `ALTER ADD` and format jjt …

    This issue will close once commit af73c84 is merged into the 'master' branch.
    af73c84
  3. manticore-projects
    closed this as completedin #1919on Dec 15, 2023
  4. manticore-projects
    added a commit that references this issue on Dec 15, 2023

    Fix: [MySQL] Add `COMMENT` for `ALTER ADD` (#1919)

    This issue will close once commit 262ef55 is merged into the 'master' branch.
    262ef55
  5. linux2014linux commented on Dec 19, 2023

    @linux2014linux
    linux2014linux
    on Dec 19, 2023
    Author
    More actions

    @manticore-projects @jxnu-liguobin Release 4.7 still don't parse sql:

        alter table `student` add key `idx_name` (`name`) comment 'index name';
    
  6. manticore-projects commented on Dec 19, 2023

    @manticore-projects
    manticore-projects
    on Dec 19, 2023
    Contributor
    More actions

    The changes and improvements are in JSQLParser 4.8 SNAPSHOT only and I would like to advise to use the snapshot version.

    Reacted by linux2014linux
  7. linux2014linux commented on Dec 19, 2023

    @linux2014linux
    linux2014linux
    on Dec 19, 2023
    Author
    More actions

    The changes and improvements are in JSQLParser 4.8 SNAPSHOT only and I would like to advise to use the snapshot version.

    Ok, I should use it which mvn version.

  8. manticore-projects commented on Dec 19, 2023

    @manticore-projects
    manticore-projects
    on Dec 19, 2023
    Contributor
    More actions

    Ok, I should use it which mvn version.

    Unfortunately there is still no Maven Snapshot published (since @wumpz has time constraints).
    But you can download the SNAPSHOT JAR file from here: https://manticore-projects.com/JSQLParser/index.html

    Reacted by linux2014linux and 梦境迷离
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DDLDDL statement relatedDDL statement relatedMySQLMySQL specific issueMySQL specific issueSponsor needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.