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

Protocol assertion fails or server hangs upon query using temporary table

    XMLWordPrintable

Details

    Description

      --source include/have_sequence.inc
       
      SET max_heap_table_size = 16*1024*1024;
       
      CREATE TABLE t (a VARCHAR(3000));
      INSERT INTO t SELECT 'foo' FROM seq_1_to_800;
       
      SELECT PERCENTILE_DISC(1) WITHIN GROUP (ORDER BY a) OVER () FROM t;
       
      DROP TABLE t;
      

      fff90c9aed9cf92eae2666bda7a22e3f20389f57 debug

      mariadbd: /data/bld/testing/bb-blob-main-monty-gcov/sql/protocol.cc:639: void Protocol::end_statement(): Assertion `0' failed.
      260714 19:44:09 [ERROR] /share8t/bld/testing/bb-blob-main-monty-gcov/sql/mariadbd got signal 6 ;
       
      #8  0x00007fc6e2444395 in __assert_fail_base (fmt=0x7fc6e25b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5634de18aab5 "0", file=file@entry=0x5634de18a670 "/data/bld/testing/bb-blob-main-monty-gcov/sql/protocol.cc", line=line@entry=639, function=function@entry=0x5634de18aa50 "void Protocol::end_statement()") at ./assert/assert.c:94
      #9  0x00007fc6e2452ec2 in __GI___assert_fail (assertion=0x5634de18aab5 "0", file=0x5634de18a670 "/data/bld/testing/bb-blob-main-monty-gcov/sql/protocol.cc", line=639, function=0x5634de18aa50 "void Protocol::end_statement()") at ./assert/assert.c:103
      #10 0x00005634dbf33647 in Protocol::end_statement (this=0x7fc6c40014b0) at /data/bld/testing/bb-blob-main-monty-gcov/sql/protocol.cc:639
      #11 0x00005634dc221853 in dispatch_command (command=COM_QUERY, thd=0x7fc6c4000dd0, packet=0x7fc6c400c4e1 "", packet_length=66, blocking=true) at /data/bld/testing/bb-blob-main-monty-gcov/sql/sql_parse.cc:2453
      #12 0x00005634dc21a9e3 in do_command (thd=0x7fc6c4000dd0, blocking=true) at /data/bld/testing/bb-blob-main-monty-gcov/sql/sql_parse.cc:1437
      #13 0x00005634dc6517b7 in do_handle_one_connection (connect=0x56350014e320, put_in_cache=true) at /data/bld/testing/bb-blob-main-monty-gcov/sql/sql_connect.cc:1503
      #14 0x00005634dc6512b5 in handle_one_connection (arg=0x563500130020) at /data/bld/testing/bb-blob-main-monty-gcov/sql/sql_connect.cc:1415
      #15 0x00005634dd1c4367 in pfs_spawn_thread (arg=0x563500072e00) at /data/bld/testing/bb-blob-main-monty-gcov/storage/perfschema/pfs.cc:2198
      #16 0x00007fc6e24a71f5 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #17 0x00007fc6e25278ec in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      On a non-debug server the query hangs seemingly forever – that is, it never returns, although apparently it gets stuck already after execution.

      Neither is reproducible on the baseline.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              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.