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

Crash when query uses recursive reference to CTE in ORDER BY clause

    XMLWordPrintable

Details

    Description

      The following query leads to an assertion abort:

      WITH RECURSIVE x (a) AS
       ( 
         SELECT 1
         UNION 
         SELECT (SELECT 1 AS a UNION SELECT 1 ORDER BY (SELECT 1 FROM x) ) FROM x
       )
       SELECT a FROM x;
      

      In 10.4 the abort happens in handler::ha_rnd_next():

      int handler::ha_rnd_next(uchar*): Assertion `inited == RND' failed.
      

      in 10.5 the abort happens in handler::start_psi_batch_mode().

      The above test case is a simplification of the test case for MDEV-29070.

      Attachments

        Issue Links

          Activity

            People

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