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

InnoDB: Failing assertion: idlen <= MAX_TABLE_NAME_LEN upon long partition name with innodb_file_per_table OFF

    XMLWordPrintable

    Details

      Description

      Note: I am not sure running with innodb_file_per_table=0 even makes any sense in these days, and in the combination with the long weird partition name it makes the failure rather theoretical. Filing as a subproduct of an exercise suggested by Marko.

      --source include/have_innodb.inc
      --source include/have_partition.inc
       
      set @per_table= @@innodb_file_per_table;
       
      set global innodb_file_per_table= 0;
      create table t1 (a int) engine=InnoDB partition by range (a) (partition `x$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$` values less than (10));
       
      # Cleanup
      drop table t1;
      set global innodb_file_per_table= @per_table;
      

      10.5 9c55f83e

      2020-06-06 01:28:40 0x7f4214252700  InnoDB: Assertion failure in file /data/src/10.5/storage/innobase/handler/ha_innodb.cc line 3101
      InnoDB: Failing assertion: idlen <= MAX_TABLE_NAME_LEN
       
      #6  0x00005606b7dd5130 in ut_dbg_assertion_failed (expr=0x5606b843dca8 "idlen <= MAX_TABLE_NAME_LEN", file=0x5606b843c028 "/data/src/10.5/storage/innobase/handler/ha_innodb.cc", line=3101) at /data/src/10.5/storage/innobase/ut/ut0dbg.cc:60
      #7  0x00005606b7b2fd7b in innobase_convert_identifier (buf=0x7f421424da27 "", buflen=313, id=0x7f421424de95 "t1#P#x@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@002"..., idlen=321, thd=0x7f41e4000b18) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:3101
      #8  0x00005606b7b2ff6e in innobase_convert_name (buf=0x7f421424da20 "`test`.", buflen=320, id=0x7f421424de90 "test/t1#P#x@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@002"..., idlen=326, thd=0x7f41e4000b18) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:3145
      #9  0x00005606b7b44a03 in create_table_info_t::create_foreign_keys (this=0x7f421424de30) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:12214
      #10 0x00005606b7b462e3 in create_table_info_t::create_table (this=0x7f421424de30, create_fk=true) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:12700
      #11 0x00005606b7b5e036 in ha_innobase::create (this=0x7f41e40086c0, name=0x7f421424e5f0 "./test/t1#P#x@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0"..., form=0x7f421424e8c0, create_info=0x7f4214250b00, file_per_table=false, trx=0x7f42155013a0) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:13148
      #12 0x00005606b7b47159 in ha_innobase::create (this=0x7f41e40086c0, name=0x7f421424e5f0 "./test/t1#P#x@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0"..., form=0x7f421424e8c0, create_info=0x7f4214250b00) at /data/src/10.5/storage/innobase/handler/ha_innodb.cc:13201
      #13 0x00005606b76e9d2e in handler::ha_create (this=0x7f41e40086c0, name=0x7f421424e5f0 "./test/t1#P#x@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0024@0"..., form=0x7f421424e8c0, info_arg=0x7f4214250b00) at /data/src/10.5/sql/handler.cc:4912
      #14 0x00005606b7a36985 in ha_partition::create (this=0x7f41e40f9870, name=0x7f42142506b0 "./test/t1", table_arg=0x7f421424e8c0, create_info=0x7f4214250b00) at /data/src/10.5/sql/ha_partition.cc:793
      #15 0x00005606b76e9d2e in handler::ha_create (this=0x7f41e40f9870, name=0x7f42142506b0 "./test/t1", form=0x7f421424e8c0, info_arg=0x7f4214250b00) at /data/src/10.5/sql/handler.cc:4912
      #16 0x00005606b76eb52a in ha_create_table (thd=0x7f41e4000b18, path=0x7f42142506b0 "./test/t1", db=0x7f41e4014228 "test", table_name=0x7f41e4013b20 "t1", create_info=0x7f4214250b00, frm=0x7f42142506a0) at /data/src/10.5/sql/handler.cc:5376
      #17 0x00005606b747a141 in create_table_impl (thd=0x7f41e4000b18, orig_db=..., orig_table_name=..., db=..., table_name=..., path=0x7f42142506b0 "./test/t1", options=..., create_info=0x7f4214250b00, alter_info=0x7f4214250a30, create_table_mode=0, is_trans=0x7f421425090e, key_info=0x7f4214250690, key_count=0x7f4214250684, frm=0x7f42142506a0) at /data/src/10.5/sql/sql_table.cc:5188
      #18 0x00005606b747a587 in mysql_create_table_no_lock (thd=0x7f41e4000b18, db=0x7f41e4013b70, table_name=0x7f41e4013b80, create_info=0x7f4214250b00, alter_info=0x7f4214250a30, is_trans=0x7f421425090e, create_table_mode=0, table_list=0x7f41e4013b58) at /data/src/10.5/sql/sql_table.cc:5275
      #19 0x00005606b747a989 in mysql_create_table (thd=0x7f41e4000b18, create_table=0x7f41e4013b58, create_info=0x7f4214250b00, alter_info=0x7f4214250a30) at /data/src/10.5/sql/sql_table.cc:5364
      #20 0x00005606b748e08d in Sql_cmd_create_table_like::execute (this=0x7f41e4013af8, thd=0x7f41e4000b18) at /data/src/10.5/sql/sql_table.cc:11888
      #21 0x00005606b738e731 in mysql_execute_command (thd=0x7f41e4000b18) at /data/src/10.5/sql/sql_parse.cc:5950
      #22 0x00005606b7394a65 in mysql_parse (thd=0x7f41e4000b18, rawbuf=0x7f41e4013950 "create table t1 (a int) engine=InnoDB partition by range (a) (partition `x", '$' <repeats 63 times>, "` values less than (10))", length=161, parser_state=0x7f4214251520, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:7992
      #23 0x00005606b7380deb in dispatch_command (command=COM_QUERY, thd=0x7f41e4000b18, packet=0x7f41e41b1789 "create table t1 (a int) engine=InnoDB partition by range (a) (partition `x", '$' <repeats 63 times>, "` values less than (10))", packet_length=161, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1875
      #24 0x00005606b737f523 in do_command (thd=0x7f41e4000b18) at /data/src/10.5/sql/sql_parse.cc:1356
      #25 0x00005606b7523e13 in do_handle_one_connection (connect=0x5606bb8390a8, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1411
      #26 0x00005606b7523b7b in handle_one_connection (arg=0x5606bb8390a8) at /data/src/10.5/sql/sql_connect.cc:1313
      #27 0x00005606b7a5b124 in pfs_spawn_thread (arg=0x5606bb721598) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #28 0x00007f421cc534a4 in start_thread (arg=0x7f4214252700) at pthread_create.c:456
      #29 0x00007f421ad87d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible with both release- and debug builds, also on older 10.5 (tried 10.5.1).
      Not reproducible on 10.4.

      With innodb_file_per_table=1 all 10.x versions return ER_CANT_CREATE_TABLE:
      10.1: errno: -1 "Internal error < 0 (Not system error)"
      10.2+: errno: 168 "Unknown (generic) error from engine".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marko Marko Mäkelä
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: