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

Assertion `0' in Protocol::end_statement upon insert into Aria table with disabled keys and low sort_buffer_size

    XMLWordPrintable

Details

    Description

      This is a debug assertion on an old server version, triggered by a corner case, so I don't expect it to be fixed, but still need it to be filed for the purpose of test maintenance.

      CREATE TABLE t (a CHAR(255), KEY(a)) ENGINE=Aria CHARACTER SET eucjpms;
      INSERT INTO t VALUES
       (''),(''),(''),(''),(''),(''),(''),(''),
       (''),(''),(''),(''),(''),(''),(''),('');
      SET SESSION ARIA_SORT_BUFFER_SIZE= 4096;
      ALTER TABLE t DISABLE KEYS;
      INSERT INTO t (f) SELECT 1;
       
      # Cleanup
      DROP TABLE t;
      

      10.3 efdbb3cf

      2022-07-01  1:01:36 4 [Warning] Warning: Enabling keys got errno 12 on test.t, retrying
      mysqld: /data/src/10.3/sql/protocol.cc:601: void Protocol::end_statement(): Assertion `0' failed.
      220701  1:01:36 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f23ebef9662 in __GI___assert_fail (assertion=0x55fd9cef32a0 "0", file=0x55fd9cef2e98 "/data/src/10.3/sql/protocol.cc", line=601, function=0x55fd9cef3248 "void Protocol::end_statement()") at assert.c:101
      No locals.
      #8  0x000055fd9c1cc0d1 in Protocol::end_statement (this=0x7f23d4001368) at /data/src/10.3/sql/protocol.cc:601
              __PRETTY_FUNCTION__ = "void Protocol::end_statement()"
              _db_stack_frame_ = {func = 0x55fd9cf1db32 "dispatch_command", file = 0x55fd9cf1d6a8 "/data/src/10.3/sql/sql_parse.cc", level = 2147483651, line = -1, prev = 0x7f23e5f20590}
              error = false
      #9  0x000055fd9c2e164f in dispatch_command (command=COM_QUERY, thd=0x7f23d4000d90, packet=0x7f23d4008f31 "INSERT INTO t (f) SELECT 1", packet_length=26, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:2410
              net = 0x7f23d4001098
              error = false
              do_end_of_statement = true
              _db_stack_frame_ = {func = 0x55fd9cf1d8bd "do_command", file = 0x55fd9cf1d6a8 "/data/src/10.3/sql/sql_parse.cc", level = 2147483650, line = -1, prev = 0x7f23e5f20df0}
              drop_more_results = false
              __PRETTY_FUNCTION__ = "bool dispatch_command(enum_server_command, THD*, char*, uint, bool, bool)"
              res = <optimized out>
      #10 0x000055fd9c2de28f in do_command (thd=0x7f23d4000d90) at /data/src/10.3/sql/sql_parse.cc:1398
              return_value = false
              packet = 0x7f23d4008f30 "\003INSERT INTO t (f) SELECT 1"
              packet_length = 27
              net = 0x7f23d4001098
              command = COM_QUERY
              _db_stack_frame_ = {func = 0x55fd9d29f850 "?func", file = 0x55fd9d29f856 "?file", level = 2147483649, line = -1, prev = 0x0}
              __PRETTY_FUNCTION__ = "bool do_command(THD*)"
      #11 0x000055fd9c45b8e4 in do_handle_one_connection (connect=0x55fda0348170) at /data/src/10.3/sql/sql_connect.cc:1403
              create_user = true
              thr_create_utime = 3048608255698
              thd = 0x7f23d4000d90
      #12 0x000055fd9c45b64f in handle_one_connection (arg=0x55fda0348170) at /data/src/10.3/sql/sql_connect.cc:1308
              connect = 0x55fda0348170
      #13 0x000055fd9ce0ab54 in pfs_spawn_thread (arg=0x55fda0448a40) at /data/src/10.3/storage/perfschema/pfs.cc:1869
              typed_arg = 0x55fda0448a40
              user_arg = 0x55fda0348170
              user_start_routine = 0x55fd9c45b61f <handle_one_connection(void*)>
              pfs = 0x7f23ea1f06c0
              klass = 0x55fda013b280
      #14 0x00007f23ec092ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
              ret = <optimized out>
              pd = <optimized out>
              unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139792158430976, 30266914470759245, 140732324975486, 140732324975487, 139792158429120, 311296, -131646188482327731, -131625236584985779}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
              not_first_call = 0
      #15 0x00007f23ebfc2def in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Not reproducible on 10.4+.

      Attachments

        Activity

          People

            Unassigned Unassigned
            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.