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

Test from subselect.test fails with statement memory protection

    XMLWordPrintable

Details

    Description

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

      CREATE TABLE t1 ( f1 int) ;
      INSERT INTO t1 VALUES (2),(3);
      CREATE TABLE t2 (f2 int) ;
      INSERT INTO t2 VALUES (2),(3);
      PREPARE st1 FROM '
      SELECT * FROM t2
      WHERE f2 <= SOME ( SELECT f1 FROM t1 );
      ';
      EXECUTE st1;
      EXECUTE st1;
      

      The test case fails with the assertion abort that points to re-allocation of ref_pointer_array in the function setup_ref_array() that happens at the second execution of the prepared statement.
      This does not cause any leak of the statement memory because this reallocation may happen only once. Yet it would be better if such reallocation is avoided in order not to cause aborts with -DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON

      Attachments

        Activity

          People

            igor Igor Babaev
            igor Igor Babaev
            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.