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

Item_equal still exists at JOIN::make_aggr_tables_info()

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • 10.4(EOL)
    • N/A
    • Optimizer
    • None

    Description

      According to [1], no Item_equal should exist at JOIN::make_aggr_tables_info().

      [1] https://mariadb.slack.com/archives/C021E77G7K2/p1710685372525459

      However, this is not the case during the execution select statement in the following test:

      10.4 d912a6369c6f7f8ba233ac88436d59f6e420c368

      CREATE TABLE `t1` (`c` INT(10) UNSIGNED NOT NULL, `b` VARCHAR(255) NOT NULL , PRIMARY KEY (`c`) USING BTREE ) ENGINE=MYISAM;
      CREATE TABLE `t2` (`a` INT(10) UNSIGNED NOT NULL, `c` INT(10) UNSIGNED NOT NULL ) ENGINE=MYISAM;
      INSERT INTO t1 VALUES(1,'oooo');
      INSERT INTO t2 VALUES(1,1);
      SELECT t2.a,t1.c FRoM t2 LEFT join t1 ON (t2.c = t1.c) WHERE t2.a = 1;
      drop table t1, t2;
      

      To see this, put a breakpoint at JOIN::make_aggr_tables_info(), and when it is hit, print the value of join_list->elem(0)->on_expr:

      (rr) p join_list->elem(0)->on_expr
      $4 = (Item_equal *) 0x52b000065fd8
      

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.