Details
-
Type:
Task
-
Status: Closed
-
Priority:
Trivial
-
Resolution: Won't Fix
-
Fix Version/s: None
-
Component/s: None
-
Labels: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)
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
i read the last source of maria db, and date time have changed (it's not more six fields like in 5.2.5)
but please could anyone implement this implicit cast to string? it make mariadb drop-in replacement of mysql and backcompatible, like mariadb says in https://kb.askmonty.org/en/what-is-mariadb/
thanks guys