[MDEV-6099] Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND) Created: 2014-04-15  Updated: 2014-06-04  Resolved: 2014-06-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.36, 10.0.10
Fix Version/s: 5.5.38, 10.0.12

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: compat56

Issue Links:
Blocks
blocks MDEV-6001 Merge tests for MySQL WL#946 TIME/DAT... Stalled

 Description   

mysql> SELECT DATE_ADD('2001-01-01 10:20:30',INTERVAL 250000000000.0 SECOND) AS c1, DATE_ADD('2001-01-01 10:20:30',INTERVAL 2000000000000000000.0 SECOND) AS c2;
+---------------------+---------------------+
| c1                  | c2                  |
+---------------------+---------------------+
| 9923-03-10 22:47:10 | 2001-01-01 10:20:30 |
+---------------------+---------------------+

The result for c1 is correct.
The result for c2 is wrong. It should be NULL with a warning reporting overflow.



 Comments   
Comment by Alexander Barkov [ 2014-06-04 ]

Pushed into 5.3 and 5.5

Generated at Thu Feb 08 07:09:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.