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

assertion of (mem_root->flags & 4) == 0 fails in 2nd ps execution with partition pruning

    XMLWordPrintable

Details

    Description

      With WITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON the following leads to "alloc_root: Assertion `(mem_root->flags & 4) == 0' failed" in both 10.5 b304ec30308a86d87f29e509b988d3120b940f58 and 11.6 72ab8bc990c50d3d3bbd0bb71e536e304b567e40.

      --source include/have_partition.inc
       
      # 2nd ps mem leak; partition pruning
      set @var1=5;
      set @var2=4;
      create table t1 (a int) partition by list(a) (
        partition p0 values in (null,1,2),
        partition p1 values in (3,4)
      );
      create table t2 (a int);
      insert into t1 values (1),(2),(3),(4);
      insert into t2 values (4);
      PREPARE stmt FROM 'UPDATE t1 t1 SET a = (SELECT 1 FROM t2 WHERE a = t1.a) where a = ?';
      /* 1 */ execute stmt using @var1;
      select * from t1;
      /* 2 */ execute stmt using @var2;
      select * from t1;
      deallocate prepare stmt;
      drop table t1, t2;
      

      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.