Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-391

INVALID DATES - allow invalid dates comparision (like mysql 5.5.25a)

    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

            Hide
            rspadim roberto spadim added a comment -

            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

            Show
            rspadim roberto spadim added a comment - 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
            Hide
            rspadim roberto spadim added a comment -

            hi guys, could change to won't fix?

            Show
            rspadim roberto spadim added a comment - hi guys, could change to won't fix?

              People

              • Assignee:
                Unassigned
                Reporter:
                rspadim roberto spadim
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: