Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL)
-
None
-
10.1.8-3
Description
This SQL script:
SELECT 'x' << 1, CAST('x' AS DOUBLE), CAST('x' AS DECIMAL);
|
SHOW WARNINGS;
|
returns the following warnings:
+---------+------+----------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------+
|
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' |
|
| Warning | 1292 | Truncated incorrect DOUBLE value: 'x' |
|
| Warning | 1292 | Truncated incorrect DECIMAL value: 'x' |
|
+---------+------+----------------------------------------+
|
Now if I use MAX:
SELECT MAX('x') << 1, CAST(MAX('x') AS DOUBLE), CAST(MAX('x') AS DECIMAL);
|
it returns no warnings.
Attachments
Issue Links
- relates to
-
MDEV-8806 Numeric CAST produce different warnings for strings literals vs functions
- Closed