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

Wrong results with optimize_join_buffer_size=on

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Cannot Reproduce
    • 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL)
    • N/A
    • Optimizer
    • None

    Description

      MariaDB [test]> SELECT t3.v1
          -> FROM t3 LEFT JOIN t4 LEFT JOIN t2 JOIN t1 
          ->   ON t2.pk = t1.pk ON t4.i1 = t1.i1 ON t3.pk = t4.i1
          -> WHERE t1.v2  BETWEEN 'b' AND 'z'
          ->   OR t1.v2 > 'd' AND t1.v2 < 'z' OR t4.v3 > 'c' AND t4.v3 < 'z';
      Empty set (0.00 sec)
       
      MariaDB [test]> set optimizer_switch = "optimize_join_buffer_size=on";
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> SELECT t3.v1
          -> FROM t3 LEFT JOIN t4 LEFT JOIN t2 JOIN t1 
          ->   ON t2.pk = t1.pk ON t4.i1 = t1.i1 ON t3.pk = t4.i1
          -> WHERE t1.v2  BETWEEN 'b' AND 'z'
          ->   OR t1.v2 > 'd' AND t1.v2 < 'z' OR t4.v3 > 'c' AND t4.v3 < 'z';
      +-------+
      | v1    |
      +-------+
      | OORGO |
      | z     |
      +-------+
      2 rows in set (0.00 sec)
      

      Test case is here.

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.