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

LP:697557 - Wrong result with join_cache_level=3, BNLH join in maria-5.3-mwl128

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      After the most recent push to maria-5.3-mwl128, the following query:

      SELECT t1.f2 FROM t2 JOIN t1 ON t2.f1 = t1.f1;

      returns rows that do not match the ON condition.

      Explain:

      id select_type table type possible_keys key key_len ref rows Extra
      1 SIMPLE t2 index f1 f1 13 NULL 1 Using where; Using index
      1 SIMPLE t1 hash f1 f1 13 test.t2.f1 4 Using join buffer (flat, BNLH join)

      test case:

      SET SESSION SQL_MODE='NO_ENGINE_SUBSTITUTION';

      CREATE TABLE t1 ( f1 varchar(10) , f2 int(11) , KEY (f1)) ENGINE=PBXT;
      INSERT INTO t1 VALUES ('hgtofubnib',1),('GDOXZ',1492123648),('n',2),('fggxgalhgt',-2024407040);
      CREATE TABLE t2 ( f1 varchar(10) , f2 int(11) , KEY (f1)) ENGINE=PBXT;
      INSERT INTO t2 VALUES ('r',1);

      SET SESSION join_cache_level=3;

      SELECT t1.f2 FROM t2 JOIN t1 ON t2.f1 = t1.f1;

      This particular test case is for PBXT, but the issue has been observed with other storage engines as well.

      Attachments

        Activity

          People

            igor Igor Babaev
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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