Skip to content

feat: support MySQL ALTER DATABASE options - #2700

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:feat/mysql-alter-database
Sep 25, 2026
Merged

manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:feat/mysql-alter-database

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

MySQL ALTER DATABASE options currently fall through to UnsupportedStatement, preventing callers from inspecting or changing database defaults through the AST.

Add a structured AlterDatabase statement and reuse the existing CREATE DATABASE / CREATE SCHEMA option model and parser for character set, collation and encryption. READ ONLY is parsed only in ALTER. Preserve optional database names, equals signs and the MySQL SCHEMA synonym, with visitor and deparser integration.

Validation: full Gradle check and grammar ambiguity gate; option mutation, visitor dispatch, unnamed database, statement boundaries and invalid READ ONLY values. The three audited option groups execute and retain their SHOW CREATE DATABASE results on both MySQL 9.7.2 and 26.7.0.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit d264065 into JSQLParser:master Sep 25, 2026
10 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

Thank you!

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.

2 participants