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

LP:737474 - Wrong result with DAY(COALESCE(NULL)) in 5.1-micro

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Not repeatable in mysql-5.1

      DAY(NULL) is NULL and COALESCE(NULL) is NULL, so DAY(COALESCE(NULL)) should also be NULL. However, 5.1-micro returns 0 instead.

      MySQL [test]> select DAY(COALESCE(NULL));
      ---------------------

      DAY(COALESCE(NULL))

      ---------------------

      0

      ---------------------
      1 row in set (0.00 sec)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 737474

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 737474

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: