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

Server crashes in handler::ha_index_or_rnd_end on recursive CTE

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (i INT);
      INSERT INTO t VALUES (1),(2);
       
      SET standard_compliant_cte=0;
       
      WITH RECURSIVE cte(f) AS (
        SELECT i FROM t
        UNION
        SELECT i FROM t WHERE i NOT IN ( SELECT * FROM cte )
      ) SELECT * FROM cte;
      

      10.2 54a995cd2206

      #3  <signal handler called>
      #4  0x00007fda71808daa in handler::ha_index_or_rnd_end (this=0x8f8f8f8f8f8f8f8f) at /data/src/10.2/sql/handler.h:2840
      #5  0x00007fda7189d6c5 in free_tmp_table (thd=0x7fda58000b00, entry=0x7fda58037118) at /data/src/10.2/sql/sql_select.cc:17771
      #6  0x00007fda717bced9 in close_thread_tables (thd=0x7fda58000b00) at /data/src/10.2/sql/sql_base.cc:784
      #7  0x00007fda7183954d in mysql_execute_command (thd=0x7fda58000b00) at /data/src/10.2/sql/sql_parse.cc:6255
      #8  0x00007fda7183dbf6 in mysql_parse (thd=0x7fda58000b00, rawbuf=0x7fda58012348 "WITH RECURSIVE cte(f) AS (\nSELECT i FROM t\nUNION\nSELECT i FROM t WHERE i NOT IN ( SELECT * FROM cte )\n) SELECT * FROM cte", length=121, parser_state=0x7fda6964a210, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7874
      #9  0x00007fda7182bcce in dispatch_command (command=COM_QUERY, thd=0x7fda58000b00, packet=0x7fda580087a1 "", packet_length=121, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1812
      #10 0x00007fda7182a63e in do_command (thd=0x7fda58000b00) at /data/src/10.2/sql/sql_parse.cc:1362
      #11 0x00007fda71974e05 in do_handle_one_connection (connect=0x7fda757ce260) at /data/src/10.2/sql/sql_connect.cc:1354
      #12 0x00007fda71974b92 in handle_one_connection (arg=0x7fda757ce260) at /data/src/10.2/sql/sql_connect.cc:1260
      #13 0x00007fda71d8deb8 in pfs_spawn_thread (arg=0x7fda757a8b10) at /data/src/10.2/storage/perfschema/pfs.cc:1862
      #14 0x00007fda70e50064 in start_thread (arg=0x7fda6964b700) at pthread_create.c:309
      #15 0x00007fda6f24062d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Activity

          People

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