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

Assertion `global_status_var.global_memory_used == 0' failed when using window functions and views

Details

    Description

      The mtr test case is:

      --source include/have_udf.inc
      CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "udf_example.so";
      create table t1(a int , b int);
      insert into t1 values(100, 54), (200, 199);
      create view v1 as select myfunc_int(max(a) over (order by 1) , b) from t1;
      select * from v1;
      

      Warnings are generated on shutdown.

      Attachments

        Issue Links

          Activity

            A test case not involving UDF's

            create table t1 (id int, n1 int);
            insert into t1 values (1,1),(2,1),(3,2),(4,4);
            select max(n1) over (partition by 'abc') from t1;
            

            varun Varun Gupta (Inactive) added a comment - A test case not involving UDF's create table t1 (id int, n1 int); insert into t1 values (1,1),(2,1),(3,2),(4,4); select max(n1) over (partition by 'abc') from t1;

            Also check this test case, pointed by alice in MDEV-15837

            create table t1 (a int, b int);
            insert into t1 values (1,3), (2,2), (3,1), (1,3), (2,2), (3,1);
            select  lag(a) over (order by null desc), sum(a) over (order by null) from t1;
            

            varun Varun Gupta (Inactive) added a comment - Also check this test case, pointed by alice in MDEV-15837 create table t1 (a int, b int); insert into t1 values (1,3), (2,2), (3,1), (1,3), (2,2), (3,1); select lag(a) over (order by null desc), sum(a) over (order by null) from t1;

            The issue here is that we are not freeing the GROUP_BOUND_TRACKER for window functions, the group_bound_tracker is used mostly for partition by clause, also used by order by clause of window function
            for the case when we have RANK, DENSE_RANK etc.

            varun Varun Gupta (Inactive) added a comment - The issue here is that we are not freeing the GROUP_BOUND_TRACKER for window functions, the group_bound_tracker is used mostly for partition by clause, also used by order by clause of window function for the case when we have RANK, DENSE_RANK etc.
            varun Varun Gupta (Inactive) added a comment - Patch http://lists.askmonty.org/pipermail/commits/2019-May/013764.html

            Ok to push into 10.2

            igor Igor Babaev (Inactive) added a comment - Ok to push into 10.2

            People

              varun Varun Gupta (Inactive)
              varun Varun Gupta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.