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

Assertion `octets < 1024' failed in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string OR Assertion `field_length < 1024' failed in Field_string::save_field_metadata

Details

    Description

      # mysqld options required for replay:  --log-bin
      CREATE DATABASE db CHARACTER SET filename;
      USE db;
      CREATE TABLE t1 (a CHAR(209)) ENGINE=InnoDB;
      CREATE TABLE t2 (c INT) ENGINE=InnoDB;
      CREATE TEMPORARY TABLE t3 (c INT) ENGINE=InnoDB;
      SELECT * FROM t2 GROUP BY abc LIMIT 1;  # ERROR 1054 (42S22): Unknown column 'abc' in 'group statement'
      INSERT INTO t1 VALUES (0);
      

      Leads to:

      10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Debug)

      mysqld: /test/10.6_dbg/sql/field.cc:7680: Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*): Assertion `octets < 1024' failed.
      

      10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Debug)

      Core was generated by `/test/MD120621-mariadb-10.6.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x15321804c700 (LWP 2209916))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000015321a058859 in __GI_abort () at abort.c:79
      #2  0x000015321a058729 in __assert_fail_base (fmt=0x15321a1ee588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5570a8f1a2b2 "octets < 1024", file=0x5570a8f19f43 "/test/10.6_dbg/sql/field.cc", line=7680, function=<optimized out>) at assert.c:92
      #3  0x000015321a069f36 in __GI___assert_fail (assertion=assertion@entry=0x5570a8f1a2b2 "octets < 1024", file=file@entry=0x5570a8f19f43 "/test/10.6_dbg/sql/field.cc", line=line@entry=7680, function=function@entry=0x5570a8f1ce10 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)") at assert.c:101
      #4  0x00005570a839fc59 in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string (this=0x15321804a290, type_code=<optimized out>, octets=1045, cs=<optimized out>) at /test/10.6_dbg/sql/field.cc:7680
      #5  0x00005570a839fd2c in Field_string::binlog_type_info (this=0x1531c807cb48) at /test/10.6_dbg/sql/field.h:1256
      #6  0x00005570a85585d1 in Table_map_log_event::Table_map_log_event (this=0x15321804a400, thd=<optimized out>, tbl=0x1531c807a358, tid=<optimized out>, is_transactional=<optimized out>) at /test/10.6_dbg/sql/log_event_server.cc:6254
      #7  0x00005570a8530b61 in THD::binlog_write_table_map (this=this@entry=0x1531c8000db8, table=table@entry=0x1531c807a358, with_annotate=with_annotate@entry=true) at /test/10.6_dbg/sql/log.cc:6050
      #8  0x00005570a8530f75 in THD::binlog_write_table_maps (this=this@entry=0x1531c8000db8) at /test/10.6_dbg/sql/log.cc:6002
      #9  0x00005570a83d6a5b in handler::binlog_log_row (this=this@entry=0x1531c807cfa0, table=0x1531c807a358, before_record=before_record@entry=0x0, after_record=after_record@entry=0x1531c807d800 "\375\060", ' ' <repeats 198 times>..., log_func=log_func@entry=0x5570a83deda9 <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>) at /test/10.6_dbg/sql/handler.cc:6964
      #10 0x00005570a83d8954 in handler::ha_write_row (this=0x1531c807cfa0, buf=0x1531c807d800 "\375\060", ' ' <repeats 198 times>...) at /test/10.6_dbg/sql/handler.cc:7496
      #11 0x00005570a80a1f56 in write_record (thd=thd@entry=0x1531c8000db8, table=table@entry=0x1531c807a358, info=info@entry=0x15321804acb0, sink=sink@entry=0x0) at /test/10.6_dbg/sql/sql_insert.cc:2113
      #12 0x00005570a80adadc in mysql_insert (thd=thd@entry=0x1531c8000db8, table_list=0x1531c80141a8, fields=@0x1531c8005fd8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5570a96dbf80 <end_of_list>, last = 0x1531c8005fd8, elements = 0}, <No data fields>}, values_list=@0x1531c8006020: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1531c8014db0, last = 0x1531c8014db0, elements = 1}, <No data fields>}, update_fields=@0x1531c8006008: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5570a96dbf80 <end_of_list>, last = 0x1531c8006008, elements = 0}, <No data fields>}, update_values=@0x1531c8005ff0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5570a96dbf80 <end_of_list>, last = 0x1531c8005ff0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0) at /test/10.6_dbg/sql/sql_insert.cc:1104
      #13 0x00005570a80f3d38 in mysql_execute_command (thd=thd@entry=0x1531c8000db8) at /test/10.6_dbg/sql/sql_parse.cc:4556
      #14 0x00005570a80de890 in mysql_parse (thd=thd@entry=0x1531c8000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x15321804b400) at /test/10.6_dbg/sql/sql_parse.cc:8016
      #15 0x00005570a80ed3fa in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1531c8000db8, packet=packet@entry=0x1531c800b889 "INSERT INTO t1 VALUES (0)", packet_length=packet_length@entry=25, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1340
      #16 0x00005570a80f07da in do_command (thd=0x1531c8000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
      #17 0x00005570a8254c8e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5570ac1b3e58, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #18 0x00005570a8255293 in handle_one_connection (arg=arg@entry=0x5570ac1b3e58) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #19 0x00005570a8703166 in pfs_spawn_thread (arg=0x5570ac083e28) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #20 0x000015321a566609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #21 0x000015321a155293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.38 (dbg), 10.3.29 (dbg), 10.4.19 (dbg), 10.5.10 (dbg), 10.6.2 (dbg)
      MySQL: 5.5.62 (dbg), 5.6.51 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.38 (opt), 10.3.29 (opt), 10.4.19 (opt), 10.5.10 (opt), 10.6.2 (opt)
      MySQL: 5.5.62 (opt), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 8.0.24 (dbg), 8.0.24 (opt)

      Attachments

        Activity

          Roel Roel Van de Paar added a comment - - edited

          This (the original t/c above) produces a different assert in 10.4:

          10.4.19 9e6310e323a3abd411f852ff57fe41c9f149ff3a (Debug)

          mysqld: /test/10.4_dbg/sql/field.cc:7639: virtual int Field_string::save_field_metadata(uchar*): Assertion `field_length < 1024' failed.
          

          10.4.19 9e6310e323a3abd411f852ff57fe41c9f149ff3a (Debug)

          Core was generated by `/test/MD270421-mariadb-10.4.19-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
          Program terminated with signal SIGABRT, Aborted.
          #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
          [Current thread is 1 (Thread 0x155284051700 (LWP 266294))]
          (gdb) bt
          #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
          #1  0x0000155285e6d859 in __GI_abort () at abort.c:79
          #2  0x0000155285e6d729 in __assert_fail_base (fmt=0x155286003588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55578180798a "field_length < 1024", file=0x5557818075a4 "/test/10.4_dbg/sql/field.cc", line=7639, function=<optimized out>) at assert.c:92
          #3  0x0000155285e7ef36 in __GI___assert_fail (assertion=assertion@entry=0x55578180798a "field_length < 1024", file=file@entry=0x5557818075a4 "/test/10.4_dbg/sql/field.cc", line=line@entry=7639, function=function@entry=0x55578180a358 "virtual int Field_string::save_field_metadata(uchar*)") at assert.c:101
          #4  0x0000555780ca8176 in Field_string::save_field_metadata (this=0x155220076d60, metadata_ptr=0x1552200079d8 "") at /test/10.4_dbg/sql/field.cc:7639
          #5  0x0000555780e40dd2 in Table_map_log_event::save_field_metadata (this=this@entry=0x15528404e580) at /test/10.4_dbg/sql/log_event.cc:12527
          #6  0x0000555780e595c1 in Table_map_log_event::Table_map_log_event (this=0x15528404e580, thd=<optimized out>, tbl=<optimized out>, tid=<optimized out>, is_transactional=<optimized out>) at /test/10.4_dbg/sql/log_event.cc:12609
          #7  0x0000555780e3c48f in THD::binlog_write_table_map (this=this@entry=0x155220000d90, table=table@entry=0x155220078ed0, is_transactional=true, with_annotate=with_annotate@entry=0x15528404e6ef "\001") at /test/10.4_dbg/sql/log.cc:5840
          #8  0x0000555780cdf297 in write_locked_table_maps (thd=0x155220000d90) at /test/10.4_dbg/sql/handler.cc:6385
          #9  binlog_log_row_internal (log_func=0x555780ce6d4f <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>, after_record=0x15522007a528 "\375\060", ' ' <repeats 198 times>..., before_record=0x0, table=0x155220078ed0) at /test/10.4_dbg/sql/handler.cc:6413
          #10 binlog_log_row (table=0x155220078ed0, before_record=before_record@entry=0x0, after_record=after_record@entry=0x15522007a528 "\375\060", ' ' <repeats 198 times>..., log_func=log_func@entry=0x555780ce6d4f <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>) at /test/10.4_dbg/sql/handler.cc:6446
          #11 0x0000555780cdfe24 in handler::ha_write_row (this=0x155220079d38, buf=0x15522007a528 "\375\060", ' ' <repeats 198 times>...) at /test/10.4_dbg/sql/handler.cc:6764
          #12 0x00005557809b25fa in write_record (thd=thd@entry=0x155220000d90, table=table@entry=0x155220078ed0, info=info@entry=0x15528404e9d0) at /test/10.4_dbg/sql/sql_insert.cc:2060
          #13 0x00005557809bed16 in mysql_insert (thd=thd@entry=0x155220000d90, table_list=0x155220013400, fields=@0x155220005b98: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555781f6df80 <end_of_list>, last = 0x155220005b98, elements = 0}, <No data fields>}, values_list=@0x155220005be0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x155220014010, last = 0x155220014010, elements = 1}, <No data fields>}, update_fields=@0x155220005bc8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555781f6df80 <end_of_list>, last = 0x155220005bc8, elements = 0}, <No data fields>}, update_values=@0x155220005bb0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555781f6df80 <end_of_list>, last = 0x155220005bb0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false) at /test/10.4_dbg/sql/sql_insert.cc:1078
          #14 0x00005557809f94d3 in mysql_execute_command (thd=thd@entry=0x155220000d90) at /test/10.4_dbg/sql/sql_parse.cc:4603
          #15 0x0000555780a0127a in mysql_parse (thd=thd@entry=0x155220000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x155284050490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7995
          #16 0x0000555780a03bf1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x155220000d90, packet=packet@entry=0x15522001a451 "INSERT INTO t1 VALUES (0)", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1183
          #17 0x0000555780a0746d in do_command (thd=0x155220000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373
          #18 0x0000555780b414e8 in do_handle_one_connection (connect=connect@entry=0x555784ac10a0) at /test/10.4_dbg/sql/sql_connect.cc:1412
          #19 0x0000555780b41607 in handle_one_connection (arg=0x555784ac10a0) at /test/10.4_dbg/sql/sql_connect.cc:1316
          #20 0x000015528637b609 in start_thread (arg=<optimized out>) at pthread_create.c:477
          #21 0x0000155285f6a293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          

          And MySQL 5.5 and 5.6 produce a different assert again:

          MySQL 5.6 (Debug)

          InnoDB: Failing assertion: *mbmaxlen < 5
          

          MySQL 5.6 (Debug)

          Core was generated by `/test/MS280421-mysql-5.6.51-linux-x86_64-dbg/bin/mysqld --no-defaults --core --'.
          Program terminated with signal SIGABRT, Aborted.
          #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
          [Current thread is 1 (Thread 0x150aa0dc5700 (LWP 272171))]
          (gdb) bt
          #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
          #1  0x0000150ac7537859 in __GI_abort () at abort.c:79
          #2  0x000055b4a241ee3a in innobase_get_cset_width (cset=cset@entry=17, mbminlen=mbminlen@entry=0x150aa0dc0758, mbmaxlen=mbmaxlen@entry=0x150aa0dc0760) at /test/5.6_dbg/storage/innobase/handler/ha_innodb.cc:1747
          #3  0x000055b4a26a5582 in dtype_get_mblen (mbmaxlen=0x150aa0dc0760, mbminlen=0x150aa0dc0758, prtype=1114366, mtype=94234307351938) at /test/5.6_dbg/storage/innobase/include/data0type.ic:103
          #4  dict_mem_fill_column_struct (column=0x150a74049e68, col_pos=col_pos@entry=0, mtype=mtype@entry=13, prtype=prtype@entry=1114366, col_len=col_len@entry=1045) at /test/5.6_dbg/storage/innobase/dict/dict0mem.cc:510
          #5  0x000055b4a26a574d in dict_mem_table_add_col (table=table@entry=0x150a74049c08, heap=heap@entry=0x150a7404a310, name=0x150a7401f919 "a", mtype=mtype@entry=13, prtype=<optimized out>, len=len@entry=1045) at /test/5.6_dbg/storage/innobase/dict/dict0mem.cc:270
          #6  0x000055b4a2433345 in create_table_def (trx=trx@entry=0x150a74048b08, form=form@entry=0x150aa0dc1530, table_name=<optimized out>, table_name@entry=0x150aa0dc0b50 "db/t1", temp_path=temp_path@entry=0x150aa0dc0d50 "", remote_path=remote_path@entry=0x150aa0dc0f50 "", flags=1, flags2=80) at /test/5.6_dbg/storage/innobase/handler/ha_innodb.cc:8868
          #7  0x000055b4a2433965 in ha_innobase::create (this=<optimized out>, name=<optimized out>, form=0x150aa0dc1530, create_info=0x150aa0dc3740) at /test/5.6_dbg/storage/innobase/handler/ha_innodb.cc:9791
          #8  0x000055b4a2009f65 in handler::ha_create (this=0x150a74020320, name=0x150aa0dc3350 "./db/t1", form=form@entry=0x150aa0dc1530, info=info@entry=0x150aa0dc3740) at /test/5.6_dbg/sql/handler.cc:4541
          #9  0x000055b4a200a6f4 in ha_create_table (thd=thd@entry=0x55b4a39acec0, path=path@entry=0x150aa0dc3350 "./db/t1", db=db@entry=0x150a740058d8 "db", table_name=table_name@entry=0x150a74005340 "t1", create_info=create_info@entry=0x150aa0dc3740, update_create_info=update_create_info@entry=false, is_temp_table=false) at /test/5.6_dbg/sql/handler.cc:4785
          #10 0x000055b4a222514d in rea_create_table (thd=thd@entry=0x55b4a39acec0, path=path@entry=0x150aa0dc3350 "./db/t1", db=db@entry=0x150a740058d8 "db", table_name=table_name@entry=0x150a74005340 "t1", create_info=create_info@entry=0x150aa0dc3740, create_fields=@0x150aa0dc36f8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150a740059b0, last = 0x150a740059b0, elements = 1}, <No data fields>}, keys=0, key_info=0x150a74005ed8, file=0x150a74005c10, no_ha_table=false) at /test/5.6_dbg/sql/unireg.cc:552
          #11 0x000055b4a21ceacc in create_table_impl (thd=thd@entry=0x55b4a39acec0, db=db@entry=0x150a740058d8 "db", table_name=table_name@entry=0x150a74005340 "t1", error_table_name=error_table_name@entry=0x150a74005340 "t1", path=path@entry=0x150aa0dc3350 "./db/t1", create_info=create_info@entry=0x150aa0dc3740, alter_info=0x150aa0dc36b0, internal_tmp_table=false, select_field_count=0, no_ha_table=false, is_trans=0x150aa0dc35b3, key_info=0x150aa0dc3348, key_count=0x150aa0dc3344) at /test/5.6_dbg/sql/sql_table.cc:5015
          #12 0x000055b4a21cef65 in mysql_create_table_no_lock (thd=thd@entry=0x55b4a39acec0, db=0x150a740058d8 "db", table_name=0x150a74005340 "t1", create_info=create_info@entry=0x150aa0dc3740, alter_info=alter_info@entry=0x150aa0dc36b0, select_field_count=select_field_count@entry=0, is_trans=0x150aa0dc35b3) at /test/5.6_dbg/sql/sql_table.cc:5131
          #13 0x000055b4a21cf0b6 in mysql_create_table (thd=thd@entry=0x55b4a39acec0, create_table=create_table@entry=0x150a74005378, create_info=create_info@entry=0x150aa0dc3740, alter_info=alter_info@entry=0x150aa0dc36b0) at /test/5.6_dbg/sql/sql_table.cc:5180
          #14 0x000055b4a2173535 in mysql_execute_command (thd=thd@entry=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_parse.cc:3142
          #15 0x000055b4a217a94e in mysql_parse (thd=thd@entry=0x55b4a39acec0, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150aa0dc45d0) at /test/5.6_dbg/sql/sql_parse.cc:6538
          #16 0x000055b4a217c65a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x55b4a39acec0, packet=packet@entry=0x55b4a3a8e491 "CREATE TABLE t1 (a CHAR(209)) ENGINE=InnoDB", packet_length=packet_length@entry=43) at /test/5.6_dbg/sql/sql_class.h:888
          #17 0x000055b4a217e56a in do_command (thd=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_parse.cc:1070
          #18 0x000055b4a213d7c7 in do_handle_one_connection (thd_arg=thd_arg@entry=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_connect.cc:989
          #19 0x000055b4a213d8ab in handle_one_connection (arg=arg@entry=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_connect.cc:906
          #20 0x000055b4a279cf8b in pfs_spawn_thread (arg=0x55b4a3962d90) at /test/5.6_dbg/storage/perfschema/pfs.cc:1868
          #21 0x0000150ac7a58609 in start_thread (arg=<optimized out>) at pthread_create.c:477
          #22 0x0000150ac7634293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          

          Roel Roel Van de Paar added a comment - - edited This (the original t/c above) produces a different assert in 10.4: 10.4.19 9e6310e323a3abd411f852ff57fe41c9f149ff3a (Debug) mysqld: /test/10.4_dbg/sql/field.cc:7639: virtual int Field_string::save_field_metadata(uchar*): Assertion `field_length < 1024' failed. 10.4.19 9e6310e323a3abd411f852ff57fe41c9f149ff3a (Debug) Core was generated by `/test/MD270421-mariadb-10.4.19-linux-x86_64-dbg/bin/mysqld --no-defaults --core'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x155284051700 (LWP 266294))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x0000155285e6d859 in __GI_abort () at abort.c:79 #2 0x0000155285e6d729 in __assert_fail_base (fmt=0x155286003588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55578180798a "field_length < 1024", file=0x5557818075a4 "/test/10.4_dbg/sql/field.cc", line=7639, function=<optimized out>) at assert.c:92 #3 0x0000155285e7ef36 in __GI___assert_fail (assertion=assertion@entry=0x55578180798a "field_length < 1024", file=file@entry=0x5557818075a4 "/test/10.4_dbg/sql/field.cc", line=line@entry=7639, function=function@entry=0x55578180a358 "virtual int Field_string::save_field_metadata(uchar*)") at assert.c:101 #4 0x0000555780ca8176 in Field_string::save_field_metadata (this=0x155220076d60, metadata_ptr=0x1552200079d8 "") at /test/10.4_dbg/sql/field.cc:7639 #5 0x0000555780e40dd2 in Table_map_log_event::save_field_metadata (this=this@entry=0x15528404e580) at /test/10.4_dbg/sql/log_event.cc:12527 #6 0x0000555780e595c1 in Table_map_log_event::Table_map_log_event (this=0x15528404e580, thd=<optimized out>, tbl=<optimized out>, tid=<optimized out>, is_transactional=<optimized out>) at /test/10.4_dbg/sql/log_event.cc:12609 #7 0x0000555780e3c48f in THD::binlog_write_table_map (this=this@entry=0x155220000d90, table=table@entry=0x155220078ed0, is_transactional=true, with_annotate=with_annotate@entry=0x15528404e6ef "\001") at /test/10.4_dbg/sql/log.cc:5840 #8 0x0000555780cdf297 in write_locked_table_maps (thd=0x155220000d90) at /test/10.4_dbg/sql/handler.cc:6385 #9 binlog_log_row_internal (log_func=0x555780ce6d4f <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>, after_record=0x15522007a528 "\375\060", ' ' <repeats 198 times>..., before_record=0x0, table=0x155220078ed0) at /test/10.4_dbg/sql/handler.cc:6413 #10 binlog_log_row (table=0x155220078ed0, before_record=before_record@entry=0x0, after_record=after_record@entry=0x15522007a528 "\375\060", ' ' <repeats 198 times>..., log_func=log_func@entry=0x555780ce6d4f <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, bool, unsigned char const*, unsigned char const*)>) at /test/10.4_dbg/sql/handler.cc:6446 #11 0x0000555780cdfe24 in handler::ha_write_row (this=0x155220079d38, buf=0x15522007a528 "\375\060", ' ' <repeats 198 times>...) at /test/10.4_dbg/sql/handler.cc:6764 #12 0x00005557809b25fa in write_record (thd=thd@entry=0x155220000d90, table=table@entry=0x155220078ed0, info=info@entry=0x15528404e9d0) at /test/10.4_dbg/sql/sql_insert.cc:2060 #13 0x00005557809bed16 in mysql_insert (thd=thd@entry=0x155220000d90, table_list=0x155220013400, fields=@0x155220005b98: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555781f6df80 <end_of_list>, last = 0x155220005b98, elements = 0}, <No data fields>}, values_list=@0x155220005be0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x155220014010, last = 0x155220014010, elements = 1}, <No data fields>}, update_fields=@0x155220005bc8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555781f6df80 <end_of_list>, last = 0x155220005bc8, elements = 0}, <No data fields>}, update_values=@0x155220005bb0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x555781f6df80 <end_of_list>, last = 0x155220005bb0, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false) at /test/10.4_dbg/sql/sql_insert.cc:1078 #14 0x00005557809f94d3 in mysql_execute_command (thd=thd@entry=0x155220000d90) at /test/10.4_dbg/sql/sql_parse.cc:4603 #15 0x0000555780a0127a in mysql_parse (thd=thd@entry=0x155220000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x155284050490, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7995 #16 0x0000555780a03bf1 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x155220000d90, packet=packet@entry=0x15522001a451 "INSERT INTO t1 VALUES (0)", packet_length=packet_length@entry=25, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1183 #17 0x0000555780a0746d in do_command (thd=0x155220000d90) at /test/10.4_dbg/sql/sql_parse.cc:1373 #18 0x0000555780b414e8 in do_handle_one_connection (connect=connect@entry=0x555784ac10a0) at /test/10.4_dbg/sql/sql_connect.cc:1412 #19 0x0000555780b41607 in handle_one_connection (arg=0x555784ac10a0) at /test/10.4_dbg/sql/sql_connect.cc:1316 #20 0x000015528637b609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #21 0x0000155285f6a293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 And MySQL 5.5 and 5.6 produce a different assert again: MySQL 5.6 (Debug) InnoDB: Failing assertion: *mbmaxlen < 5 MySQL 5.6 (Debug) Core was generated by `/test/MS280421-mysql-5.6.51-linux-x86_64-dbg/bin/mysqld --no-defaults --core --'. Program terminated with signal SIGABRT, Aborted. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 [Current thread is 1 (Thread 0x150aa0dc5700 (LWP 272171))] (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x0000150ac7537859 in __GI_abort () at abort.c:79 #2 0x000055b4a241ee3a in innobase_get_cset_width (cset=cset@entry=17, mbminlen=mbminlen@entry=0x150aa0dc0758, mbmaxlen=mbmaxlen@entry=0x150aa0dc0760) at /test/5.6_dbg/storage/innobase/handler/ha_innodb.cc:1747 #3 0x000055b4a26a5582 in dtype_get_mblen (mbmaxlen=0x150aa0dc0760, mbminlen=0x150aa0dc0758, prtype=1114366, mtype=94234307351938) at /test/5.6_dbg/storage/innobase/include/data0type.ic:103 #4 dict_mem_fill_column_struct (column=0x150a74049e68, col_pos=col_pos@entry=0, mtype=mtype@entry=13, prtype=prtype@entry=1114366, col_len=col_len@entry=1045) at /test/5.6_dbg/storage/innobase/dict/dict0mem.cc:510 #5 0x000055b4a26a574d in dict_mem_table_add_col (table=table@entry=0x150a74049c08, heap=heap@entry=0x150a7404a310, name=0x150a7401f919 "a", mtype=mtype@entry=13, prtype=<optimized out>, len=len@entry=1045) at /test/5.6_dbg/storage/innobase/dict/dict0mem.cc:270 #6 0x000055b4a2433345 in create_table_def (trx=trx@entry=0x150a74048b08, form=form@entry=0x150aa0dc1530, table_name=<optimized out>, table_name@entry=0x150aa0dc0b50 "db/t1", temp_path=temp_path@entry=0x150aa0dc0d50 "", remote_path=remote_path@entry=0x150aa0dc0f50 "", flags=1, flags2=80) at /test/5.6_dbg/storage/innobase/handler/ha_innodb.cc:8868 #7 0x000055b4a2433965 in ha_innobase::create (this=<optimized out>, name=<optimized out>, form=0x150aa0dc1530, create_info=0x150aa0dc3740) at /test/5.6_dbg/storage/innobase/handler/ha_innodb.cc:9791 #8 0x000055b4a2009f65 in handler::ha_create (this=0x150a74020320, name=0x150aa0dc3350 "./db/t1", form=form@entry=0x150aa0dc1530, info=info@entry=0x150aa0dc3740) at /test/5.6_dbg/sql/handler.cc:4541 #9 0x000055b4a200a6f4 in ha_create_table (thd=thd@entry=0x55b4a39acec0, path=path@entry=0x150aa0dc3350 "./db/t1", db=db@entry=0x150a740058d8 "db", table_name=table_name@entry=0x150a74005340 "t1", create_info=create_info@entry=0x150aa0dc3740, update_create_info=update_create_info@entry=false, is_temp_table=false) at /test/5.6_dbg/sql/handler.cc:4785 #10 0x000055b4a222514d in rea_create_table (thd=thd@entry=0x55b4a39acec0, path=path@entry=0x150aa0dc3350 "./db/t1", db=db@entry=0x150a740058d8 "db", table_name=table_name@entry=0x150a74005340 "t1", create_info=create_info@entry=0x150aa0dc3740, create_fields=@0x150aa0dc36f8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x150a740059b0, last = 0x150a740059b0, elements = 1}, <No data fields>}, keys=0, key_info=0x150a74005ed8, file=0x150a74005c10, no_ha_table=false) at /test/5.6_dbg/sql/unireg.cc:552 #11 0x000055b4a21ceacc in create_table_impl (thd=thd@entry=0x55b4a39acec0, db=db@entry=0x150a740058d8 "db", table_name=table_name@entry=0x150a74005340 "t1", error_table_name=error_table_name@entry=0x150a74005340 "t1", path=path@entry=0x150aa0dc3350 "./db/t1", create_info=create_info@entry=0x150aa0dc3740, alter_info=0x150aa0dc36b0, internal_tmp_table=false, select_field_count=0, no_ha_table=false, is_trans=0x150aa0dc35b3, key_info=0x150aa0dc3348, key_count=0x150aa0dc3344) at /test/5.6_dbg/sql/sql_table.cc:5015 #12 0x000055b4a21cef65 in mysql_create_table_no_lock (thd=thd@entry=0x55b4a39acec0, db=0x150a740058d8 "db", table_name=0x150a74005340 "t1", create_info=create_info@entry=0x150aa0dc3740, alter_info=alter_info@entry=0x150aa0dc36b0, select_field_count=select_field_count@entry=0, is_trans=0x150aa0dc35b3) at /test/5.6_dbg/sql/sql_table.cc:5131 #13 0x000055b4a21cf0b6 in mysql_create_table (thd=thd@entry=0x55b4a39acec0, create_table=create_table@entry=0x150a74005378, create_info=create_info@entry=0x150aa0dc3740, alter_info=alter_info@entry=0x150aa0dc36b0) at /test/5.6_dbg/sql/sql_table.cc:5180 #14 0x000055b4a2173535 in mysql_execute_command (thd=thd@entry=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_parse.cc:3142 #15 0x000055b4a217a94e in mysql_parse (thd=thd@entry=0x55b4a39acec0, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150aa0dc45d0) at /test/5.6_dbg/sql/sql_parse.cc:6538 #16 0x000055b4a217c65a in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x55b4a39acec0, packet=packet@entry=0x55b4a3a8e491 "CREATE TABLE t1 (a CHAR(209)) ENGINE=InnoDB", packet_length=packet_length@entry=43) at /test/5.6_dbg/sql/sql_class.h:888 #17 0x000055b4a217e56a in do_command (thd=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_parse.cc:1070 #18 0x000055b4a213d7c7 in do_handle_one_connection (thd_arg=thd_arg@entry=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_connect.cc:989 #19 0x000055b4a213d8ab in handle_one_connection (arg=arg@entry=0x55b4a39acec0) at /test/5.6_dbg/sql/sql_connect.cc:906 #20 0x000055b4a279cf8b in pfs_spawn_thread (arg=0x55b4a3962d90) at /test/5.6_dbg/storage/perfschema/pfs.cc:1868 #21 0x0000150ac7a58609 in start_thread (arg=<optimized out>) at pthread_create.c:477 #22 0x0000150ac7634293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
          Roel Roel Van de Paar added a comment - - edited

          # mysqld options required for replay: --log_bin 
          CREATE TABLE t (a INT,b INT,KEY(a));
          SELECT * FROM t INTO OUTFILE 'a';
          USE performance_schema;
          SET SESSION collation_server=filename;
          DROP DATABASE test;  # ERROR 1010 (HY000): Error dropping database (can't rmdir './test', errno: 39 "Directory not empty")
          USE test;
          CREATE TEMPORARY TABLE tmp (a INT);
          LOAD DATA INFILE 'a' INTO TABLE t;
          CREATE TABLE t (a CHAR(255),KEY(a));
          INSERT INTO t VALUES();
          

          Leads to:

          CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug)

          mariadbd: /test/11.2_dbg/sql/field.cc:7865: Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*): Assertion `octets < 1024' failed.
          

          CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug)

          Core was generated by `/test/MD090924-mariadb-11.2.6-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
          Program terminated with signal SIGABRT, Aborted.
          Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
          #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
           
          [Current thread is 1 (LWP 3858103)]
          (gdb) bt
          #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
          #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
          #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
          #3  0x000015071864526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
          #4  0x00001507186288ff in __GI_abort () at ./stdlib/abort.c:79
          #5  0x000015071862881b in __assert_fail_base (fmt=0x1507187d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55e90eee1985 "octets < 1024", file=file@entry=0x55e90eee1694 "/test/11.2_dbg/sql/field.cc", line=line@entry=7865, function=function@entry=0x55e90ed71518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)")at ./assert/assert.c:94
          #6  0x000015071863b507 in __assert_fail (assertion=0x55e90eee1985 "octets < 1024", file=0x55e90eee1694 "/test/11.2_dbg/sql/field.cc", line=7865, function=0x55e90ed71518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)") at ./assert/assert.c:103
          #7  0x000055e90e2e8a78 in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string (this=0x150713ffd140, type_code=254 '\376', octets=1275, cs=<optimized out>) at /test/11.2_dbg/sql/field.cc:7865
          #8  0x000055e90e2e8b21 in Field_string::binlog_type_info (this=0x1506b008e9b0)at /test/11.2_dbg/sql/field.cc:7876
          #9  0x000055e90e4977a4 in Table_map_log_event::Table_map_log_event (this=this@entry=0x150713ffd280, thd=thd@entry=0x1506b0000d58, tbl=tbl@entry=0x1506b008e4b8, tid=<optimized out>, is_transactional=is_transactional@entry=true)at /test/11.2_dbg/sql/log_event_server.cc:5777
          #10 0x000055e90e47473f in MYSQL_BIN_LOG::write_table_map (this=this@entry=0x55e90f8382a0 <mysql_bin_log>, thd=thd@entry=0x1506b0000d58, table=table@entry=0x1506b008e4b8, with_annotate=with_annotate@entry=true) at /test/11.2_dbg/sql/log.cc:6104
          #11 0x000055e90e474c30 in THD::binlog_write_table_maps (this=this@entry=0x1506b0000d58) at /test/11.2_dbg/sql/log.cc:6054
          #12 0x000055e90e31aae6 in binlog_log_row_to_binlog (has_trans=true, log_func=0x55e90e31ff27 <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>, after_record=0x1506b008f570 "\377", ' ' <repeats 199 times>..., before_record=0x0, table=0x1506b008e4b8)at /test/11.2_dbg/sql/handler.cc:7358
          #13 handler::binlog_log_row (this=this@entry=0x1506b008ed20, before_record=before_record@entry=0x0, after_record=after_record@entry=0x1506b008f570 "\377", ' ' <repeats 199 times>..., log_func=log_func@entry=0x55e90e31ff27 <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>)at /test/11.2_dbg/sql/handler.cc:7390
          #14 0x000055e90e31cbd0 in handler::ha_write_row (this=0x1506b008ed20, buf=0x1506b008f570 "\377", ' ' <repeats 199 times>...)at /test/11.2_dbg/sql/handler.cc:7960
          #15 0x000055e90dfb8240 in write_record (thd=thd@entry=0x1506b0000d58, table=table@entry=0x1506b008e4b8, info=info@entry=0x150713ffdb70, sink=sink@entry=0x0) at /test/11.2_dbg/sql/sql_insert.cc:2302
          #16 0x000055e90dfc2eb1 in mysql_insert (thd=thd@entry=0x1506b0000d58, table_list=0x1506b00137b8, fields=@0x1506b00061e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e90f8071e0 <end_of_list>, last = 0x1506b00061e8, elements = 0}, <No data fields>}, values_list=@0x1506b0006230: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1506b00143a8, last = 0x1506b00143a8, elements = 1}, <No data fields>}, update_fields=@0x1506b0006218: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e90f8071e0 <end_of_list>, last = 0x1506b0006218, elements = 0}, <No data fields>}, update_values=@0x1506b0006200: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e90f8071e0 <end_of_list>, last = 0x1506b0006200, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0)at /test/11.2_dbg/sql/sql_insert.cc:1171
          #17 0x000055e90dffe6ba in mysql_execute_command (thd=thd@entry=0x1506b0000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.2_dbg/sql/sql_parse.cc:4489
          #18 0x000055e90e003d26 in mysql_parse (thd=thd@entry=0x1506b0000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150713ffe2a0)at /test/11.2_dbg/sql/sql_parse.cc:7929
          #19 0x000055e90e0061bd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1506b0000d58, packet=packet@entry=0x1506b000b3a9 "INSERT INTO t VALUES()", packet_length=packet_length@entry=22, blocking=blocking@entry=true)at /test/11.2_dbg/sql/sql_class.h:248
          #20 0x000055e90e0083e3 in do_command (thd=0x1506b0000d58, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1407
          #21 0x000055e90e17435c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e911a8f388, put_in_cache=put_in_cache@entry=true)at /test/11.2_dbg/sql/sql_connect.cc:1439
          #22 0x000055e90e17465c in handle_one_connection (arg=arg@entry=0x55e911a8f388)at /test/11.2_dbg/sql/sql_connect.cc:1341
          #23 0x000055e90e5bb62c in pfs_spawn_thread (arg=0x55e9119ee7e8)at /test/11.2_dbg/storage/perfschema/pfs.cc:2201
          #24 0x000015071869ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
          #25 0x0000150718729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
          

          Roel Roel Van de Paar added a comment - - edited # mysqld options required for replay: --log_bin CREATE TABLE t (a INT ,b INT , KEY (a)); SELECT * FROM t INTO OUTFILE 'a' ; USE performance_schema; SET SESSION collation_server=filename; DROP DATABASE test; # ERROR 1010 (HY000): Error dropping database (can 't rmdir ' ./test ', errno: 39 "Directory not empty") USE test; CREATE TEMPORARY TABLE tmp (a INT); LOAD DATA INFILE ' a' INTO TABLE t; CREATE TABLE t (a CHAR (255), KEY (a)); INSERT INTO t VALUES (); Leads to: CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug) mariadbd: /test/11.2_dbg/sql/field.cc:7865: Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*): Assertion `octets < 1024' failed. CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug) Core was generated by `/test/MD090924-mariadb-11.2.6-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'. Program terminated with signal SIGABRT, Aborted. Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c. #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44   [Current thread is 1 (LWP 3858103)] (gdb) bt #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44 #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78 #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89 #3 0x000015071864526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26 #4 0x00001507186288ff in __GI_abort () at ./stdlib/abort.c:79 #5 0x000015071862881b in __assert_fail_base (fmt=0x1507187d01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55e90eee1985 "octets < 1024", file=file@entry=0x55e90eee1694 "/test/11.2_dbg/sql/field.cc", line=line@entry=7865, function=function@entry=0x55e90ed71518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)")at ./assert/assert.c:94 #6 0x000015071863b507 in __assert_fail (assertion=0x55e90eee1985 "octets < 1024", file=0x55e90eee1694 "/test/11.2_dbg/sql/field.cc", line=7865, function=0x55e90ed71518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)") at ./assert/assert.c:103 #7 0x000055e90e2e8a78 in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string (this=0x150713ffd140, type_code=254 '\376', octets=1275, cs=<optimized out>) at /test/11.2_dbg/sql/field.cc:7865 #8 0x000055e90e2e8b21 in Field_string::binlog_type_info (this=0x1506b008e9b0)at /test/11.2_dbg/sql/field.cc:7876 #9 0x000055e90e4977a4 in Table_map_log_event::Table_map_log_event (this=this@entry=0x150713ffd280, thd=thd@entry=0x1506b0000d58, tbl=tbl@entry=0x1506b008e4b8, tid=<optimized out>, is_transactional=is_transactional@entry=true)at /test/11.2_dbg/sql/log_event_server.cc:5777 #10 0x000055e90e47473f in MYSQL_BIN_LOG::write_table_map (this=this@entry=0x55e90f8382a0 <mysql_bin_log>, thd=thd@entry=0x1506b0000d58, table=table@entry=0x1506b008e4b8, with_annotate=with_annotate@entry=true) at /test/11.2_dbg/sql/log.cc:6104 #11 0x000055e90e474c30 in THD::binlog_write_table_maps (this=this@entry=0x1506b0000d58) at /test/11.2_dbg/sql/log.cc:6054 #12 0x000055e90e31aae6 in binlog_log_row_to_binlog (has_trans=true, log_func=0x55e90e31ff27 <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>, after_record=0x1506b008f570 "\377", ' ' <repeats 199 times>..., before_record=0x0, table=0x1506b008e4b8)at /test/11.2_dbg/sql/handler.cc:7358 #13 handler::binlog_log_row (this=this@entry=0x1506b008ed20, before_record=before_record@entry=0x0, after_record=after_record@entry=0x1506b008f570 "\377", ' ' <repeats 199 times>..., log_func=log_func@entry=0x55e90e31ff27 <Write_rows_log_event::binlog_row_logging_function(THD*, TABLE*, Event_log*, binlog_cache_data*, bool, unsigned long, unsigned char const*, unsigned char const*)>)at /test/11.2_dbg/sql/handler.cc:7390 #14 0x000055e90e31cbd0 in handler::ha_write_row (this=0x1506b008ed20, buf=0x1506b008f570 "\377", ' ' <repeats 199 times>...)at /test/11.2_dbg/sql/handler.cc:7960 #15 0x000055e90dfb8240 in write_record (thd=thd@entry=0x1506b0000d58, table=table@entry=0x1506b008e4b8, info=info@entry=0x150713ffdb70, sink=sink@entry=0x0) at /test/11.2_dbg/sql/sql_insert.cc:2302 #16 0x000055e90dfc2eb1 in mysql_insert (thd=thd@entry=0x1506b0000d58, table_list=0x1506b00137b8, fields=@0x1506b00061e8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e90f8071e0 <end_of_list>, last = 0x1506b00061e8, elements = 0}, <No data fields>}, values_list=@0x1506b0006230: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x1506b00143a8, last = 0x1506b00143a8, elements = 1}, <No data fields>}, update_fields=@0x1506b0006218: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e90f8071e0 <end_of_list>, last = 0x1506b0006218, elements = 0}, <No data fields>}, update_values=@0x1506b0006200: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x55e90f8071e0 <end_of_list>, last = 0x1506b0006200, elements = 0}, <No data fields>}, duplic=DUP_ERROR, ignore=false, result=0x0)at /test/11.2_dbg/sql/sql_insert.cc:1171 #17 0x000055e90dffe6ba in mysql_execute_command (thd=thd@entry=0x1506b0000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.2_dbg/sql/sql_parse.cc:4489 #18 0x000055e90e003d26 in mysql_parse (thd=thd@entry=0x1506b0000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150713ffe2a0)at /test/11.2_dbg/sql/sql_parse.cc:7929 #19 0x000055e90e0061bd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x1506b0000d58, packet=packet@entry=0x1506b000b3a9 "INSERT INTO t VALUES()", packet_length=packet_length@entry=22, blocking=blocking@entry=true)at /test/11.2_dbg/sql/sql_class.h:248 #20 0x000055e90e0083e3 in do_command (thd=0x1506b0000d58, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1407 #21 0x000055e90e17435c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55e911a8f388, put_in_cache=put_in_cache@entry=true)at /test/11.2_dbg/sql/sql_connect.cc:1439 #22 0x000055e90e17465c in handle_one_connection (arg=arg@entry=0x55e911a8f388)at /test/11.2_dbg/sql/sql_connect.cc:1341 #23 0x000055e90e5bb62c in pfs_spawn_thread (arg=0x55e9119ee7e8)at /test/11.2_dbg/storage/perfschema/pfs.cc:2201 #24 0x000015071869ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447 #25 0x0000150718729c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

          SET SESSION collation_server=filename;
          DROP DATABASE test;
          CREATE DATABASE test;
          USE test;
          CREATE TABLE t (a INT UNSIGNED,b INT,c BINARY (8),d BINARY (8),e CHAR(46),f BINARY (13),g BLOB,h BLOB,id INT,KEY(b)) ENGINE=InnoDB;
          INSERT INTO t VALUES (+1,+1,0,0,0,0,0,0,0);
          ALTER TABLE t CHANGE COLUMN a a CHAR(232);
          ALTER TABLE t ENGINE=Aria;
          

          Leads to:

          CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug)

          mariadbd: /test/11.2_dbg/sql/field.cc:7865: Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*): Assertion `octets < 1024' failed.
          

          CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug)

          Core was generated by `/test/MD090924-mariadb-11.2.6-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
          Program terminated with signal SIGABRT, Aborted.
          Download failed: Invalid argument.  Continuing without source file ./nptl/./nptl/pthread_kill.c.
          #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
           
          [Current thread is 1 (LWP 423221)]
          (gdb) bt
          #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44
          #1  __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78
          #2  __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89
          #3  0x000014faf4c4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26
          #4  0x000014faf4c288ff in __GI_abort () at ./stdlib/abort.c:79
          #5  0x000014faf4c2881b in __assert_fail_base (fmt=0x14faf4dd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x559a8574b985 "octets < 1024", file=file@entry=0x559a8574b694 "/test/11.2_dbg/sql/field.cc", line=line@entry=7865, function=function@entry=0x559a855db518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)")at ./assert/assert.c:94
          #6  0x000014faf4c3b507 in __assert_fail (assertion=0x559a8574b985 "octets < 1024", file=0x559a8574b694 "/test/11.2_dbg/sql/field.cc", line=7865, function=0x559a855db518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)") at ./assert/assert.c:103
          #7  0x0000559a84b52a78 in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string (this=0x14faf4864820, type_code=254 '\376', octets=1160, cs=<optimized out>) at /test/11.2_dbg/sql/field.cc:7865
          #8  0x0000559a84b52b21 in Field_string::binlog_type_info (this=0x14fa900899f0)at /test/11.2_dbg/sql/field.cc:7876
          #9  0x0000559a84d017a4 in Table_map_log_event::Table_map_log_event (this=this@entry=0x14faf4864bc0, thd=thd@entry=0x14fa90000d58, tbl=tbl@entry=0x14fa900894b8, tid=<optimized out>, is_transactional=<optimized out>)at /test/11.2_dbg/sql/log_event_server.cc:5777
          #10 0x0000559a8495e338 in copy_data_between_tables (thd=thd@entry=0x14fa90000d58, from=from@entry=0x14fa900894b8, to=to@entry=0x14fa90098a68, ignore=<optimized out>, order_num=order_num@entry=0, order=order@entry=0x0, copied=<optimized out>, deleted=<optimized out>, alter_info=<optimized out>, alter_ctx=<optimized out>, online=true, start_alter_id=<optimized out>) at /test/11.2_dbg/sql/sql_table.cc:12457
          #11 0x0000559a849625fe in mysql_alter_table (thd=thd@entry=0x14fa90000d58, new_db=<optimized out>, new_name=new_name@entry=0x14fa90005fe0, create_info=create_info@entry=0x14faf486c310, table_list=<optimized out>, table_list@entry=0x14fa90013720, recreate_info=recreate_info@entry=0x14faf486c160, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>)at /test/11.2_dbg/sql/sql_table.cc:11450
          #12 0x0000559a849e6ae4 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14fa90000d58) at /test/11.2_dbg/sql/sql_alter.cc:701
          #13 0x0000559a8486c427 in mysql_execute_command (thd=thd@entry=0x14fa90000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.2_dbg/sql/sql_parse.cc:5883
          #14 0x0000559a8486dd26 in mysql_parse (thd=thd@entry=0x14fa90000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14faf486d2a0)at /test/11.2_dbg/sql/sql_parse.cc:7929
          #15 0x0000559a848701bd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14fa90000d58, packet=packet@entry=0x14fa9000b309 "", packet_length=packet_length@entry=25, blocking=blocking@entry=true)at /test/11.2_dbg/sql/sql_class.h:248
          #16 0x0000559a848723e3 in do_command (thd=0x14fa90000d58, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1407
          #17 0x0000559a849de35c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559a8724efa8, put_in_cache=put_in_cache@entry=true)at /test/11.2_dbg/sql/sql_connect.cc:1439
          #18 0x0000559a849de65c in handle_one_connection (arg=arg@entry=0x559a8724efa8)at /test/11.2_dbg/sql/sql_connect.cc:1341
          #19 0x0000559a84e2562c in pfs_spawn_thread (arg=0x559a8721e0f8)at /test/11.2_dbg/storage/perfschema/pfs.cc:2201
          #20 0x000014faf4c9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447
          #21 0x000014faf4d29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
          

          Roel Roel Van de Paar added a comment - SET SESSION collation_server=filename; DROP DATABASE test; CREATE DATABASE test; USE test; CREATE TABLE t (a INT UNSIGNED,b INT ,c BINARY (8),d BINARY (8),e CHAR (46),f BINARY (13),g BLOB,h BLOB,id INT , KEY (b)) ENGINE=InnoDB; INSERT INTO t VALUES (+1,+1,0,0,0,0,0,0,0); ALTER TABLE t CHANGE COLUMN a a CHAR (232); ALTER TABLE t ENGINE=Aria; Leads to: CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug) mariadbd: /test/11.2_dbg/sql/field.cc:7865: Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*): Assertion `octets < 1024' failed. CS 11.2.6 e91a79945822def1452787f825e6047c6a64dbd9 (Debug) Core was generated by `/test/MD090924-mariadb-11.2.6-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'. Program terminated with signal SIGABRT, Aborted. Download failed: Invalid argument. Continuing without source file ./nptl/./nptl/pthread_kill.c. #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44   [Current thread is 1 (LWP 423221)] (gdb) bt #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:44 #1 __pthread_kill_internal (signo=6, threadid=<optimized out>)at ./nptl/pthread_kill.c:78 #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6)at ./nptl/pthread_kill.c:89 #3 0x000014faf4c4526e in __GI_raise (sig=sig@entry=6)at ../sysdeps/posix/raise.c:26 #4 0x000014faf4c288ff in __GI_abort () at ./stdlib/abort.c:79 #5 0x000014faf4c2881b in __assert_fail_base (fmt=0x14faf4dd01e8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x559a8574b985 "octets < 1024", file=file@entry=0x559a8574b694 "/test/11.2_dbg/sql/field.cc", line=line@entry=7865, function=function@entry=0x559a855db518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)")at ./assert/assert.c:94 #6 0x000014faf4c3b507 in __assert_fail (assertion=0x559a8574b985 "octets < 1024", file=0x559a8574b694 "/test/11.2_dbg/sql/field.cc", line=7865, function=0x559a855db518 "Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar, uint32, CHARSET_INFO*)") at ./assert/assert.c:103 #7 0x0000559a84b52a78 in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string (this=0x14faf4864820, type_code=254 '\376', octets=1160, cs=<optimized out>) at /test/11.2_dbg/sql/field.cc:7865 #8 0x0000559a84b52b21 in Field_string::binlog_type_info (this=0x14fa900899f0)at /test/11.2_dbg/sql/field.cc:7876 #9 0x0000559a84d017a4 in Table_map_log_event::Table_map_log_event (this=this@entry=0x14faf4864bc0, thd=thd@entry=0x14fa90000d58, tbl=tbl@entry=0x14fa900894b8, tid=<optimized out>, is_transactional=<optimized out>)at /test/11.2_dbg/sql/log_event_server.cc:5777 #10 0x0000559a8495e338 in copy_data_between_tables (thd=thd@entry=0x14fa90000d58, from=from@entry=0x14fa900894b8, to=to@entry=0x14fa90098a68, ignore=<optimized out>, order_num=order_num@entry=0, order=order@entry=0x0, copied=<optimized out>, deleted=<optimized out>, alter_info=<optimized out>, alter_ctx=<optimized out>, online=true, start_alter_id=<optimized out>) at /test/11.2_dbg/sql/sql_table.cc:12457 #11 0x0000559a849625fe in mysql_alter_table (thd=thd@entry=0x14fa90000d58, new_db=<optimized out>, new_name=new_name@entry=0x14fa90005fe0, create_info=create_info@entry=0x14faf486c310, table_list=<optimized out>, table_list@entry=0x14fa90013720, recreate_info=recreate_info@entry=0x14faf486c160, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>)at /test/11.2_dbg/sql/sql_table.cc:11450 #12 0x0000559a849e6ae4 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x14fa90000d58) at /test/11.2_dbg/sql/sql_alter.cc:701 #13 0x0000559a8486c427 in mysql_execute_command (thd=thd@entry=0x14fa90000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)at /test/11.2_dbg/sql/sql_parse.cc:5883 #14 0x0000559a8486dd26 in mysql_parse (thd=thd@entry=0x14fa90000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14faf486d2a0)at /test/11.2_dbg/sql/sql_parse.cc:7929 #15 0x0000559a848701bd in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14fa90000d58, packet=packet@entry=0x14fa9000b309 "", packet_length=packet_length@entry=25, blocking=blocking@entry=true)at /test/11.2_dbg/sql/sql_class.h:248 #16 0x0000559a848723e3 in do_command (thd=0x14fa90000d58, blocking=blocking@entry=true) at /test/11.2_dbg/sql/sql_parse.cc:1407 #17 0x0000559a849de35c in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559a8724efa8, put_in_cache=put_in_cache@entry=true)at /test/11.2_dbg/sql/sql_connect.cc:1439 #18 0x0000559a849de65c in handle_one_connection (arg=arg@entry=0x559a8724efa8)at /test/11.2_dbg/sql/sql_connect.cc:1341 #19 0x0000559a84e2562c in pfs_spawn_thread (arg=0x559a8721e0f8)at /test/11.2_dbg/storage/perfschema/pfs.cc:2201 #20 0x000014faf4c9ca94 in start_thread (arg=<optimized out>)at ./nptl/pthread_create.c:447 #21 0x000014faf4d29c3c in clone3 ()at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78

          The code in

          Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar type_code,
                                                                       uint32 octets,
                                                                       CHARSET_INFO *cs)
           :Binlog_type_info(type_code, 0, 2, cs)
          {
            DBUG_ASSERT(octets < 1024);
            DBUG_ASSERT((type_code & 0xF0) == 0xF0);
            DBUG_PRINT("debug", ("octets: %u, type_code: %u", octets, type_code));
            m_metadata= (type_code ^ ((octets & 0x300) >> 4)) +
                        (((uint)(octets & 0xFF)) << 8);
          }
          

          assumes that the maximum possible octet length is 1024.

          While in case of a CHAR(209) CHARACTER SET filename field, octet length is 209*5=1045. Hence the assert.

          bar Alexander Barkov added a comment - The code in Binlog_type_info_fixed_string::Binlog_type_info_fixed_string(uchar type_code, uint32 octets, CHARSET_INFO *cs) :Binlog_type_info(type_code, 0, 2, cs) { DBUG_ASSERT(octets < 1024); DBUG_ASSERT((type_code & 0xF0) == 0xF0); DBUG_PRINT( "debug" , ( "octets: %u, type_code: %u" , octets, type_code)); m_metadata= (type_code ^ ((octets & 0x300) >> 4)) + (((uint)(octets & 0xFF)) << 8); } assumes that the maximum possible octet length is 1024. While in case of a CHAR(209) CHARACTER SET filename field, octet length is 209*5=1045. Hence the assert.
          bar Alexander Barkov added a comment - - edited

          This script also reproduces the problem:

          CREATE OR REPLACE TABLE t1 (a INT UNSIGNED) ENGINE=MyISAM;
          INSERT INTO t1 VALUES (+1);
          ALTER TABLE t1 CHANGE COLUMN a a CHAR(232) CHARACTER SET filename;
          ALTER TABLE t1 ENGINE=HEAP;
          

          bar Alexander Barkov added a comment - - edited This script also reproduces the problem: CREATE OR REPLACE TABLE t1 (a INT UNSIGNED) ENGINE=MyISAM; INSERT INTO t1 VALUES (+1); ALTER TABLE t1 CHANGE COLUMN a a CHAR (232) CHARACTER SET filename; ALTER TABLE t1 ENGINE=HEAP;

          Updated versions: Bug confirmed present in:
          MariaDB: 10.5.27 (dbg), 10.6.20 (dbg), 10.11.10 (dbg), 11.1.7 (dbg), 11.2.6 (dbg), 11.4.4 (dbg), 11.6.2 (dbg), 11.7.0 (dbg)
          MySQL: 5.5.62 (dbg), 5.6.51 (dbg)

          Bug (or feature/syntax) confirmed not present in:
          MariaDB: 10.5.27 (opt), 10.6.20 (opt), 10.11.10 (opt), 11.1.7 (opt), 11.2.6 (opt), 11.4.4 (opt), 11.6.2 (opt), 11.7.0 (opt)
          MySQL: 5.5.62 (opt), 5.6.51 (opt), 5.7.44 (dbg), 5.7.44 (opt), 8.0.36 (dbg), 8.0.36 (opt)

          Stacks/UniqueID's observed, one per line:

          *mbmaxlen < 5|SIGABRT|innobase_get_cset_width|dtype_get_mblen|dict_mem_fill_column_struct|dict_mem_table_add_col
          octets < 1024|SIGABRT|Binlog_type_info_fixed_string::Binlog_type_info_fixed_string|Field_string::binlog_type_info|Table_map_log_event::Table_map_log_event|MYSQL_BIN_LOG::write_table_map
          octets < 1024|SIGABRT|Binlog_type_info_fixed_string::Binlog_type_info_fixed_string|Field_string::binlog_type_info|Table_map_log_event::Table_map_log_event|THD::binlog_write_table_map
          

          Roel Roel Van de Paar added a comment - Updated versions: Bug confirmed present in: MariaDB: 10.5.27 (dbg), 10.6.20 (dbg), 10.11.10 (dbg), 11.1.7 (dbg), 11.2.6 (dbg), 11.4.4 (dbg), 11.6.2 (dbg), 11.7.0 (dbg) MySQL: 5.5.62 (dbg), 5.6.51 (dbg) Bug (or feature/syntax) confirmed not present in: MariaDB: 10.5.27 (opt), 10.6.20 (opt), 10.11.10 (opt), 11.1.7 (opt), 11.2.6 (opt), 11.4.4 (opt), 11.6.2 (opt), 11.7.0 (opt) MySQL: 5.5.62 (opt), 5.6.51 (opt), 5.7.44 (dbg), 5.7.44 (opt), 8.0.36 (dbg), 8.0.36 (opt) Stacks/UniqueID's observed, one per line: *mbmaxlen < 5|SIGABRT|innobase_get_cset_width|dtype_get_mblen|dict_mem_fill_column_struct|dict_mem_table_add_col octets < 1024|SIGABRT|Binlog_type_info_fixed_string::Binlog_type_info_fixed_string|Field_string::binlog_type_info|Table_map_log_event::Table_map_log_event|MYSQL_BIN_LOG::write_table_map octets < 1024|SIGABRT|Binlog_type_info_fixed_string::Binlog_type_info_fixed_string|Field_string::binlog_type_info|Table_map_log_event::Table_map_log_event|THD::binlog_write_table_map

          People

            bar Alexander Barkov
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.