Details
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.
Gliffy Diagrams
Attachments
Issue Links
- relates to
-
MDEV-8806 Numeric CAST produce different warnings for strings literals vs functions
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions