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

Unexpected Results by join_cache_incremental

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4.31, 11.1.2
    • 11.1(EOL)
    • Optimizer
    • None

    Description

      The same query returns different results if changing the configuration join_cache_incremental:

      CREATE TABLE t0(c0 CHAR(100), c1 FLOAT UNIQUE);
      CREATE TABLE t1(c0 CHAR(100), c1 FLOAT UNIQUE);
      CREATE TABLE t2(c0 CHAR(100), c1 FLOAT UNIQUE);
      INSERT INTO t2 VALUES ('a', 1);
      INSERT INTO t1 VALUES ('b', 2);
      INSERT INTO t1 VALUES ('', 3);
      INSERT INTO t0 VALUES ('', 4);
      INSERT INTO t0 VALUES ('c', 5);
       
      SET SESSION optimizer_switch = 'join_cache_incremental=on';
      SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0); -- {3}, {3}
      SET SESSION optimizer_switch = 'join_cache_incremental=off';
      SELECT t1.c1 FROM t2 CROSS JOIN t1 ON TRUE RIGHT JOIN t0 ON t1.c0 IN (t1.c0 REGEXP t1.c0); -- {3}, {NULL}
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            bajinsheng Jinsheng Ba
            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.