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

LP:738069 - Comparisons between datetime and time work differently in 5.1-micro

    XMLWordPrintable

Details

    Description

      I am filing this bug so that this issue remains on the radar and a decision of some sort is made.

      As described by Monty:

      In the microsecond patch, the only 'discussable convert' I know of is when you
      compare a time value with a datetime value. In MySQL the
      following where equal:

      select cast('2001-01-02 00:00:01' as time) = cast("00:00:01" as time);
      =>
      select '00:00:01' = "00:00:01;
      =>
      true

      In other words, when comparing a datetime with a time we only compared
      the time part.

      However after Serg's change the above is done:

      select cast('2001-01-02 00:00:01' as time) = cast("00:00:01" as time);
      =>
      select ''2001-01-02 00:00:01' = "0000-00-00 00:00:01"
      =>
      false

      The above worries me becasue someone could depend on this. My
      suggestion was to either do the compare as before or give an error. An
      error is in my opinion better as the applicaiton will notice this much
      easier than a 'different result'.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.