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 2089: Enhance MySQL CONVERT Statement Parsing #2117

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

minleejae
Copy link
Contributor

Summary
This PR fixes and enhances the parsing functionality for MySQL CONVERT statements in ALTER TABLE clauses in JSQLParser. It now supports a wider variety of CONVERT syntax.

Changes
Updated AlterOperation enum to include CONVERT.
Modified the parser to correctly identify and handle the CONVERT clause, including optional COLLATE specifications.

Enhanced the parser to support the following ALTER TABLE syntax:

ALTER TABLE tbl_name
    | [DEFAULT] CHARACTER SET [=] charset_name [COLLATE [=] collation_name]
    | CONVERT TO CHARACTER SET charset_name [COLLATE collation_name]

@manticore-projects manticore-projects merged commit 8b4149b into JSQLParser:master Nov 26, 2024
2 of 3 checks passed
@minleejae minleejae deleted the feature/alter branch December 9, 2024 07:49
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