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

[db crash] Recursive CTE when SELECT includes new field

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.3.2
    • 10.3.3
    • Optimizer - CTE
    • None
    • Mac (10.12.6; 15″; 2017);
      brew install mariadb --devel;
      mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp

    Description

      Debugging my CTE, and accidentally crashed the server. Here's a minimal representative sample:

      rec_cte.sql

      CREATE TEMPORARY TABLE a_tbl (
        a VARCHAR(33) PRIMARY KEY,
        b VARCHAR(33)
      );
       
      INSERT INTO a_tbl VALUES
        ('block0', 'block0'),
        ('block1', NULL);
        
      WITH RECURSIVE Q0 AS (
        SELECT T0.a, T0.b, 5
        FROM a_tbl T0
        WHERE b IS NULL
        UNION ALL
        SELECT T1.a, T1.b
        FROM Q0
        JOIN a_tbl T1
        ON T1.a=Q0.a
      ) SELECT distinct(Q0.a), Q0.b
        FROM Q0;
      

      I've attached the database log.

      Attachments

        Activity

          People

            bar Alexander Barkov
            SamuelMarks Samuel Marks
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.