Details
Description
Run this SQL script:
SELECT COALESCE(9223372036854775808, 1); SHOW WARNINGS;
The results are:
+----------------------------------+ | COALESCE(9223372036854775808, 1) | +----------------------------------+ | 9223372036854775807 | +----------------------------------+ 1 row in set, 1 warning (0.00 sec) +---------+------+-----------------------------------------------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------------------------------------------+ | Warning | 1916 | Got overflow when converting '9223372036854775808' to INT. Value truncated. | +---------+------+-----------------------------------------------------------------------------+ 1 row in set (0.00 set
This is wrong. The expected result is 9223372036854775808 with no warnings.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions