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

*: ODBC-styled datetime literal cannot be used in the expressions. #25531

Closed
bb7133 opened this issue Jun 17, 2021 · 2 comments · Fixed by pingcap/parser#1253 or #25570
Closed

*: ODBC-styled datetime literal cannot be used in the expressions. #25531

bb7133 opened this issue Jun 17, 2021 · 2 comments · Fixed by pingcap/parser#1253 or #25570
Assignees
Labels
component/parser sig/sql-infra SIG: SQL Infra type/bug The issue is confirmed as a bug.

Comments

@bb7133
Copy link
Member

bb7133 commented Jun 17, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a datetime);
select * from t where a > {ts '2021-05-05 00:00:00.111'};

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

The query runs successfully.

3. What did you see instead (Required)

tidb> select * from t where a > {ts '2021-05-05 00:00:00.111'};
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 29 near "ts '00:00:00.111'}" 

4. What is your TiDB version? (Required)

The error can be reproduced in all existing versions of TiDB.

@bb7133 bb7133 added type/bug The issue is confirmed as a bug. sig/sql-infra SIG: SQL Infra component/parser labels Jun 17, 2021
@bb7133
Copy link
Member Author

bb7133 commented Jun 17, 2021

@ti-srebot
Copy link
Contributor

Please edit this comment or add a new comment to complete the following information

Not a bug

  1. Remove the 'type/bug' label
  2. Add notes to indicate why it is not a bug

Duplicate bug

  1. Add the 'type/duplicate' label
  2. Add the link to the original bug

Bug

Note: Make Sure that 'component', and 'severity' labels are added
Example for how to fill out the template: #20100

1. Root Cause Analysis (RCA) (optional)

2. Symptom (optional)

3. All Trigger Conditions (optional)

4. Workaround (optional)

5. Affected versions

6. Fixed versions

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