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

DISCARD TABLESPACE fails with assertion on MDL

    XMLWordPrintable

Details

    Description

      Reproduce

      --source include/have_innodb.inc
      create or replace table t1 (a int) engine innodb;
      lock tables t1 write;
      alter table t1 discard tablespace;
      drop table t1;
      

      Result

      #12 0x00007b1601239206 in __assert_fail (assertion=0x57a025f967de "thd->mdl_context.is_lock_owner(MDL_key::TABLE, share->db.str, share->table_name.str, MDL_EXCLUSIVE)", file=0x57a025eca8dd "../src/sql/table_cache.cc", line=1277, function=0x57a025f96842 "void TDC_element::flush(THD *, bool)") at ./assert/assert.c:101
      #13 0x000057a026ebcc36 in TDC_element::flush (this=0x7b15c4119768, thd=0x7b15c4000d58, mark_flushed=true) at ../src/sql/table_cache.cc:1275
      #14 0x000057a026c5d6d2 in mysql_discard_or_import_tablespace (thd=0x7b15c4000d58, table_list=0x7b15c4014258, discard=true) at ../src/sql/sql_table.cc:5758
      #15 0x000057a026d5c070 in Sql_cmd_discard_import_tablespace::execute (this=0x7b15c4014970, thd=0x7b15c4000d58) at ../src/sql/sql_alter.cc:739
      #16 0x000057a026b189fd in mysql_execute_command (thd=0x7b15c4000d58, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:5803
      #17 0x000057a026b0a4b0 in mysql_parse (thd=0x7b15c4000d58, rawbuf=0x7b15c4014170 "alter table t1 discard tablespace", length=33, parser_state=0x7b15f42581e8) at ../src/sql/sql_parse.cc:7815
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              midenok Aleksey Midenkov
              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.