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 VARYING syntax #503

Closed
zier-one opened this issue Aug 19, 2019 · 3 comments
Closed

Fix VARYING syntax #503

zier-one opened this issue Aug 19, 2019 · 3 comments

Comments

@zier-one
Copy link
Contributor

zier-one commented Aug 19, 2019

Index Issue: pingcap/tidb#11486

These are bad (incompatible) SQL cases:

ALTER TABLE t_n STORAGE DISK , MODIFY ident NATIONAL VARCHARACTER ( 12 ) COLUMN_FORMAT FIXED FIRST
ALTER TABLE d_n.t_n MODIFY COLUMN ident LONG CHAR VARYING AFTER ident REMOVE PARTITIONING
ALTER TABLE t_n CHANGE COLUMN ident ident LONG CHAR VARYING BINARY CHARSET text_string FIRST , TABLESPACE ident
ALTER TABLE d_n.t_n ALGORITHM = DEFAULT , DROP ident CASCADE PARTITION BY RANGE FIELDS ( ident ) PARTITIONS 10 ( PARTITION ident VALUES LESS THAN MAXVALUE ENGINE ident )

Claim this subtask based on the comments below this issue.

@zier-one zier-one changed the title Fix UNION syntax Fix VARYING syntax Aug 19, 2019
@lauhg
Copy link
Contributor

lauhg commented Aug 20, 2019

Let me fix it.

@lauhg
Copy link
Contributor

lauhg commented Aug 21, 2019

ALTER TABLE d_n.t_n ALGORITHM = DEFAULT , DROP ident CASCADE PARTITION BY RANGE FIELDS ( ident ) PARTITIONS 10 ( PARTITION ident VALUES LESS THAN MAXVALUE ENGINE ident )

This case does not belong to VARYING syntax cases. And its syntax is good, but errors occur when running tests.

parser_test.go:2516:
    s.RunTest(c, table)
parser_test.go:318:
    c.Assert(err, IsNil, comment)
... value *errors.withStack = [ddl:1484]Wrong number of partitions defined, mismatch with previous setting ("[ddl:1484]Wrong number of partitions defined, mismatch with previous setting")
... source alter table d_n.t_n algorithm = default, drop ident cascade partition by range fields (ident) partitions 10 (partition ident values less than maxvalue engine ident)

@zier-one
Copy link
Contributor Author

@lauhg remove it. it's my carelessness

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