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

parser: Add mode into UnReservedKeyword list #61

Merged
merged 1 commit into from
Sep 8, 2015
Merged

Conversation

shenli
Copy link
Member

@shenli shenli commented Sep 8, 2015

"mode" can be used as an identifier.
See: https://dev.mysql.com/doc/refman/5.7/en/keywords.html

@unknwon The following bug is caused by parser. This pr will fix it.
SELECT id, user_id, repo_id, mode FROM access WHERE repo_id=? AND mode>=?
, error: line 1 column 77 near "mode"
Is > a invalid operator?

@coocood
Copy link
Member

coocood commented Sep 8, 2015

LGTM

1 similar comment
@ngaut
Copy link
Member

ngaut commented Sep 8, 2015

LGTM

ngaut added a commit that referenced this pull request Sep 8, 2015
parser: Add mode into UnReservedKeyword list
@ngaut ngaut merged commit da15ee6 into master Sep 8, 2015
@ngaut ngaut deleted the shenli/mode-keyword branch September 8, 2015 03:30
@unknwon
Copy link
Contributor

unknwon commented Sep 8, 2015

Thanks!

YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
…ng (pingcap#61)

* vendor: insert `go-semver` dependecy

* tidb, util: extract the HTTP JSON fetching code into its own function

* *: check for cluster versions before starting

* restore_test: added logs to detect spurious failure

Also, make the mock import operation only wait while we're still opening
engines to speed up the test.

* util: document GetJSON()

* restore: use a more robust version parsing strategy for TiDB

In semver, '2.0.4-1 < 2.0.4', so we need to properly skip the unrelated
portions of the version.

* restore, kv: detect if SwitchMode exists instead of check version

TiKV and PD's versions are exposed before 2.1, so we can't rely on their
APIs to verify for 2.0.4+. Since the only reason we need 2.0.4+ is the
SwitchMode gRPC interface, we instead inspect if SwitchMode is
unimplemented and display a user-friendly message on stderr.
iosmanthus pushed a commit to iosmanthus/tidb that referenced this pull request Oct 31, 2022
Signed-off-by: disksing <[email protected]>

Signed-off-by: disksing <[email protected]>
mittalrishabh pushed a commit to mittalrishabh/tidb that referenced this pull request May 6, 2024
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

Successfully merging this pull request may close these issues.

4 participants