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

Window functions: support being in a subquery

Details

    • 10.2.0-9

    Description

      Current code assumes that window function computation is a once-in-a-query
      event. It creates Item and Cached_item objects, and allocates things on
      thd->mem_root.

      This task is separate the computations into

      • Stage #1: a part that is done once
      • Stage #2: a part that is re-run for every select re-execution.

      Also, all 'cursor' objects must be created at stage #1.

      Attachments

        Issue Links

          Activity

            Note: we free all that we allocate, so you don't get crashes when running window functions in a dependent subquery currently.

            You may get O(#subquery_executions) memory consumption, though.

            psergei Sergei Petrunia added a comment - Note: we free all that we allocate, so you don't get crashes when running window functions in a dependent subquery currently. You may get O(#subquery_executions) memory consumption, though.

            MDEV-10059 does some work regarding Task 1. Cursor creation is still part of the Window_func_runner::exec call, but it is separate from the computation algorithm. This can be easily refactored out now. We just need to figure out when we should do this.

            cvicentiu Vicențiu Ciorbaru added a comment - MDEV-10059 does some work regarding Task 1. Cursor creation is still part of the Window_func_runner::exec call, but it is separate from the computation algorithm. This can be easily refactored out now. We just need to figure out when we should do this.

            Automated message:
            ----------------------------
            Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.

            julien.fritsch Julien Fritsch added a comment - Automated message: ---------------------------- Since this issue has not been updated since 6 weeks, it's time to move it back to Stalled.

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.