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

Unexpected Results by join_cache_hashed

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4.31, 10.6.15, 10.11.5, 11.1.2, 11.2.2
    • 10.5, 10.6, 10.11
    • Optimizer
    • None
    • docker run -it -p 3307:3306 -e MARIADB_ROOT_PASSWORD=root mariadb:latest

    Description

      The same query returns different results under different configurations of join_cache_hashed.

      CREATE TABLE t0(c0 CHAR(100) PRIMARY KEY);
      CREATE TABLE t1(c0 CHAR(100) PRIMARY KEY);
       
      INSERT INTO t1 VALUES ('');
      SET SESSION join_cache_level = 5;
      INSERT INTO t0 VALUES ('');
      SET SESSION sql_log_off = ON;
      SET SESSION autocommit = 1;
      INSERT INTO t1 VALUES ('\nd');
       
       
      SET SESSION optimizer_switch = 'join_cache_hashed=off';
      SELECT t1.c0 FROM t0 NATURAL JOIN t1 WHERE ('\n' RLIKE t1.c0); -- {NULL}
      SET SESSION optimizer_switch = 'join_cache_hashed=on';
      SELECT t1.c0 FROM t0 NATURAL JOIN t1 WHERE ('\n' RLIKE t1.c0); -- {}
      

      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.