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

Wrong result for SELECT..WHERE a IN ('a' COLLATE latin1_bin,'b') AND a='a'

    XMLWordPrintable

    Details

      Description

      SET NAMES latin1;
      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a VARCHAR(10));
      INSERT INTO t1 VALUES ('a'),('A');
      SELECT * FROM t1 WHERE a IN ('a' COLLATE latin1_bin,'b');
      SELECT * FROM t1 WHERE a IN ('a' COLLATE latin1_bin,'b') AND a='a';

      The first SELECT correctly returns one row.
      The second SELECT erroneously returns two rows. One row is expected.

      The problem happens in equal field propagation.

        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: