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

Wrong result for SELECT..WHERE LENGTH(decimal_10_1_column)!=3 AND decimal_10_1_column=1.10

    Details

      Description

      In this script:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DECIMAL(10,1));
      INSERT INTO t1 VALUES (1.1);
      SELECT * FROM t1 WHERE LENGTH(a)!=3;
      SELECT * FROM t1 WHERE LENGTH(a)!=3 AND a=1.10;

      The first SELECT query correctly returns empty set, and the second SELECT query erroneously returns one row.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                bar Alexander Barkov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: