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

Regression: new warning in FROM_UNIXTIME(2147483648)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4(EOL)
    • 10.4(EOL)
    • Data types
    • None

    Description

      In 10.3, FROM_UNIXTIMESTAMP(value_greater_than_2147483647) returns NULL without a warning:

      SELECT FROM_UNIXTIME(2147483648);
      

      +---------------------------+
      | FROM_UNIXTIME(2147483648) |
      +---------------------------+
      | NULL                      |
      +---------------------------+
      1 row in set (0.00 sec)
      

      In 10.4 the same query returns NULL with a new warning:

      +---------------------------+
      | FROM_UNIXTIME(2147483648) |
      +---------------------------+
      | NULL                      |
      +---------------------------+
      1 row in set, 1 warning (0.00 sec)
      

      SHOW WARNINGS;
      

      +---------+------+--------------------------------------------------+
      | Level   | Code | Message                                          |
      +---------+------+--------------------------------------------------+
      | Warning | 1292 | Truncated incorrect unixtime value: '2147483648' |
      +---------+------+--------------------------------------------------+
      

      This change was unintentional. In strict mode in can reject INSERTs which previously inserted NULL silently.

      We need to decide if it's good or bad and add tests.

      Attachments

        Activity

          People

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