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

LAST_DAY() is inconsistent regarding warnings

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.36, 10.0.8
    • Fix Version/s: 10.0, 5.5
    • Component/s: None
    • Labels:
      None

      Description

      drop table if exists t1;
      create table t1 (a int);
      insert into t1 values (0);
      select last_day(a), last_day(0) from t1;
      +-------------+-------------+
      | last_day(a) | last_day(0) |
      +-------------+-------------+
      | NULL        | NULL        |
      +-------------+-------------+
      1 row in set, 1 warning (0.00 sec)
      
      show warnings;
      +---------+------+-------------------------------+
      | Level   | Code | Message                       |
      +---------+------+-------------------------------+
      | Warning | 1292 | Incorrect datetime value: '0' |
      +---------+------+-------------------------------+
      

      There is only one warning.
      Two warnings are expected.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: