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

DATE(IFNULL(XXX, 0)) is not returning same result with different XXX

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 5.5, 10.1, 10.2, 10.3, 10.4
    • N/A
    • Data types, Server
    • Any

    Description

      DATE(IFNULL(XXX, 0)) is not returning same result with different XXX

      mysql> SELECT DATE(0), DATE(IFNULL(NULL, 0)), DATE(IFNULL(DATE(NULL), 0)), DATE(NULL);
      +------------+-----------------------+-----------------------------+------------+
      | DATE(0)    | DATE(IFNULL(NULL, 0)) | DATE(IFNULL(DATE(NULL), 0)) | DATE(NULL) |
      +------------+-----------------------+-----------------------------+------------+
      | 0000-00-00 | 0000-00-00            | NULL                        | NULL       |
      +------------+-----------------------+-----------------------------+------------+
      

      3rd column DATE(IFNULL(DATE(NULL), 0)) expected to be 0000-00-00

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              eimix Eimantas
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.