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 LOCK clause error message #508

Closed
tangenta opened this issue Aug 21, 2019 · 1 comment
Closed

Fix LOCK clause error message #508

tangenta opened this issue Aug 21, 2019 · 1 comment

Comments

@tangenta
Copy link
Contributor

Index Issue: pingcap/tidb#11486

These are bad (incompatible) SQL cases:

alter table t lock = first
alter table t lock = start
alter table t lock = commit
alter table t lock = binlog

The body "LOCK" EqOpt identifier in LockClause should be used when the identifier is an unreserved keyword, and report

Error 1801: Unknown LOCK type 'first'

in the first example. However, TiDB parser reports:

Error 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 26 near "first"

Claim this subtask based on the comments below this issue.

@lauhg
Copy link
Contributor

lauhg commented Aug 21, 2019

Let me fix it.

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

3 participants