Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.10.7, 10.11.6
-
None
-
Linux (Debian) - MacOS (brew)
Description
Hi,
I use DATE_SUB function to compute "age" of person.
When I use the follow on Mariadb 10.11.6 :
select DATE_SUB("2023-08-11 12:00:00", INTERVAL TO_DAYS("2022-01-01 12:00:00") DAY)
The result is OK :
0001-08-10 12:00:00
When I try on same Mariadb server with :
select DATE_SUB("2023-08-11 12:00:00", INTERVAL TO_DAYS("2023-01-01 12:00:00") DAY)
The result is WRONG (in my opinion):
NULL
On server Mysql 5.7.9, 8.0 ,
the result for "select DATE_SUB("2023-08-11 12:00:00", INTERVAL TO_DAYS("2023-01-01 12:00:00") DAY)" is :
0000-00-00 12:00:00
Can you investigate on this potential bug ?
Thank you !
Eric