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

double to decimal type conversion error #47532

Closed
jebter opened this issue Oct 11, 2023 · 2 comments
Closed

double to decimal type conversion error #47532

jebter opened this issue Oct 11, 2023 · 2 comments
Labels
affects-7.4 duplicate Issues or pull requests already exists. severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@jebter
Copy link

jebter commented Oct 11, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE t (
COL1 set('a','b','ccc') DEFAULT NULL,
COL2 decimal(20,0) DEFAULT NULL,
COL3 timestamp NULL DEFAULT NULL,
KEY U_M_COL4 (COL1,COL2),
KEY U_M_COL5 (COL3,COL2)
)

select * from t where col2 <=> -32299374332806449915. and col1 is not null and col3 = "2030-10-30 6:39:35";

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

success

3. What did you see instead (Required)

(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 57 near "and col1 is not null and col3 = "2030-10-30 6:39:35"" ')

4. What is your TiDB version? (Required)

tidb_version() | Release Version: v7.4.0
Edition: Community
Git Commit Hash: 04ac200
Git Branch: heads/refs/tags/v7.4.0
UTC Build Time: 2023-10-09 09:17:37
GoVersion: go1.21.1
Race Enabled: false
Check Table Before Drop: false
Store: tikv

@jebter jebter added type/bug The issue is confirmed as a bug. sig/execution SIG execution severity/major labels Oct 11, 2023
@ti-chi-bot ti-chi-bot bot added may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Oct 11, 2023
@jebter
Copy link
Author

jebter commented Oct 11, 2023

in 7.1.1 & 7.3.0
MySQL ....:test> CREATE TABLE t (
-> COL1 set('a','b','ccc') DEFAULT NULL,
-> COL2 decimal(20,0) DEFAULT NULL,
-> COL3 timestamp NULL DEFAULT NULL,
-> KEY U_M_COL4 (COL1,COL2),
-> KEY U_M_COL5 (COL3,COL2)
-> )
Query OK, 0 rows affected
Time: 0.231s
MySQL ...:test> select * from t where col2 <=> -32299374332806449915. and col1 is not null and col3 = "2030-10-30 6:39:35";
+------+------+------+
| COL1 | COL2 | COL3 |
+------+------+------+
0 rows in set
Time: 0.015s

@jebter jebter added affects-7.4 duplicate Issues or pull requests already exists. and removed may-affects-5.3 This bug maybe affects 5.3.x versions. may-affects-5.4 This bug maybe affects 5.4.x versions. may-affects-6.1 may-affects-6.5 may-affects-7.1 labels Oct 11, 2023
@jebter
Copy link
Author

jebter commented Oct 11, 2023

duplicate #46778

@jebter jebter closed this as completed Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-7.4 duplicate Issues or pull requests already exists. severity/major sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant