• Dmitry Shulga's avatar
    Fixed bug#56619 - Assertion failed during · b2432ca4
    Dmitry Shulga authored
    ALTER TABLE RENAME, DISABLE KEYS.
    
    The code of ALTER TABLE RENAME, DISABLE KEYS could
    issue a commit while holding LOCK_open mutex.
    This is a regression introduced by the fix for
    Bug 54453.
    This failed an assert guarding us against a potential
    deadlock with connections trying to execute
    FLUSH TABLES WITH READ LOCK.
    
    The fix is to move acquisition of LOCK_open outside
    the section that issues ha_autocommit_or_rollback().
    LOCK_open is taken to protect against concurrent
    operations with .frms and the table definition
    cache, and doesn't need to cover the call to commit.
    
    A test case added to innodb_mysql.test.
    
    The patch is to be null-merged to 5.5, which
    already has 54453 null-merged to it.
    
    mysql-test/suite/innodb/r/innodb_mysql.result:
      Added test results for test for bug#56619.
    mysql-test/suite/innodb/t/innodb_mysql.test:
      Added test for bug#56619.
    sql/sql_table.cc:
      mysql_alter_table() modified: moved acquisition of LOCK_open
      after call to ha_autocommit_or_rollback.
    b2432ca4
innodb_mysql.test 22.7 KB