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

ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in ma_blockrec.c

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5
    • 10.5.10
    • Server
    • None

    Description

      CREATE TABLE t1 (a BIT(5), c BINARY(179));
      INSERT INTO t1 VALUES (b'1100','foo'),(b'0','bar');
      SELECT c, GROUP_CONCAT(CASE NULL WHEN 0 THEN a END, CASE 'foo' WHEN c THEN 1 END) AS f FROM t1 GROUP BY ExtractValue('<a></a>', '/a'), UUID();
       
      # Cleanup
      DROP TABLE t1;
      

      10.5 7fb528d7 non-debug

      query 'SELECT c, GROUP_CONCAT(CASE NULL WHEN 0 THEN a END, CASE 'foo' WHEN c THEN 1 END) AS f FROM t1 GROUP BY ExtractValue('<a></a>', '/a'), UUID()' failed: 1194: Table '(temporary)' is marked as crashed and should be repaired
      

      2021-02-12 19:28:41 4 [ERROR] mariadbd: Table '(temporary)' is marked as crashed and should be repaired
      2021-02-12 19:28:41 4 [Warning] Sort aborted, host: localhost, user: root, thread: 4, query: SELECT c, GROUP_CONCAT(CASE NULL WHEN 0 THEN a END, CASE 'foo' WHEN c THEN 1 END) AS f FROM t1 GROUP BY ExtractValue('<a></a>', '/a'), UUID()
      

      10.5 7fb528d7 debug

      mariadbd: /data/src/10.5/storage/maria/ma_blockrec.c:2807: write_block_record: Assertion `length <= column->length' failed.
      210212 19:30:45 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f1d32c83f36 in __GI___assert_fail (assertion=0x56169440a07a "length <= column->length", file=0x561694409228 "/data/src/10.5/storage/maria/ma_blockrec.c", line=2807, function=0x56169440b7a0 <__PRETTY_FUNCTION__.19538> "write_block_record") at assert.c:101
      #8  0x0000561693a43212 in write_block_record (info=0x7f1d1c066b58, old_record=0x0, record=0x7f1d1c054d70 "\370&09ecdd49-6d58-11eb-9865-8cc681cdd877", row=0x7f1d1c066bd8, bitmap_blocks=0x7f1d1c066bd8, head_block_is_read=0 '\000', row_pos=0x7f1d2d63d0d0, undo_lsn=1, old_record_checksum=0) at /data/src/10.5/storage/maria/ma_blockrec.c:2807
      #9  0x0000561693a45688 in allocate_and_write_block_record (info=0x7f1d1c066b58, record=0x7f1d1c054d70 "\370&09ecdd49-6d58-11eb-9865-8cc681cdd877", row=0x7f1d1c066bd8, undo_lsn=1) at /data/src/10.5/storage/maria/ma_blockrec.c:3569
      #10 0x0000561693a457a2 in _ma_write_init_block_record (info=0x7f1d1c066b58, record=0x7f1d1c054d70 "\370&09ecdd49-6d58-11eb-9865-8cc681cdd877") at /data/src/10.5/storage/maria/ma_blockrec.c:3609
      #11 0x0000561693a58c84 in maria_write (info=0x7f1d1c066b58, record=0x7f1d1c054d70 "\370&09ecdd49-6d58-11eb-9865-8cc681cdd877") at /data/src/10.5/storage/maria/ma_write.c:157
      #12 0x00005616939d168b in ha_maria::write_row (this=0x7f1d1c054520, buf=0x7f1d1c054d70 "\370&09ecdd49-6d58-11eb-9865-8cc681cdd877") at /data/src/10.5/storage/maria/ha_maria.cc:1259
      #13 0x0000561693463cac in handler::ha_write_tmp_row (this=0x7f1d1c054520, buf=0x7f1d1c054d70 "\370&09ecdd49-6d58-11eb-9865-8cc681cdd877") at /data/src/10.5/sql/sql_class.h:7044
      #14 0x000056169344a6ee in end_write (join=0x7f1d1c016900, join_tab=0x7f1d1c018978, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:22123
      #15 0x000056169345d846 in AGGR_OP::put_record (this=0x7f1d1c019748, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:28917
      #16 0x0000561693464cf5 in AGGR_OP::put_record (this=0x7f1d1c019748) at /data/src/10.5/sql/sql_select.h:1050
      #17 0x00005616934463bd in sub_select_postjoin_aggr (join=0x7f1d1c016900, join_tab=0x7f1d1c018978, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:20404
      #18 0x00005616934470a3 in evaluate_join_record (join=0x7f1d1c016900, join_tab=0x7f1d1c0185d0, error=0) at /data/src/10.5/sql/sql_select.cc:20911
      #19 0x000056169344695a in sub_select (join=0x7f1d1c016900, join_tab=0x7f1d1c0185d0, end_of_records=false) at /data/src/10.5/sql/sql_select.cc:20688
      #20 0x0000561693445df0 in do_select (join=0x7f1d1c016900, procedure=0x0) at /data/src/10.5/sql/sql_select.cc:20222
      #21 0x000056169341978c in JOIN::exec_inner (this=0x7f1d1c016900) at /data/src/10.5/sql/sql_select.cc:4466
      #22 0x00005616934188ad in JOIN::exec (this=0x7f1d1c016900) at /data/src/10.5/sql/sql_select.cc:4246
      #23 0x000056169341a0e1 in mysql_select (thd=0x7f1d1c000db8, tables=0x7f1d1c015470, fields=..., conds=0x0, og_num=2, order=0x0, group=0x7f1d1c015e60, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f1d1c0168d8, unit=0x7f1d1c004f60, select_lex=0x7f1d1c0140b8) at /data/src/10.5/sql/sql_select.cc:4719
      #24 0x0000561693409b5f in handle_select (thd=0x7f1d1c000db8, lex=0x7f1d1c004e98, result=0x7f1d1c0168d8, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:417
      #25 0x00005616933cc535 in execute_sqlcom_select (thd=0x7f1d1c000db8, all_tables=0x7f1d1c015470) at /data/src/10.5/sql/sql_parse.cc:6281
      #26 0x00005616933c35bf in mysql_execute_command (thd=0x7f1d1c000db8) at /data/src/10.5/sql/sql_parse.cc:3977
      #27 0x00005616933d13dc in mysql_parse (thd=0x7f1d1c000db8, rawbuf=0x7f1d1c013f40 "SELECT c, GROUP_CONCAT(CASE NULL WHEN 0 THEN a END, CASE 'foo' WHEN c THEN 1 END) AS f FROM t1 GROUP BY ExtractValue('<a></a>', '/a'), UUID()", length=141, parser_state=0x7f1d2d63e510, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8062
      #28 0x00005616933bd35f in dispatch_command (command=COM_QUERY, thd=0x7f1d1c000db8, packet=0x7f1d1c0090b9 "", packet_length=141, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1889
      #29 0x00005616933bbb53 in do_command (thd=0x7f1d1c000db8) at /data/src/10.5/sql/sql_parse.cc:1370
      #30 0x00005616935699d5 in do_handle_one_connection (connect=0x5616977eb678, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1410
      #31 0x0000561693569738 in handle_one_connection (arg=0x5616977fd968) at /data/src/10.5/sql/sql_connect.cc:1312
      #32 0x0000561693ac9715 in pfs_spawn_thread (arg=0x56169777e878) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #33 0x00007f1d3319b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #34 0x00007f1d32d6f293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Couldn't reproduce with the provided test case on 10.4.

      Attachments

        Activity

          People

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