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

Unexpected Results by table_elimination

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.5.22, 11.1.2
    • 10.5
    • Optimizer
    • docker run -it -p 3307:3306 -e MARIADB_ROOT_PASSWORD=root mariadb:latest

    Description

      The same query returns different results if changing table_elimination:

      CREATE TABLE t0(c0 FLOAT);
      CREATE TABLE t1(c0 FLOAT);
      INSERT INTO t0 VALUES (DEFAULT), (DEFAULT);
      INSERT INTO t1 VALUES (1);
      CREATE UNIQUE INDEX ic0 USING BTREE ON t0(c0 ASC);
       
      SELECT t1.c0 FROM t1 LEFT JOIN t0 ON (t0.c0 IS NULL); -- {1}
      SET SESSION optimizer_switch = 'table_elimination=off';
      SELECT t1.c0 FROM t1 LEFT JOIN t0 ON (t0.c0 IS NULL); -- {1}, {1}
      

      Attachments

        Activity

          People

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