Details
-
Task
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
hi, continuing report at MDEV-390, just to make a port of mysql to mariadb easier
could we implement a sql_mode to convert datetime fields to string when running comparisions ?
for example:
select * from table where field<'2012-07-01 25:00:00'
today it don´t return, since 25:00:00 isn´t allowed and date is converted to 0000-00-00 00:00:00
the idea is rewrite this query to
select * from table where CAST(field AS CHAR)<'2012-07-01 25:00:00'
and the query runs nice like today mysql 5.5.25a
maybe sql_mode='COMPARE_DATETIME_AS_CHAR'
i don´t know if we will have problem with ORDER BY and GROUP BY, but maybe it should convert 'wrong' datetime values to string in this case too (if any return value isn´t a valid date/time)