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

DNAMES: Assertion `column_name->length < 255' failed on a column name with length 255 (precisely)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 10.0.0
    • Components: None
    • Labels:
      None
    • Sprint:

      Description

      254-symbol string works all right; 256 symbols throw an error; 255 symbols cause the assertion failure.

      5.5-dnames/mysys/ma_dyncol.c:223: put_header_entry_str: Assertion `column_name->length < 255' failed.
      [ERROR] mysqld got signal 6 ;
      
      #8  0xb74ba014 in __assert_fail () from /lib/libc.so.6
      #9  0x0889f34e in put_header_entry_str (hdr=0xad128ba8, column_key=0x971f280, value=0x971f240, offset=0)
          at mysys/ma_dyncol.c:223
      #10 0x088a0f45 in dynamic_new_column_store (str=0xad128c84, hdr=0xad128ba8, column_count=1,
          column_keys=0x971f280, values=0x971f240, new_str=1 '\001')
          at mysys/ma_dyncol.c:1330
      #11 0x088a11c0 in dynamic_column_create_many_internal_fmt (str=0xad128c84, column_count=1,
          column_keys=0x971f280, values=0x971f240, new_str=1 '\001', string_keys=1 '\001')
          at mysys/ma_dyncol.c:1413
      #12 0x088a1303 in dynamic_column_create_many_fmt (str=0xad128c84, column_count=1,
          column_keys=0x971f280 "\230\362q\t\377", values=0x971f240, names=1 '\001')
          at mysys/ma_dyncol.c:1487
      #13 0x0845251f in Item_func_dyncol_create::val_str (this=0x971ed48, str=0xad1290b4)
          at sql/item_strfunc.cc:4001
      #14 0x083eb321 in Item::send (this=0x971ed48, protocol=0x966f7b0, buffer=0xad1290b4)
          at sql/item.cc:6317
      #15 0x081aad13 in Protocol::send_result_set_row (this=0x966f7b0, row_items=0x9670e78)
          at sql/protocol.cc:900
      #16 0x08207a4e in select_send::send_data (this=0x971eeb8, items=...)
          at sql/sql_class.cc:2275
      #17 0x0826d5cb in JOIN::exec (this=0x971eec8) at sql/sql_select.cc:2229
      #18 0x0826ff66 in mysql_select (thd=0x966f350, rref_pointer_array=0x9670f20, tables=0x0, wild_num=0,
          fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0,
          select_options=2147748608, result=0x971eeb8, unit=0x9670930, select_lex=0x9670de0)
          at sql/sql_select.cc:3050
      #19 0x08267932 in handle_select (thd=0x966f350, lex=0x96708cc, result=0x971eeb8, setup_tables_done_option=0)
          at sql/sql_select.cc:313
      #20 0x08243498 in execute_sqlcom_select (thd=0x966f350, all_tables=0x0)
          at sql/sql_parse.cc:4621
      #21 0x0823c432 in mysql_execute_command (thd=0x966f350) at sql/sql_parse.cc:2189
      #22 0x08245a89 in mysql_parse (thd=0x966f350, rawbuf=0x971ea48 "SELECT COLUMN_CREATE(REPEAT('a',255),1)",
          length=39, parser_state=0xad129da4) at sql/sql_parse.cc:5736
      #23 0x08239ed4 in dispatch_command (command=COM_QUERY, thd=0x966f350, packet=0x9718d19 "", packet_length=39)
          at sql/sql_parse.cc:1055
      #24 0x08239399 in do_command (thd=0x966f350) at sql/sql_parse.cc:794
      #25 0x08325471 in do_handle_one_connection (thd_arg=0x966f350)
          at sql/sql_connect.cc:1253
      #26 0x08324fbc in handle_one_connection (arg=0x966f350) at sql/sql_connect.cc:1168
      #27 0x0854fd1b in pfs_spawn_thread (arg=0x9774450) at storage/perfschema/pfs.cc:1015
      #28 0xb779ab25 in start_thread () from /lib/libpthread.so.0
      #29 0xb756938e in clone () from /lib/libc.so.6
      
      Some pointers may be invalid and cause the dump to abort.
      Query (0x971ea48): SELECT COLUMN_CREATE(REPEAT('a',255),1)
      Connection ID (thread ID): 2
      Status: NOT_KILLED
      
      bzr version-info
      revision-id: sanja@askmonty.org-20120823152900-3ngz79t2yvtq28f6
      date: 2012-08-23 18:29:00 +0300
      build-date: 2012-08-26 05:49:12 +0400
      revno: 3496
      

      Test case:

      SELECT COLUMN_CREATE(REPEAT('a',255),1);
      

      Note: REPEAT function is not needed, it's just more convenient in a test case than a 255-character-long string.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                sanja Oleksandr Byelkin
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: