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

Inconsistent behavior for INT and BIGINT when comparing with TIME value

    XMLWordPrintable

Details

    Description

      Run the following two cases.

      -- case 1
      CREATE TABLE t1 (c1 INT);
      INSERT INTO t1 VALUES (12080247);
      SELECT (c1 = (CAST(0 AS TIME))) FROM t1; -- {1}, expected: {0}
      

      -- case 2
      CREATE TABLE t1 (c1 BIGINT);
      INSERT INTO t1 VALUES (12080247);
      SELECT (c1 = (CAST(0 AS TIME))) FROM t1; -- {0}
      

      I think that case 2 is correct.

      Attachments

        Issue Links

          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.