Skip to content

[FEATURE] MySQL ALTER Table Syntax List: UNSPECIFIC Operations #2118

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

Closed
minleejae opened this issue Nov 26, 2024 · 1 comment
Closed

[FEATURE] MySQL ALTER Table Syntax List: UNSPECIFIC Operations #2118

minleejae opened this issue Nov 26, 2024 · 1 comment

Comments

@minleejae
Copy link
Contributor

minleejae commented Nov 26, 2024

Grammar or Syntax Description

Description

Certain MySQL-specific ALTER TABLE clauses are not explicitly recognized by JSqlParser. These are categorized as Operation is UNSPECIFIC, which can limit parsing capabilities and programmatic handling of such statements.

EBNF Context

Below is a list of MySQL ALTER TABLE clauses that fall under the UNSPECIFIC category:

  • ENABLE KEYS
  • DISABLE KEYS
  • ALTER TABLE ... FORCE
  • ALTER TALBE ... COLLATE

SQL Examples

Example Queries

-- 1. ENABLE KEYS
ALTER TABLE `jin_innodb` ENABLE KEYS;

-- 2. DISABLE KEYS
ALTER TABLE `jin_innodb` DISABLE KEYS;

-- 3. FORCE
ALTER TABLE `my_table` FORCE;

-- 4. COLLATE
alter table cavedb.stat_app_api COLLATE=utf8mb4_general_ci;

-- 5. import / discard tablespace
ALTER TABLE t4 DISCARD TABLESPACE;
ALTER TABLE partitioned_table IMPORT tablespace;

More examples will be added to expand the coverage of MySQL-specific clauses.

Additional Context
JSqlParser Version : 5.0

Applicable RDBMS : MySQL 8.0

Documentation References
MySQL ALTER TABLE Documentation

@manticore-projects
Copy link
Contributor

Closed via #2121

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

No branches or pull requests

2 participants