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

Hard deadlock between ALTER TABLE and INSERT

    XMLWordPrintable

Details

    Description

      Split from MDEV-36653.

      Reproducible with:

      --source include/have_debug_sync.inc
      --source include/have_metadata_lock_info.inc
       
      CREATE TABLE t1(a INT) ENGINE=Aria;
       
      connect con1, localhost, root;
      SET debug_sync='thr_multi_lock_before_thr_lock SIGNAL ready WAIT_FOR go';
      send INSERT INTO t1 VALUES(1);
       
      connection default;
      SET debug_sync='now WAIT_FOR ready';
      SET debug_sync='alter_table_inplace_before_lock_upgrade SIGNAL go';
      ALTER TABLE t1 MODIFY a INT DEFAULT NULL;
       
      connection con1;
      reap;
      disconnect con1;
       
      DROP TABLE t1;
      SET debug_sync='RESET';
      

      INSERT is waiting for thr lock on t1 held by ALTER.
      ALTER is waiting for MDL lock on t1 held by INSERT.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              svoj Sergey Vojtovich
              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.