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

Assertion `!tdc_share_is_cached(thd, db->str, table->str)' fails in execute_drop_table

Details

    Description

      The problem may disappear after fixing MDEV-28933 (or what used to be MDEV-28933 before it was re-written), but since its fate is currently unclear, I'm filing it separately.

      --source include/have_innodb.inc
       
      CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
      CREATE TABLE t2 (b INT PRIMARY KEY) ENGINE=InnoDB;
      SET SESSION FOREIGN_KEY_CHECKS = OFF;
      ALTER TABLE t2 ADD FOREIGN KEY fk(b) REFERENCES t1 (a);
      CREATE OR REPLACE SEQUENCE t2 ENGINE=InnoDB;
       
      # Cleanup
      DROP TABLE t2, t1;
      

      bb-main-monty a71a40e919587c59603272251fbcbce46e446534

      mariadbd: /data/bld/preview-12.0-bb-main-monty-debug/sql/ddl_log.cc:1234: int execute_drop_table(THD*, handlerton*, const LEX_CSTRING*, const LEX_CSTRING*, const char*): Assertion `!tdc_share_is_cached(thd, db->str, table->str)' failed.
      250409 22:16:43 [ERROR] /share8t/bld/preview-12.0-bb-main-monty-debug/sql/mariadbd got signal 6 ;
       
      #8  0x00007f4136045395 in __assert_fail_base (fmt=0x7f41361b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x559fc4155dd8 "!tdc_share_is_cached(thd, db->str, table->str)", file=file@entry=0x559fc41556d0 "/data/bld/preview-12.0-bb-main-monty-debug/sql/ddl_log.cc", line=line@entry=1234, function=function@entry=0x559fc4155d78 "int execute_drop_table(THD*, handlerton*, const LEX_CSTRING*, const LEX_CSTRING*, const char*)") at ./assert/assert.c:92
      #9  0x00007f4136053eb2 in __GI___assert_fail (assertion=0x559fc4155dd8 "!tdc_share_is_cached(thd, db->str, table->str)", file=0x559fc41556d0 "/data/bld/preview-12.0-bb-main-monty-debug/sql/ddl_log.cc", line=1234, function=0x559fc4155d78 "int execute_drop_table(THD*, handlerton*, const LEX_CSTRING*, const LEX_CSTRING*, const char*)") at ./assert/assert.c:101
      #10 0x0000559fc3310c29 in execute_drop_table (thd=0x7f40f4000dc8, hton=0x559fd7cd7438, db=0x7f41281708b0, table=0x7f41281708c0, path=0x559fd87bc140 "./test/t2") at /data/bld/preview-12.0-bb-main-monty-debug/sql/ddl_log.cc:1234
      #11 0x0000559fc3312db8 in ddl_log_execute_action (thd=0x7f40f4000dc8, mem_root=0x7f4128170e20, ddl_log_entry=0x7f4128170e60) at /data/bld/preview-12.0-bb-main-monty-debug/sql/ddl_log.cc:1918
      #12 0x0000559fc3314d50 in ddl_log_execute_entry_no_lock (thd=0x7f40f4000dc8, first_entry=3) at /data/bld/preview-12.0-bb-main-monty-debug/sql/ddl_log.cc:2581
      #13 0x0000559fc3316250 in ddl_log_revert (thd=0x7f40f4000dc8, state=0x7f4128171290) at /data/bld/preview-12.0-bb-main-monty-debug/sql/ddl_log.cc:3117
      #14 0x0000559fc32d3f23 in mysql_create_table_no_lock (thd=0x7f40f4000dc8, ddl_log_state_create=0x7f4128171290, ddl_log_state_rm=0x7f41281712b0, create_info=0x7f4128171610, alter_info=0x7f4128171490, is_trans=0x7f4128171283, create_table_mode=0, table_list=0x7f40f4018150) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_table.cc:5403
      #15 0x0000559fc32d477e in mysql_create_table (thd=0x7f40f4000dc8, create_table=0x7f40f4018150, create_info=0x7f4128171610, alter_info=0x7f4128171490) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_table.cc:5608
      #16 0x0000559fc32eeed2 in Sql_cmd_create_table_like::execute (this=0x7f40f4018118, thd=0x7f40f4000dc8) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_table.cc:13942
      #17 0x0000559fc31a1ed6 in mysql_execute_command (thd=0x7f40f4000dc8, is_called_from_prepared_stmt=false) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_parse.cc:5887
      #18 0x0000559fc31a819d in mysql_parse (thd=0x7f40f4000dc8, rawbuf=0x7f40f4018020 "CREATE OR REPLACE SEQUENCE t2 ENGINE=InnoDB", length=43, parser_state=0x7f41281722e0) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_parse.cc:7917
      #19 0x0000559fc31943ad in dispatch_command (command=COM_QUERY, thd=0x7f40f4000dc8, packet=0x7f40f400bf79 "CREATE OR REPLACE SEQUENCE t2 ENGINE=InnoDB", packet_length=43, blocking=true) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_parse.cc:1903
      #20 0x0000559fc3192d06 in do_command (thd=0x7f40f4000dc8, blocking=true) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_parse.cc:1416
      #21 0x0000559fc33a2d83 in do_handle_one_connection (connect=0x559fd8f715e8, put_in_cache=true) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_connect.cc:1415
      #22 0x0000559fc33a2b04 in handle_one_connection (arg=0x559fd8f73748) at /data/bld/preview-12.0-bb-main-monty-debug/sql/sql_connect.cc:1327
      #23 0x0000559fc392917c in pfs_spawn_thread (arg=0x559fd8f71158) at /data/bld/preview-12.0-bb-main-monty-debug/storage/perfschema/pfs.cc:2198
      #24 0x00007f41360a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #25 0x00007f413612885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.