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

Bad warning for DATE_ADD(timestamp_column, INTERVAL 10 SECOND)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.42, 10.0.17, 10.1.3
    • 10.1.4
    • Temporal Types
    • None

    Description

      This script:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a TIMESTAMP);
      INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
      SELECT DATE_ADD(a, INTERVAL 10 SECOND) FROM t1;
      SHOW WARNINGS;

      returns:

      +---------+------+----------------------------------------+
      | Level   | Code | Message                                |
      +---------+------+----------------------------------------+
      | Warning | 1292 | Incorrect datetime value: '0000-00-00' |
      +---------+------+----------------------------------------+

      The expected warning would be:

      Incorrect datetime value: '0000-00-00 00:00:00'

      Attachments

        Issue Links

          Activity

            People

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