Skip to content

feat: share MySQL scalar table options across CREATE and ALTER - #2694

Merged
manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/mysql-shared-table-options
Sep 24, 2026
Merged

manticore-projects merged 2 commits into
JSQLParser:masterfrom
minleejae:feat/mysql-shared-table-options

Conversation

@minleejae

@minleejae minleejae commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Model MySQL ENCRYPTION, PASSWORD, DATA DIRECTORY, and INDEX DIRECTORY as typed table options. Extract their value grammar together with AUTO_INCREMENT for reuse across CREATE and ALTER.

Existing ALTER string getters remain live projections of the structured option, and legacy string setters still work. Tests cover quoted paths, optional equals signs, large unsigned values, comma boundaries, AST edits, and legacy setters.

Validation:

  • Full Gradle check passed (Java 17), including grammar ambiguity, unit tests, coverage, formatting, Checkstyle, PMD, and SpotBugs.
  • Validated on MySQL 8.4.11, including MyISAM DATA/INDEX DIRECTORY and ALTER ENCRYPTION/AUTO_INCREMENT/PASSWORD. PASSWORD is accepted but ignored by MySQL; ALTER directory options follow server semantics.
  • Added AST, mutation, and parse/deparse regression coverage.

Syntax reference: official documentation.

Additional version-boundary validation: the original, toString, and deparser SQL was executed on isolated MySQL 9.7.2 and 26.7.0 servers, including the focused behavioral cases. Added regression cases for VECTOR with omitted dimensions and dimensions 0, 1, 2048, and 16383 before ENCRYPTION. Reviewed the MySQL 9.7 and MySQL 26.7 grammar. Runtime version numbers above identify the tested binaries; this does not claim support for every statement in those DBMS versions.

Signed-off-by: minleejae <mmj9808@gmail.com>
Signed-off-by: minleejae <mmj9808@gmail.com>
@manticore-projects
manticore-projects merged commit a1b82fc into JSQLParser:master Sep 24, 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