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

query filter with . report syntax error #46778

Open
aytrack opened this issue Sep 8, 2023 · 1 comment
Open

query filter with . report syntax error #46778

aytrack opened this issue Sep 8, 2023 · 1 comment
Assignees
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@aytrack
Copy link
Contributor

aytrack commented Sep 8, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a decimal(55,7));
select * from t where a = 1. ;
select * from t where a between 1. and 2;

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

all queries execute success.

3. What did you see instead (Required)

Introduced by #46314

[14:24:25]TiDB root:test> create table t(a decimal(55,7));
Query OK, 0 rows affected
Time: 0.014s
[14:24:34]TiDB root:test> select * from t where a = 1. ;
+---+
| a |
+---+
+---+
0 rows in set
Time: 0.008s
[14:24:43]TiDB root:test> select * from t where a between 1. and 2;
(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 38 near "and 2" ')

4. What is your TiDB version? (Required)

master(1769f3a)

@aytrack aytrack added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra severity/moderate labels Sep 8, 2023
@Defined2014
Copy link
Contributor

Defined2014 commented Sep 8, 2023

Add some behavior related with #35031 in MySQL

select * from t where t. status = 1; -- parse ok, unreserved keyword
select * from t where t. and = 1; -- parse failed, reserverd keyword.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity/moderate sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants