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

      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

          Activity

            People

            Assignee:
            bar Alexander Barkov
            Reporter:
            eimix Eimantas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: