Visitar URL original
[FEATURE] Parsing LOCK Clause in ALTER TABLE Using JSQLParser · Issue #2090 · JSQLParser/JSqlParser · GitHub
Skip to content

[FEATURE] Parsing LOCK Clause in ALTER TABLE Using JSQLParser #2090

Description

@minleejae

Grammar or Syntax Description

The LOCK=NONE clause in ALTER TABLE statements is not correctly parsed by JSQLParser. The parser successfully parses the statement into three AlterExpression objects, but the LOCK=NONE part is treated as UNSPECIFIC instead of identifying it as a proper ALTER OPERATION related to table locking behavior. This can cause ambiguity in the interpretation of certain ALTER TABLE statements.

SQL Example

ALTER TABLE sbtest1 MODIFY COLUMN pad_3 VARCHAR(20) DEFAULT NULL, ALGORITHM=INPLACE, LOCK=NONE;

Additional context

  • Applicable RDBMS: MySQL 8.0 and later
  • JSQLParser Version: 5.0

The parsing succeeds without errors, but I believe it is necessary to add an appropriate LOCK or AlterOperation type to handle clauses like LOCK=NONE properly.

Activity

  1. manticore-projects commented on Oct 18, 2024

    @manticore-projects
    Contributor

    Greetings!
    You will need to provide or sponsor an implementation to make this happen.

  2. deleted a comment from on Oct 31, 2024
  3. manticore-projects commented on Nov 14, 2024

    @manticore-projects
    Contributor

    Solved via #2095

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions