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

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.