Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5.36, 10.0.9
-
None
-
None
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.