Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 2118: Enhance MySQL ALTER TABLE Parsing #2121

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

minleejae
Copy link
Contributor

Summary
This PR fixes and enhances the parsing functionality for MySQL ALTER TABLE statements in JSQLParser. It now supports a wider variety of ALTER TABLE syntax, including FORCE, ENGINE, ALGORITHM, and LOCK options.

Changes
Updated AlterOperation enum to include FORCE, ENGINE, ALGORITHM, and LOCK.
Modified the parser to correctly identify and handle these clauses.

Example
The following ALTER TABLE statements are now correctly parsed:

ALTER TABLE my_table FORCE;
ALTER TABLE tbl_name FORCE, ENGINE=InnoDB, ALGORITHM=INPLACE, LOCK=NONE;

Issue Reference
This PR addresses issue #2118.

@manticore-projects
Copy link
Contributor

Thank you for your contribution. A great job much appreciated.

@manticore-projects manticore-projects merged commit 18c1a2c into JSQLParser:master Dec 9, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants