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

Assertion `thd->mdl_context.is_lock_owner(...)` failed in close_thread_table() on ALTER TABLE vs concurrent FLUSH TABLES with two sequence defaults

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.11, 11.4, 11.8, 12.3
    • 10.11, 11.4, 11.8, 12.3
    • Sequences
    • None

    Description

       
      CREATE SEQUENCE s1;
      CREATE SEQUENCE s2;
      CREATE TABLE t1 (a INT DEFAULT NEXTVAL(s1), b INT DEFAULT NEXTVAL(s2));
       
      --connect (con1,localhost,root,,test)
      --let $i= 5
      while ($i)
      {
        --connection con1
        --send ALTER TABLE t1 FORCE
        --connection default
        FLUSH TABLES t1, s1;
        --connection con1
        --reap
        --dec $i
      }
       
      --disconnect con1
      DROP TABLE t1;
      DROP SEQUENCE s1, s2;
      

      10.11.20-MariaDB-asan-debug source revision: dad5e3c968cfd71048fff37da643bfe5733d58ff
       
      mariadbd: /10.11/src/sql/sql_base.cc:1030: 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) || thd->mdl_context.is_lock_warrantee(MDL_key::TABLE, table->s->db.str, table->s->table_name.str, MDL_SHARED)' failed.
       
      #7  close_thread_table (thd=thd@entry=0x52b00016c218, table_ptr=table_ptr@entry=0x52b00016c310) at /10.11/src/sql/sql_base.cc:1030
      #8  close_thread_tables (thd=thd@entry=0x52b00016c218) at /10.11/src/sql/sql_base.cc:1006
      #9  close_thread_tables_for_query (thd=thd@entry=0x52b00016c218) at /10.11/src/sql/sql_base.cc:815
      #10 mysql_execute_command (thd=thd@entry=0x52b00016c218, is_called_from_prepared_stmt=false) at /10.11/src/sql/sql_parse.cc:6263
      #11 mysql_parse (thd=thd@entry=0x52b00016c218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x77ffd19bd150) at /10.11/src/sql/sql_parse.cc:8219
      #12 dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x52b00016c218, packet=packet@entry=0x52900010e219 "ALTER TABLE t1 FORCE", packet_length=packet_length@entry=20, blocking=blocking@entry=true) at /10.11/src/sql/sql_parse.cc:1924
      #13 do_command (thd=thd@entry=0x52b00016c218, blocking=blocking@entry=true) at /10.11/src/sql/sql_parse.cc:1434
      #14 do_handle_one_connection (connect=<optimized out>, connect@entry=0x508000007838, put_in_cache=put_in_cache@entry=true) at /10.11/src/sql/sql_connect.cc:1501
      #15 handle_one_connection (arg=arg@entry=0x508000007838) at /10.11/src/sql/sql_connect.cc:1413
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.