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

Inconsistent behaviors when casting into time

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.8.3
    • 11.8
    • Server
    • None

    Description

      An inconsistent result is returned when casting a truncate value into time.

      DROP TABLE t1;
      CREATE TABLE t1 (c1 CHAR(20));
      INSERT INTO t1 VALUES (9430886);
      SELECT (CAST(c1 AS TIME)) FROM t1; -- {NULL}
      

      DROP TABLE t1;
      CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED);
      INSERT INTO t1 VALUES (9430886);
      SELECT (CAST(c1 AS TIME)) FROM t1; -- actual: {838:59:59}, expected: {null}
      

      Attachments

        Activity

          People

            bar Alexander Barkov
            John Jove John Jove
            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.