[MDEV-17817] Regression: new warning in FROM_UNIXTIME(2147483648) Created: 2018-11-23  Updated: 2018-11-23

Status: Open
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.4
Fix Version/s: 10.4

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Unresolved Votes: 0
Labels: None


 Description   

In 10.3, FROM_UNIXTIMESTAMP(value_greater_than_2147483647) returns NULL without a warning:

SELECT FROM_UNIXTIME(2147483648);

+---------------------------+
| FROM_UNIXTIME(2147483648) |
+---------------------------+
| NULL                      |
+---------------------------+
1 row in set (0.00 sec)

In 10.4 the same query returns NULL with a new warning:

+---------------------------+
| FROM_UNIXTIME(2147483648) |
+---------------------------+
| NULL                      |
+---------------------------+
1 row in set, 1 warning (0.00 sec)

SHOW WARNINGS;

+---------+------+--------------------------------------------------+
| Level   | Code | Message                                          |
+---------+------+--------------------------------------------------+
| Warning | 1292 | Truncated incorrect unixtime value: '2147483648' |
+---------+------+--------------------------------------------------+

This change was unintentional. In strict mode in can reject INSERTs which previously inserted NULL silently.

We need to decide if it's good or bad and add tests.


Generated at Thu Feb 08 08:39:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.