Skip to content

feat: support MySQL CREATE and ALTER VIEW options - #2703

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

manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:feat/mysql-view-options

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

MySQL CREATE/ALTER VIEW prefixes such as ALGORITHM, DEFINER and SQL SECURITY could not be parsed as structured view statements.

Add a shared mutable MySqlViewOptions prefix model and parser. Extract MySqlDefiner account handling from TriggerDefiner while preserving the trigger API, including quoted accounts and CURRENT_USER(). Share CHECK OPTION parsing/printing between CREATE and ALTER, and traverse ALTER VIEW's query in TablesNamesFinder.

Validation: full Gradle check and grammar ambiguity gate; CREATE/OR REPLACE/ALTER option combinations, CHECK OPTION variants, AST edits, quoted accounts, trigger dispatch, deparsers and statement boundaries. All ten audited view-prefix inputs execute and retain SHOW CREATE VIEW results on both MySQL 9.7.2 and 26.7.0.

Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit e86fc13 into JSQLParser:master Sep 25, 2026
9 of 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