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

Bad error message for numeric conversion #32744

Closed
sayJason opened this issue Mar 2, 2022 · 1 comment · Fixed by #34047
Closed

Bad error message for numeric conversion #32744

sayJason opened this issue Mar 2, 2022 · 1 comment · Fixed by #34047
Assignees
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) component/executor severity/moderate type/compatibility

Comments

@sayJason
Copy link

sayJason commented Mar 2, 2022

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

DROP TABLE IF EXISTS t0; 
CREATE TABLE t0 (c0 DECIMAL); 
INSERT INTO t0 VALUES (1);
SELECT * FROM t0 WHERE t0.c0 > 'a'; 
SHOW WARNINGS;

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

A specific type of error for external applications like MySQL.

+---------+------+----------------------------------------+
| Level   | Code | Message                                |
+---------+------+----------------------------------------+
| Warning | 1292 | Truncated incorrect DECIMAL value: 'a' |
+---------+------+----------------------------------------+
1 row in set (0.00 sec)

3. What did you see instead (Required)

+---------+------+------------+
| Level   | Code | Message    |
+---------+------+------------+
| Warning | 8029 | Bad Number |
+---------+------+------------+
1 row in set (0.00 sec)

4. What is your TiDB version? (Required)

+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()

                                                                       |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v5.4.0
Edition: Community
Git Commit Hash: 55f3b24c1c9f506bd652ef1d162283541e428872
Git Branch: heads/refs/tags/v5.4.0
UTC Build Time: 2022-01-25 08:39:26
GoVersion: go1.16.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@sayJason sayJason added the type/bug The issue is confirmed as a bug. label Mar 2, 2022
@fanrenhoo
Copy link
Contributor

/assign

@xhebox xhebox added type/compatibility compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) and removed type/bug The issue is confirmed as a bug. labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) component/executor severity/moderate type/compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants