Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL)
-
None
Description
DELIMITER $$
|
BEGIN NOT ATOMIC |
DECLARE a DECIMAL(30,0) DEFAULT 9223372036854775808; |
EXECUTE IMMEDIATE 'EXPLAIN EXTENDED SELECT 1 LIMIT ?' USING a; |
END; |
$$
|
DELIMITER ;
|
SHOW WARNINGS;
|
+---------+------+----------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+---------+------+----------------------------------------------------------------------------+
|
| Warning | 1916 | Got overflow when converting '9223372036854775808' to INT. Value truncated |
|
| Note | 1003 | select 1 AS `1` limit 9223372036854775807 |
|
+---------+------+----------------------------------------------------------------------------+
|
Notice, the value was truncated to the maximum signed integer. This looks wrong.
It should treat 9223372036854775808 as an unsigned value and preserve it in the LIMIT clause.
Attachments
Issue Links
- relates to
-
MDEV-14467 Item_param: replace {INT|DECIMAL|REAL|STRING|TIME}_VALUE with Type_handler
- Closed
-
MDEV-14498 PS: Wrong value for CAST(? AS DOUBLE) when using 9223372036854775808 as a parameter
- Open