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

Wrong result (missing rows) with materialization=off, semijoin=off

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.0, 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
    • 10.4, 10.5, 10.6
    • Optimizer

    Description

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (entityKey INT PRIMARY KEY) ENGINE=InnoDB;
      INSERT INTO t1 VALUES (1),(2),(3);
       
      CREATE TABLE t2 (entityKey INT, xhtmltext TEXT, FULLTEXT(xhtmltext)) ENGINE=InnoDB;
      INSERT INTO t2 VALUES (1,"silver"),(2,"gold"),(3,"gold");
       
      SET optimizer_switch='materialization=off,semijoin=off';
       
      SELECT t1.entityKey FROM t1 
      WHERE t1.entityKey IN (
        SELECT t2.entityKey FROM t2 
        WHERE MATCH (t2.xhtmltext) AGAINST ('gold')
      ) 
      ORDER BY t1.entityKey DESC;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      Actual result

      +-----------+
      | entityKey |
      +-----------+
      |         3 |
      +-----------+
      1 row in set (0.07 sec)
      

      Expected result

      +-----------+
      | entityKey |
      +-----------+
      |         3 |
      |         2 |
      +-----------+
      2 rows in set (0.09 sec)
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.