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 TiDB behavior: constraint check #601

Closed
tangenta opened this issue Oct 31, 2019 · 3 comments
Closed

Fix TiDB behavior: constraint check #601

tangenta opened this issue Oct 31, 2019 · 3 comments
Labels
good first issue Good for newcomers

Comments

@tangenta
Copy link
Contributor

Index issue: #598

SQL example

CREATE TABLE t (a INT CHECK (a > 1));
ALTER TABLE t ADD CONSTRAINT crn CHECK (a > 1);
ALTER TABLE t ALTER CHECK

Current implementation

ColumnOptionCheck, ConstraintType.ConstraintCheck, AlterTableAlterCheck, and AlterTableDropCheck are ignored by TiDB.

Expected implementation

Throw a warning.

@chanme
Copy link
Contributor

chanme commented Jun 6, 2020

@tangenta , I'm trying to solve this issue as a new contributor. where should I throw a warning, in pingcap/parser or pingcap/tidb? (I think it should be fixed in pingcap/tidb, but the issue is under pingcap/parser, a bit confused)

@tangenta
Copy link
Contributor Author

tangenta commented Jun 6, 2020

@chanme It should be fixed in pingcap/tidb :)

@chanme
Copy link
Contributor

chanme commented Jun 6, 2020

I have almost finished solving this issue, during writing the unit tests, I find out that some warnings are already generated by the pingcap/parser repo, should I first make a PR to remove the warning in the parser then add warning in pingcap/tidb to solve this issue?

Original Warning is:
| Warning | 1064 | You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 36 near ")"The CHECK clause is parsed but ignored by all storage engines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants