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

Hybrid functions do not add CURRENT_DATE when converting TIME to DATETIME

    XMLWordPrintable

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

            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.