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

Inconsistent query result caused by index

Details

    Description

      I run the following cases, which are expected to return the same query result.

      -- case 1
      CREATE TABLE t1 (c1 TEXT) ENGINE=InnoDB;
      INSERT INTO t1 (c1) VALUES ('a');
      SELECT c1 FROM t1 WHERE CAST(c1 AS BINARY(7)) NOT IN (SELECT c1 FROM t1); -- {a}
      

      -- case 2
      CREATE TABLE t1 (c1 TEXT, UNIQUE (c1(1))) ENGINE=InnoDB;
      INSERT INTO t1 (c1) VALUES ('a');
      SELECT c1 FROM t1 WHERE CAST(c1 AS BINARY(7)) NOT IN (SELECT c1 FROM t1); -- actual: {}, expected: {a}
      

      Attachments

        Activity

          Transition Time In Source Status Execution Times
          Alice Sherepa made transition -
          Open Confirmed
          2d 9h 24m 1

          People

            psergei Sergei Petrunia
            John Jove John Jove
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.