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

Incompatibility with MySQL in BETWEEN operation in where clause #19155

Open
ekexium opened this issue Aug 12, 2020 · 2 comments
Open

Incompatibility with MySQL in BETWEEN operation in where clause #19155

ekexium opened this issue Aug 12, 2020 · 2 comments

Comments

@ekexium
Copy link
Contributor

ekexium commented Aug 12, 2020

Bug Report

1. Minimal reproduce step (Required)

select 1 where 2 between 0 and 3; -- TiDB: error 1064; MySQL: 1

2. What did you expect to see? (Required)

+---+
| 1 |
+---+
| 1 |
+---+

3. What did you see instead (Required)

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 14 near "where 2 between 0 and 3"

4. What is your TiDB version? (Required)

Release Version: v4.0.0-beta.2-944-gae779e150
Edition: Community
Git Commit Hash: ae779e1
Git Branch: master
UTC Build Time: 2020-08-11 03:55:14
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

@ekexium ekexium added the type/bug The issue is confirmed as a bug. label Aug 12, 2020
@liuzix
Copy link
Contributor

liuzix commented Aug 12, 2020

/label sig/execution

@ti-srebot ti-srebot added the sig/execution SIG execution label Aug 12, 2020
@ghost
Copy link

ghost commented Aug 13, 2020

Confirming that this is a MySQL 8.0 compatibility issue, and not strictly a bug. TiDB is consistent with 5.7:

mysql [localhost:5731] {msandbox} (test) > select 1 where 2 between 0 and 3; -- TiDB: error 1064; MySQL: 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where 2 between 0 and 3' at line 1

@ghost ghost added type/compatibility component/parser and removed type/bug The issue is confirmed as a bug. sig/execution SIG execution labels Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants