Comments - Datetime behavior in MariaDB vs MySQL
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
One of the issues listed on the compatibility page is that MariaDB performs stricter checking of date, datetime and timestamp values. If you look at the warnings with
SHOW WARNINGS
(with an S) you'll see different warnings on the insert as well.Thanks for the reply Ian.
I saw this: "MariaDB performs stricter checking of date, datetime and timestamp values."
But if MariaDB is stricter why is it returning a zero date record with the warning while MySQL is returning an empty set and only warnings? I assume this is deliberate behavior and not due to any setting.
Thanks
MariaDB considers all badly formatted strings as '0000-00-00 00:00:00' for comparison purposes. Current versions of MySQL are inconsistent, in that they handle constants one way, and non-constants another way.
Consider the following example from MySQL, with confusing results: