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

Deadlock after concurrent DDL/DML/KILL connection

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2.24, 10.3.15, 10.4.5
    • 10.4
    • Locking
    • None

    Description

      Problem found during RQG testing.
      The output of the MTR based replay test
             Two connections run many loops containing the sequence
           DELETE FROM t0 WHERE col_int = 1 OR col_int IS NULL ; INSERT INTO t0 (col1,col2, col_int) VALUES (1,1,1) , (1,1,1) ; COMMIT ;
            DELETE FROM t0 WHERE col_int = 1 OR col_int IS NULL ; INSERT INTO t0 (col1,col2, col_int) VALUES (1,1,1) , (1,1,1) ; COMMIT ;
            ALTER TABLE t0 ADD COLUMN col_int_g_copy INTEGER GENERATED ALWAYS AS (col_int) VIRTUAL ; ALTER TABLE t0 DROP COLUMN col_int_g ; ALTER TABLE t0 CHANGE COLUMN col_int_g_copy col_int_g INTEGER GENERATED ALWAYS AS (col_int) VIRTUAL ;
         SET @kill_id =  CONNECTION_ID() ; KILL SOFT CONNECTION @kill_id ;
         
        and a third connection observes the processlist is after some first phase like
      SHOW PROCESSLIST;
      Id      User    Host    db      Command Time    State   Info    Progress
      4       root    localhost       test    Query   0       init    SHOW PROCESSLIST        0.000
      78      root    localhost       test    Query   106     Waiting for table metadata lock ALTER TABLE t0 CHANGE COLUMN col_int_g_copy col_int_g INTEGER GENERATED ALWAYS AS (col_int) VIRTUAL     0.000
      79      root    localhost       test    Query   106     Waiting for table level lock    INSERT INTO t0 (col1,col2, col_int) VALUES (1,1,1) , (1,1,1)    0.000
      ...
      SHOW PROCESSLIST;
      Id      User    Host    db      Command Time    State   Info    Progress
      4       root    localhost       test    Query   0       init    SHOW PROCESSLIST        0.000
      78      root    localhost       test    Query   115     Waiting for table metadata lock ALTER TABLE t0 CHANGE COLUMN col_int_g_copy col_int_g INTEGER GENERATED ALWAYS AS (col_int) VIRTUAL     0.000
      79      root    localhost       test    Query   115     Waiting for table level lock    INSERT INTO t0 (col1,col2, col_int) VALUES (1,1,1) , (1,1,1)    0.000
      with two connections showing no changes except raising time.
       
      10.2.24 commit 8f9c8579d0bfa12aa7966b773864d816d68be064        2019-05
      10.3.15 commit 651a43e0a0361098c35164a128ca588a2989d8e1 2019-05-07
      10.4.5 commit baadbe96019b205164167928d80e836ebbb6bcfe 2019-04-23
      

      Attachments

        Activity

          People

            wlad Vladislav Vaintroub
            mleich Matthias Leich
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.