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

      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

            Assignee:
            igor Igor Babaev
            Reporter:
            igor Igor Babaev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: