• davi@mysql.com/endora.local's avatar
    Bug#31479 Bad lock interaction if CREATE TABLE LIKE is killed · bd3f76d7
    davi@mysql.com/endora.local authored
    Kill of a CREATE TABLE source_table LIKE statement waiting for a
    name-lock on the source table causes a bad lock interaction.
    
    The mysql_create_like_table() has a bug that if the connection is
    killed while waiting for the name-lock on the source table, it will
    jump to the wrong error path and try to unlock the source table and
    LOCK_open, but both weren't locked.
    
    The solution is to simple return when the name lock request is killed,
    it's safe to do so because no lock was acquired and no cleanup is needed.
    
    Original bug report also contains description of other problems
    related to this scenario but they either already fixed in 5.1 or
    will be addressed separately (see bug report for details).
    bd3f76d7
lock_multi.result 2.68 KB