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

Different results using table or view when comparing values of time type

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.4(EOL)
    • 10.4.0
    • Temporal Types
    • None

    Description

      10.4, reproducible after commit f6a20205148853f4cd352a21de3b77f2372ad50d

      CREATE TABLE t1 (pk int, x1 time, x2 varchar(1));
      INSERT INTO t1 VALUES (17,'09:16:37','k'),(70,'19:44:22','k');
      CREATE VIEW v1 AS SELECT * FROM t1;
       
      SELECT pk FROM t1 WHERE x1 >x2;
      SELECT pk FROM v1 WHERE x1 >x2;
      

      MariaDB [test2]> SELECT pk FROM t1 WHERE x1 >x2;
      +------+
      | pk   |
      +------+
      |   17 |
      |   70 |
      +------+
      2 rows in set, 2 warnings (0.002 sec)
      Warning (Code 1292): Truncated incorrect time value: 'k'
      Warning (Code 1292): Truncated incorrect time value: 'k'
       
      MariaDB [test2]> SELECT pk FROM v1 WHERE x1 >x2;
      Empty set, 2 warnings (0.004 sec)
       
      Warning (Code 1292): Truncated incorrect time value: 'k'
      Warning (Code 1292): Truncated incorrect time value: 'k'
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              alice Alice Sherepa
              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.