|
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.
|