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

LAST_DAY() is inconsistent regarding warnings

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5.36, 10.0.8
    • 5.5(EOL)
    • None
    • 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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.