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

Hybrid functions do not add CURRENT_DATE when converting TIME to DATETIME

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.10
    • 10.0.12
    • None

    Description

      Hybrid functions IF, IFNULL,CASE,COALESCE do not add
      CURRENT_TIME when converting TIME to DATETIME:

      mysql> SELECT IF(1,TIME'10:10:10',DATE'2001-01-01');
      +---------------------------------------+
      | IF(1,TIME'10:10:10',DATE'2001-01-01') |
      +---------------------------------------+
      | 0000-00-00 10:10:10                   |
      +---------------------------------------+
      1 row in set (0.01 sec)

      MySQL-5.6 correctly adds CURRENT_DATE:

      +---------------------------------------+
      | IF(1,TIME'10:10:10',DATE'2001-01-01') |
      +---------------------------------------+
      | 2014-04-15 10:10:10                   |
      +---------------------------------------+
      1 row in set (0.00 sec)

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            serg Sergei Golubchik made changes -
            Fix Version/s 10.0.11 [ 15200 ]
            bar Alexander Barkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 10.0.12 [ 15201 ]
            Fix Version/s 10.0.11 [ 15200 ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            bar Alexander Barkov made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow defaullt [ 38916 ] MariaDB v2 [ 43283 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 43283 ] MariaDB v3 [ 62371 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 62371 ] MariaDB v4 [ 147794 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              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.