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

NODE_ID is mistaken as a full keyword #9910

Closed
kennytm opened this issue Mar 27, 2019 · 3 comments
Closed

NODE_ID is mistaken as a full keyword #9910

kennytm opened this issue Mar 27, 2019 · 3 comments
Labels
component/parser priority/release-blocker This issue blocks a release. Please solve it ASAP. type/bug The issue is confirmed as a bug.

Comments

@kennytm
Copy link
Contributor

kennytm commented Mar 27, 2019

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

Execute the DDL

CREATE TABLE a (node_id INT);
  1. What did you expect to see?

The table successfully created.

  1. What did you see instead?

Syntax error:

ERROR 1064 (42000): 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 22 near "node_id int)" 
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
Release Version: v3.0.0-beta-242-g0b28f30cf
Git Commit Hash: 0b28f30cfdef7a396c7d5474d5536787e2d00bd0
Git Branch: master
UTC Build Time: 2019-03-19 08:25:08
GoVersion: go version go1.12 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
@kennytm kennytm added type/bug The issue is confirmed as a bug. priority/release-blocker This issue blocks a release. Please solve it ASAP. component/parser labels Mar 27, 2019
@kennytm
Copy link
Contributor Author

kennytm commented Mar 27, 2019

This also affects the release-2.1 branch:

mysql> create table a(node_id int);
ERROR 1105 (HY000): line 1 column 22 near " int)" (total length 27)
Release Version: v2.1.6-17-g41d90ef37-dirty
Git Commit Hash: 41d90ef372cdbd127c17a44f15502b5bb0cfbb79
Git Branch: release-2.1
UTC Build Time: 2019-03-27 08:14:04
GoVersion: go version go1.12.1 darwin/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false

Edit: Also affects the identifier node_state. The identifiers pump and drainer are fine.

mysql> create table a(node_state int);
ERROR 1105 (HY000): line 1 column 25 near " int)" (total length 30)

mysql> create table b(pump int, drainer int);
Query OK, 0 rows affected (0.01 sec)

@zimulala
Copy link
Contributor

zimulala commented Mar 27, 2019

It seems that is caused by pingcap/parser#243.

@kennytm
Copy link
Contributor Author

kennytm commented Mar 28, 2019

Fixed by #9917 and #9928.

@kennytm kennytm closed this as completed Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/parser priority/release-blocker This issue blocks a release. Please solve it ASAP. type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants