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

Memory leak with recursive CTE that uses global ORDER BY with recursive subquery

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2(EOL), 10.3(EOL)
    • 10.2.16
    • Optimizer - CTE
    • None

    Description

      The following test case run in mtr

      SET @@max_recursive_iterations = 2;
       
      WITH RECURSIVE qn AS (
      SELECT 1 FROM dual UNION ALL
      SELECT 1 FROM qn
      ORDER BY (SELECT * FROM qn))
      SELECT count(*) FROM qn;
      

      causes memory leak in the server:

      mysqld: /home/igor/maria-git/10.2-test/sql/sql_class.cc:1647: virtual THD::~THD(): Assertion `status_var.local_memory_used == 0 || !debug_assert_on_not_freed_memory' failed.
      

      Attachments

        Activity

          People

            igor Igor Babaev
            igor Igor Babaev
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.