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

Wrong result for SELECT..WHERE LENGTH(double_column)!=6 AND double_column=100e0

    Details

      Description

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a DOUBLE(9,2));
      INSERT INTO t1 VALUES (100);
      SELECT * FROM t1 WHERE LENGTH(a)!=6;
      SELECT * FROM t1 WHERE LENGTH(a)!=6 AND a=100e0;
      

      The first SELECT query correctly returns no rows, the second SELECT query erroneously returns one row.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              bar Alexander Barkov added a comment - - edited

              Repeatable in MySQL-5.7.8

              Show
              bar Alexander Barkov added a comment - - edited Repeatable in MySQL-5.7.8

                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: