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

Incorrect Join Execution When Controlling BKA and BKAH Join Algorithms

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.8.2, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
    • 10.4, 10.5, 10.6
    • Optimizer
    • None

    Description

      CREATE TABLE `t1` (
      `c0` bigint(20) DEFAULT NULL
      );
      INSERT INTO `t1` VALUES (1777060672), (-1998952811), (-1723924625), (-191675722), (-998119991), (2062393966);

      CREATE TABLE `t2` (
      `c0` double NOT NULL,
      `c1` varchar(100) NOT NULL,
      PRIMARY KEY (`c1`)
      );
      INSERT INTO `t2` VALUES (-926353679,'');

      CREATE TABLE `t3` (
      `c0` mediumint(9) NOT NULL,
      `c1` tinyint(1) NOT NULL
      );

      CREATE TABLE `t4` (
      `c0` double NOT NULL,
      `c1` varchar(100) NOT NULL,
      PRIMARY KEY (`c1`)
      );
      INSERT INTO `t4` VALUES (507649242,'{P6\'Kd'), (1245950477,' '), (-2053299370,'5fL');

      mysql> SELECT t3.c0 FROM t3 RIGHT OUTER JOIN t4 ON t3.c1 = t4.c1 JOIN t2 ON t2.c1 = t4.c1 CROSS JOIN t1;
      ------

      c0

      ------

      NULL
      NULL
      NULL
      NULL
      NULL
      NULL

      ------
      6 rows in set, 1 warning (0.00 sec)

      mysql> SET optimizer_switch='join_cache_bka=off';
      Query OK, 0 rows affected (0.00 sec)

      mysql> SELECT t3.c0 FROM t3 RIGHT OUTER JOIN t4 ON t3.c1 = t4.c1 JOIN t2 ON t2.c1 = t4.c1 CROSS JOIN t1;
      Empty set (0.00 sec)

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            sugar Xiu Tang
            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.