Doing this works fine:
SELECT * FROM table WHERE foo < '2021-01-09 00:00:00'
But this one:
SELECT * FROM table WHERE DATE_ADD('foo', INTERVAL 5 DAY) < '2021-01-09 00:00:00'
results in
Warning: #1292 Incorrect datetime value: 'foo'
What could possibly be causing this?
(MariaDB 10.4.17)
2021-01-09
is2020-12-40
.