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

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

    XMLWordPrintable

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)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.