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

Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->s->db.str, table->s->table_name.str, MDL_SHARED)' failed in close_thread_table

Details

    Description

      --source include/galera_cluster.inc
      CREATE TABLE t (a CHAR(1) KEY);
      START TRANSACTION;
      HANDLER t OPEN;
      --disconnect node_1
      

      Leads to

      mysqld: /home/sciascid/Workspace/src/mariadb-server-test/sql/sql_base.cc:1054: void close_thread_table(THD*, TABLE**): Assertion `thd->mdl_context.is_lock_owner(MDL_key::TABLE, table->s->db.str, table->s->table_name.str, MDL_SHARED)' failed.
      

      Attachments

        Activity

          sciascid Daniele Sciascia added a comment - - edited

          This bug is not XA specific. The same reproduces on 10.4 as well, using regular transactions:

          CREATE TABLE t (a CHAR(1) KEY);
          START TRANSACTION;
          HANDLER t OPEN;
          

          The above fails in the exact same way.

          sciascid Daniele Sciascia added a comment - - edited This bug is not XA specific. The same reproduces on 10.4 as well, using regular transactions: CREATE TABLE t (a CHAR(1) KEY); START TRANSACTION; HANDLER t OPEN; The above fails in the exact same way.

          Confirmed not present in CS nor MS.

          Roel Roel Van de Paar added a comment - Confirmed not present in CS nor MS.
          Roel Roel Van de Paar added a comment - - edited

          This does not crash in ES without Galera.

          10.6.8-4 fe635c6c7a7e835f4a55fe1b23820dd14a647344 (Debug)

          10.6.8-dbg>CREATE TABLE t (a CHAR(1) KEY);
          Query OK, 0 rows affected (0.017 sec)
           
          10.6.8-dbg>START TRANSACTION;
          Query OK, 0 rows affected (0.000 sec)
           
          10.6.8-dbg>HANDLER t OPEN;
          Query OK, 0 rows affected (0.001 sec)
          

          10.6.8-4 fe635c6c7a7e835f4a55fe1b23820dd14a647344 (Debug)

          10.6.8-dbg>CREATE TABLE t (a CHAR(1) KEY);
          Query OK, 0 rows affected (0.016 sec)
           
          10.6.8-dbg>XA START 'a';
          Query OK, 0 rows affected (0.000 sec)
           
          10.6.8-dbg>HANDLER t OPEN;
          Query OK, 0 rows affected (0.001 sec)
          

          Roel Roel Van de Paar added a comment - - edited This does not crash in ES without Galera. 10.6.8-4 fe635c6c7a7e835f4a55fe1b23820dd14a647344 (Debug) 10.6.8-dbg>CREATE TABLE t (a CHAR(1) KEY); Query OK, 0 rows affected (0.017 sec)   10.6.8-dbg>START TRANSACTION; Query OK, 0 rows affected (0.000 sec)   10.6.8-dbg>HANDLER t OPEN; Query OK, 0 rows affected (0.001 sec) 10.6.8-4 fe635c6c7a7e835f4a55fe1b23820dd14a647344 (Debug) 10.6.8-dbg>CREATE TABLE t (a CHAR(1) KEY); Query OK, 0 rows affected (0.016 sec)   10.6.8-dbg>XA START 'a'; Query OK, 0 rows affected (0.000 sec)   10.6.8-dbg>HANDLER t OPEN; Query OK, 0 rows affected (0.001 sec)
          janlindstrom Jan Lindström added a comment - https://github.com/MariaDB/server/pull/2587
          sysprg Julius Goryavsky added a comment - Fix merged with head revision, https://github.com/MariaDB/server/commit/feeeacc4d747868c234425dc12c157c6e5fa8fbb

          People

            sysprg Julius Goryavsky
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            5 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.