Skip to content

Support MySQL ALTER TABLE rename variants - #2543

Merged
manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/mysql-alter-table-rename-without-to
Sep 5, 2026
Merged

manticore-projects merged 1 commit into
JSQLParser:masterfrom
minleejae:fix/mysql-alter-table-rename-without-to

Conversation

@minleejae

Copy link
Copy Markdown
Contributor

Summary

  • parse ALTER TABLE old RENAME new and RENAME AS new in addition to RENAME TO new
  • expose the exact table-rename keyword as NONE, AS, or TO
  • preserve RENAME TO as the default for programmatically constructed AlterExpression instances
  • keep column and index rename parsing distinct

Validation

  • ./gradlew test spotlessCheck checkstyleMain checkstyleTest
  • parser generation remains at the baseline 11 warnings
  • all three table-rename forms were executed successfully against MySQL 8.4

PR checklist

  • One independently reviewable syntax feature
  • Structured AST access; no token reparsing
  • Existing rename output remains backward compatible

@manticore-projects
manticore-projects merged commit bb37719 into JSQLParser:master Sep 5, 2026
8 checks passed
@manticore-projects

Copy link
Copy Markdown
Contributor

Thanks!

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