• gkodinov/kgeorge@magare.gmz's avatar
    Bug #29644: alter table hangs if records locked in share mode · 174dcb07
    gkodinov/kgeorge@magare.gmz authored
    by long running transaction
    
    On Windows opened files can't be deleted. There was a special
    upgraded lock mode (TL_WRITE instead of TL_WRITE_ALLOW_READ) 
    in ALTER TABLE to make sure nobody has the table opened
    when deleting the old table in ALTER TABLE. This special mode
    was causing ALTER TABLE to hang waiting on a lock inside InnoDB.
    This special lock is no longer necessary as the server is 
    closing the tables it needs to delete in ALTER TABLE.
    Fixed by removing the special lock.
    Note that this also reverses the fix for bug 17264 that deals with
    another consequence of this special lock mode being used.
    174dcb07
ha_innodb.cc 214 KB