Skip to content
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

Fix STORAGE syntax #403

Closed
zier-one opened this issue Jul 29, 2019 · 2 comments
Closed

Fix STORAGE syntax #403

zier-one opened this issue Jul 29, 2019 · 2 comments

Comments

@zier-one
Copy link
Contributor

Index Issue: pingcap/tidb#11486

These are bad (incompatible) SQL cases:


ALTER TABLE t STORAGE MEMORY STATS_SAMPLE_PAGES 11.11 , LOCK set_var ident
ALTER TABLE t STORAGE MEMORY MAX_ROWS =   11.11 , LOCK ident
ALTER TABLE t STORAGE MEMORY   KEY_BLOCK_SIZE 10
ALTER TABLE t STORAGE MEMORY , LOCK   set_var FILE
ALTER TABLE t STORAGE DISK MAX_ROWS =   123
ALTER TABLE t STORAGE DISK , LOCK =   DEFAULT
ALTER TABLE t STORAGE DISK ,   ALGORITHM set_var XA
ALTER TABLE t STORAGE DISK
ALTER TABLE t PACK_KEYS = DEFAULT STORAGE DISK
ALTER TABLE t STORAGE DISK
ALTER TABLE t ADD ident   NATIONAL CHAR ( 12 ) STORAGE DISK REFERENCES t2 ON UPDATE RESTRICT ON DELETE SET NULL , ADD CHECK ( 1>2 ) NOT   ENFORCED

Claim this subtask based on the comments below this issue.

@zier-one zier-one changed the title Fix remove partitioning syntax Fix STORAGE syntax Jul 29, 2019
@leiysky
Copy link
Contributor

leiysky commented Jul 29, 2019

I'll fix it. But where to get specification of STORAGE? I didn't find it in manual.

@zier-one
Copy link
Contributor Author

zier-one commented Jul 29, 2019

I'll fix it. But where to get specification of STORAGE? I didn't find it in manual.

See:https://github.com/mysql/mysql-server/blob/8.0/sql/sql_yacc.yy#L6094

The description of MySQL docs is different from the implementation.

table_option:
  | TABLESPACE tablespace_name 
  | STORAGE {DISK|MEMORY}
...

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