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

Failure when executing PS for query using IN subquery

    XMLWordPrintable

Details

    Description

      The following test case fails if the server is built with -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON

      CREATE TABLE t1 (a varchar(10)) ENGINE=MYISAM;
      CREATE TABLE t2 (b varchar(10) CHARACTER SET utf8) ENGINE=MYISAM;
      INSERT INTO t1 VALUES ('b');
      INSERT INTO t2 VALUES ('b');
      PREPARE stmt FROM 
      "SELECT STRAIGHT_JOIN  t1.a FROM t1 WHERE t1.a IN (SELECT t2.b FROM t2)";
      EXECUTE stmt;
      EXECUTE stmt;
      DEALLOCATE PREPARE stmt;
      DROP TABLE t1,t2;
      

      An assertion failure happens when trying to allocate an Item_direct_ref_to_item at the second execution of the PS.

      Attachments

        Issue Links

          Activity

            People

              igor Igor Babaev
              igor Igor Babaev
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.