You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
DROP TABLE IF EXISTS t0;
CREATE TABLE IF NOT EXISTS t0(c0 NUMERIC); -- NUMERIC is default NUMERIC(10,0)
INSERT INTO t0 VALUES(1.0);
SELECT c0 FROM t0 WHERE t0.c0<10000000000; -- eleven 0
SHOW WARNINGS;
2. What did you expect to see? (Required)
A warning should not be generated, because the row value 1.0 is not out of range.
I want to know how this statement is evaluated.
Will the value 10000000000 firstly turn into a decimal and then compare with the column c0?
3. What did you see instead (Required)
mysql> SHOW WARNINGS;
+---------+------+--------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------+
| Warning | 1690 | DECIMAL value is out of range in '(10, 0)' |
+---------+------+--------------------------------------------+
1 row in set (0.00 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
DROP TABLE IF EXISTS t0;
CREATE TABLE IF NOT EXISTS t0(c0 NUMERIC); -- NUMERIC is default NUMERIC(10,0)
INSERT INTO t0 VALUES(1.0);
SELECT c0 FROM t0 WHERE t0.c0<10000000000; -- eleven 0
SHOW WARNINGS;
2. What did you expect to see? (Required)
A warning should not be generated, because the row value 1.0 is not out of range.
I want to know how this statement is evaluated.
Will the value 10000000000 firstly turn into a decimal and then compare with the column c0?
3. What did you see instead (Required)
mysql> SHOW WARNINGS;
+---------+------+--------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------+
| Warning | 1690 | DECIMAL value is out of range in '(10, 0)' |
+---------+------+--------------------------------------------+
1 row in set (0.00 sec)
4. What is your TiDB version? (Required)
mysql> SELECT tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v5.3.0
Edition: Community
Git Commit Hash: 4a1b2e9
Git Branch: heads/refs/tags/v5.3.0
UTC Build Time: 2021-11-24 13:32:39
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)
The text was updated successfully, but these errors were encountered: