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

InnoDB: Failing assertion: table2 == NULL in dict_sys_t::add

    XMLWordPrintable

Details

    Description

      Whilst this 10.6 regression seems insignificant at first, optimized builds crash, and I am not sure if the underlying issue may cause problems with upgrades or data dump loads (given the #mysql50# syntax). Feel free to adjust prio if deemed unimportant.

      SET @@character_set_client=swe7;
      CREATE TABLE `#mysql50#abc``def`(id INT) ENGINE=InnoDB;
      

      Or

      SET @@character_set_client=swe7;
      CREATE TABLE `#mysql50#c@d`(a INT) ENGINE=InnoDB;
      

      Leads to:

      10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Debug)

      InnoDB: Failing assertion: table2 == NULL
      

      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 0x14f33c1ac700 (LWP 2417645))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014f351653859 in __GI_abort () at abort.c:79
      #2  0x0000556302a1278b in ut_dbg_assertion_failed (expr=expr@entry=0x556303064a2d "table2 == NULL", file=file@entry=0x556303063200 "/test/10.6_dbg/storage/innobase/dict/dict0dict.cc", line=line@entry=1215) at /test/10.6_dbg/storage/innobase/ut/ut0dbg.cc:60
      #3  0x0000556302aed022 in dict_sys_t::add (this=this@entry=0x556303661c80 <dict_sys>, table=0x14f30002a6c8) at /test/10.6_dbg/storage/innobase/dict/dict0dict.cc:1215
      #4  0x0000556302ae320f in dict_table_t::add_to_cache (this=<optimized out>) at /test/10.6_dbg/storage/innobase/dict/dict0dict.cc:1196
      #5  0x0000556302af98c8 in dict_load_table_one (name=@0x14f33c1a85d0: {data_ = 0x14f30001d238 "test/abcédef", size_ = 13}, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_DROP, fk_tables=std::deque with 0 elements) at /test/10.6_dbg/storage/innobase/dict/dict0load.cc:2352
      #6  0x0000556302afa625 in dict_sys_t::load_table (this=this@entry=0x556303661c80 <dict_sys>, name=@0x14f33c1a85d0: {data_ = 0x14f30001d238 "test/abcédef", size_ = 13}, ignore=ignore@entry=DICT_ERR_IGNORE_DROP) at /test/10.6_dbg/storage/innobase/dict/dict0load.cc:2511
      #7  0x0000556302ae32be in dict_table_open_on_name (table_name=<optimized out>, dict_locked=dict_locked@entry=1, try_drop=try_drop@entry=0, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_DROP) at /test/10.6_dbg/include/span.h:66
      #8  0x0000556302ad6c2b in dict_build_index_def_step (node=0x14f300020dd8, thr=0x14f3000214b0) at /test/10.6_dbg/storage/innobase/dict/dict0crea.cc:655
      #9  dict_create_index_step (thr=thr@entry=0x14f3000214b0) at /test/10.6_dbg/storage/innobase/dict/dict0crea.cc:1188
      #10 0x00005563028e5f43 in que_thr_step (thr=0x14f3000214b0) at /test/10.6_dbg/storage/innobase/que/que0que.cc:663
      #11 que_run_threads_low (thr=0x14f3000214b0) at /test/10.6_dbg/storage/innobase/que/que0que.cc:709
      #12 que_run_threads (thr=thr@entry=0x14f3000214b0) at /test/10.6_dbg/storage/innobase/que/que0que.cc:729
      #13 0x000055630294ef7b in row_create_index_for_mysql (index=<optimized out>, trx=0x14f3504aa290, field_lengths=field_lengths@entry=0x0, mode=FIL_ENCRYPTION_DEFAULT, key_id=1) at /test/10.6_dbg/storage/innobase/row/row0mysql.cc:2401
      #14 0x00005563027df7b5 in create_table_info_t::create_table (this=this@entry=0x14f33c1a8c30, create_fk=create_fk@entry=true) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:12489
      #15 0x00005563027e9e54 in ha_innobase::create (this=<optimized out>, name=0x14f33c1aa670 "./test/abcédef", form=<optimized out>, create_info=0x14f33c1aaba0, file_per_table=<optimized out>, trx=0x14f3504aa290, trx@entry=0x0) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:13021
      #16 0x00005563027e0079 in ha_innobase::create (this=<optimized out>, name=<optimized out>, form=<optimized out>, create_info=<optimized out>) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:13056
      #17 0x00005563023e0217 in handler::ha_create (this=0x14f30001f4c0, name=0x14f33c1aa670 "./test/abcédef", form=form@entry=0x14f33c1a9200, info_arg=info_arg@entry=0x14f33c1aaba0) at /test/10.6_dbg/sql/handler.cc:5391
      #18 0x00005563023e0eb1 in ha_create_table (thd=thd@entry=0x14f300000db8, path=0x14f33c1aa670 "./test/abcédef", db=0x14f3000147f8 "test", table_name=0x14f3000140a0 "#mysql50#abcédef", create_info=create_info@entry=0x14f33c1aaba0, frm=frm@entry=0x14f33c1aa660, skip_frm_file=false) at /test/10.6_dbg/sql/handler.cc:5856
      #19 0x00005563021d41c7 in create_table_impl (thd=thd@entry=0x14f300000db8, ddl_log_state_create=ddl_log_state_create@entry=0x14f33c1aa900, ddl_log_state_rm=<optimized out>, ddl_log_state_rm@entry=0x14f33c1aa920, orig_db=@0x14f300014130: {str = 0x14f3000147f8 "test", length = 4}, orig_table_name=@0x14f300014140: {str = 0x14f3000140a0 "#mysql50#abcédef", length = 17}, db=@0x14f300014130: {str = 0x14f3000147f8 "test", length = 4}, table_name=@0x14f300014140: {str = 0x14f3000140a0 "#mysql50#abcédef", length = 17}, path=@0x14f33c1aa650: {str = 0x14f33c1aa670 "./test/abcédef", length = 15}, options=<optimized out>, create_info=0x14f33c1aaba0, alter_info=0x14f33c1aaab0, create_table_mode=0, is_trans=0x14f33c1aa8ff, key_info=0x14f33c1aa648, key_count=0x14f33c1aa644, frm=0x14f33c1aa660) at /test/10.6_dbg/sql/sql_table.cc:4449
      #20 0x00005563021d4794 in mysql_create_table_no_lock (thd=thd@entry=0x14f300000db8, ddl_log_state_create=ddl_log_state_create@entry=0x14f33c1aa900, ddl_log_state_rm=ddl_log_state_rm@entry=0x14f33c1aa920, db=db@entry=0x14f300014130, table_name=table_name@entry=0x14f300014140, create_info=create_info@entry=0x14f33c1aaba0, alter_info=0x14f33c1aaab0, is_trans=0x14f33c1aa8ff, create_table_mode=0, table_list=0x14f300014118) at /test/10.6_dbg/sql/sql_table.cc:4548
      #21 0x00005563021d4bb7 in mysql_create_table (thd=thd@entry=0x14f300000db8, create_table=create_table@entry=0x14f300014118, create_info=create_info@entry=0x14f33c1aaba0, alter_info=alter_info@entry=0x14f33c1aaab0) at /test/10.6_dbg/sql/sql_table.cc:4660
      #22 0x00005563021d6a61 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14f300000db8) at /test/10.6_dbg/sql/sql_table.cc:11770
      #23 0x0000556302104fe1 in mysql_execute_command (thd=thd@entry=0x14f300000db8) at /test/10.6_dbg/sql/sql_parse.cc:5983
      #24 0x00005563020eb890 in mysql_parse (thd=thd@entry=0x14f300000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14f33c1ab400) at /test/10.6_dbg/sql/sql_parse.cc:8016
      #25 0x00005563020fa3fa in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14f300000db8, packet=packet@entry=0x14f30000b769 "CREATE TABLE `#mysql50#abc``def`(id INT)", packet_length=packet_length@entry=40, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_class.h:1340
      #26 0x00005563020fd7da in do_command (thd=0x14f300000db8, blocking=blocking@entry=true) at /test/10.6_dbg/sql/sql_parse.cc:1406
      #27 0x0000556302261c8e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55630557f7f8, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #28 0x0000556302262293 in handle_one_connection (arg=arg@entry=0x55630557f7f8) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #29 0x0000556302710166 in pfs_spawn_thread (arg=0x556305467fb8) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #30 0x000014f351b61609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #31 0x000014f351750293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Optimized)

      InnoDB: Failing assertion: table2 == NULL
      

      10.6.2 6c39eaeb126328e7813b146ecf652d51e4508981 (Optimized)

      Core was generated by `/test/MD120621-mariadb-10.6.2-linux-x86_64-opt/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 0x1542cc6a8700 (LWP 3653270))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001542d022c859 in __GI_abort () at abort.c:79
      #2  0x00005643b6a63bc1 in ut_dbg_assertion_failed (expr=expr@entry=0x5643b766e83f "table2 == NULL", file=file@entry=0x5643b766e338 "/test/10.6_opt/storage/innobase/dict/dict0dict.cc", line=line@entry=1215) at /test/10.6_opt/storage/innobase/ut/ut0dbg.cc:60
      #3  0x00005643b6a6fe02 in dict_sys_t::add (table=0x15427c024220, this=0x5643b7c31ac0 <dict_sys>) at /test/10.6_opt/storage/innobase/dict/dict0dict.cc:1215
      #4  dict_table_t::add_to_cache (this=0x15427c024220) at /test/10.6_opt/storage/innobase/dict/dict0dict.cc:1196
      #5  0x00005643b72558ed in dict_load_table_one (name=<optimized out>, ignore_err=<optimized out>, fk_tables=<optimized out>) at /test/10.6_opt/storage/innobase/dict/dict0load.cc:2352
      #6  0x00005643b7256594 in dict_sys_t::load_table (this=this@entry=0x5643b7c31ac0 <dict_sys>, name=@0x1542cc6a4890: {data_ = 0x15427c0178e8 "test/abcédef", size_ = 13}, ignore=ignore@entry=DICT_ERR_IGNORE_DROP) at /test/10.6_opt/storage/innobase/dict/dict0load.cc:2511
      #7  0x00005643b7246ba1 in dict_table_open_on_name (table_name=0x15427c0178e8 "test/abcédef", dict_locked=dict_locked@entry=1, try_drop=try_drop@entry=0, ignore_err=ignore_err@entry=DICT_ERR_IGNORE_DROP) at /test/10.6_opt/include/span.h:66
      #8  0x00005643b7240c35 in dict_build_index_def_step (node=0x15427c019610, thr=0x15427c01be80) at /test/10.6_opt/storage/innobase/dict/dict0crea.cc:655
      #9  dict_create_index_step (thr=thr@entry=0x15427c01be80) at /test/10.6_opt/storage/innobase/dict/dict0crea.cc:1188
      #10 0x00005643b7161ae8 in que_thr_step (thr=0x15427c01be80) at /test/10.6_opt/storage/innobase/que/que0que.cc:663
      #11 que_run_threads_low (thr=<optimized out>) at /test/10.6_opt/storage/innobase/que/que0que.cc:709
      #12 que_run_threads (thr=thr@entry=0x15427c01be80) at /test/10.6_opt/storage/innobase/que/que0que.cc:729
      #13 0x00005643b718e910 in row_create_index_for_mysql (index=<optimized out>, trx=0x1542cd963120, field_lengths=field_lengths@entry=0x0, mode=FIL_ENCRYPTION_DEFAULT, key_id=<optimized out>) at /test/10.6_opt/storage/innobase/row/row0mysql.cc:2401
      #14 0x00005643b70e5ed3 in create_table_info_t::create_table (this=0x1542cc6a4e80, create_fk=<optimized out>) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:12489
      #15 0x00005643b70e9fe1 in ha_innobase::create (this=<optimized out>, name=0x1542cc6a6780 "./test/abcédef", form=<optimized out>, create_info=<optimized out>, file_per_table=<optimized out>, trx=0x1542cd963120) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:13021
      #16 0x00005643b6dc0c84 in handler::ha_create (this=<optimized out>, name=<optimized out>, form=0x1542cc6a5420, info_arg=0x1542cc6a6c70) at /test/10.6_opt/sql/handler.cc:5391
      #17 0x00005643b6dc158a in ha_create_table (thd=thd@entry=0x15427c000c58, path=<optimized out>, db=0x15427c0110b0 "test", table_name=0x15427c010958 "#mysql50#abcédef", create_info=create_info@entry=0x1542cc6a6c70, frm=frm@entry=0x1542cc6a6770, skip_frm_file=false) at /test/10.6_opt/sql/handler.cc:5856
      #18 0x00005643b6c3b8b5 in create_table_impl (thd=thd@entry=0x15427c000c58, ddl_log_state_create=ddl_log_state_create@entry=0x1542cc6a6a20, ddl_log_state_rm=<optimized out>, orig_db=@0x15427c0109e8: {str = 0x15427c0110b0 "test", length = 4}, orig_table_name=@0x15427c0109f8: {str = 0x15427c010958 "#mysql50#abcédef", length = 17}, db=@0x15427c0109e8: {str = 0x15427c0110b0 "test", length = 4}, table_name=@0x15427c0109f8: {str = 0x15427c010958 "#mysql50#abcédef", length = 17}, path=@0x1542cc6a6760: {str = 0x1542cc6a6780 "./test/abcédef", length = 15}, options={m_options = DDL_options_st::OPT_NONE}, create_info=0x1542cc6a6c70, alter_info=0x1542cc6a6b80, create_table_mode=0, is_trans=0x1542cc6a6a1f, key_info=0x1542cc6a6758, key_count=0x1542cc6a6754, frm=0x1542cc6a6770) at /test/10.6_opt/sql/sql_table.cc:4449
      #19 0x00005643b6c3c238 in mysql_create_table_no_lock (thd=thd@entry=0x15427c000c58, ddl_log_state_create=ddl_log_state_create@entry=0x1542cc6a6a20, ddl_log_state_rm=ddl_log_state_rm@entry=0x1542cc6a6a40, db=db@entry=0x15427c0109e8, table_name=table_name@entry=0x15427c0109f8, create_info=create_info@entry=0x1542cc6a6c70, alter_info=0x1542cc6a6b80, is_trans=0x1542cc6a6a1f, create_table_mode=0, table_list=0x15427c0109d0) at /test/10.6_opt/sql/sql_table.cc:4548
      #20 0x00005643b6c3c624 in mysql_create_table (thd=thd@entry=0x15427c000c58, create_table=create_table@entry=0x15427c0109d0, create_info=create_info@entry=0x1542cc6a6c70, alter_info=alter_info@entry=0x1542cc6a6b80) at /test/10.6_opt/sql/sql_table.cc:4660
      #21 0x00005643b6c3deb9 in Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x15427c000c58) at /test/10.6_opt/sql/sql_table.cc:11770
      #22 0x00005643b6b99fce in mysql_execute_command (thd=0x15427c000c58) at /test/10.6_opt/sql/sql_parse.cc:5983
      #23 0x00005643b6b8a3f4 in mysql_parse (thd=0x15427c000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:8016
      #24 0x00005643b6b96295 in dispatch_command (command=COM_QUERY, thd=0x15427c000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1340
      #25 0x00005643b6b981f7 in do_command (thd=0x15427c000c58, blocking=blocking@entry=true) at /test/10.6_opt/sql/sql_parse.cc:1406
      #26 0x00005643b6ca6057 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/10.6_opt/sql/sql_connect.cc:1410
      #27 0x00005643b6ca63bd in handle_one_connection (arg=arg@entry=0x5643b97c4248) at /test/10.6_opt/sql/sql_connect.cc:1312
      #28 0x00005643b702f8f8 in pfs_spawn_thread (arg=0x5643b9772ba8) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #29 0x00001542d073a609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x00001542d0329293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.2 (opt), 10.6.2 (dbg)

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

      Attachments

        Activity

          People

            marko Marko Mäkelä
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.