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

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

            ycp Yuchen Pei created issue -
            ycp Yuchen Pei made changes -
            Field Original Value New Value
            ycp Yuchen Pei made changes -
            Assignee Yuchen Pei [ JIRAUSER52627 ]
            ycp Yuchen Pei made changes -
            ycp Yuchen Pei made changes -
            ycp Yuchen Pei made changes -
            Affects Version/s 11.1 [ 28549 ]
            ycp Yuchen Pei made changes -
            Fix Version/s 10.5 [ 23123 ]
            ycp Yuchen Pei made changes -
            ycp Yuchen Pei made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            ycp Yuchen Pei made changes -
            Assignee Yuchen Pei [ JIRAUSER52627 ] Dmitry Shulga [ JIRAUSER47315 ]
            Status Confirmed [ 10101 ] In Review [ 10002 ]
            shulga Dmitry Shulga made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            ycp Yuchen Pei made changes -
            Fix Version/s 10.5.27 [ 29902 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            JIraAutomate JiraAutomate made changes -
            Fix Version/s 10.6.20 [ 29903 ]
            Fix Version/s 10.11.10 [ 29904 ]
            Fix Version/s 11.2.6 [ 29906 ]
            Fix Version/s 11.4.4 [ 29907 ]
            serg Sergei Golubchik made changes -
            Assignee Dmitry Shulga [ JIRAUSER47315 ] Yuchen Pei [ JIRAUSER52627 ]

            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.