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

LP:738096 - DATEDIFF with a 0000-00-00 argument produces different result in 5.1-micro

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      The following expression:

      SELECT DATEDIFF( '2004-08-07' , DATE ( '0000-00-00 00:00:00'));

      returns NULL in 5.1-micro and 732165 in mysql-5.1

      In this case it seems safer and backward compatible to allow people to use the 0000-00-00 date in datediff calculations. It is plausible that such an expression can occur in a real life query.

      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.