• svoj@mysql.com/june.mysql.com's avatar
    BUG#28574 - repair table causes queries to fail with various · 0478ef18
    svoj@mysql.com/june.mysql.com authored
                corruption errors: 126,134,145
    
    When one thread attempts to lock two (or more) tables and another
    thread executes statement that aborts these locks (e.g. REPAIR
    TABLE) we may get a table object with wrong lock type in a table
    cache.
    
    For example if SELECT FROM t1,t2 was aborted, subsequent INSERT
    INTO t1 may be executed under read lock.
    
    As a result we may get various table corruptions and even a server
    crash.
    
    This is fixed by resetting lock type in case lock was aborted by
    another thread.
    
    I failed to create reasonable test case for this bug.
    0478ef18
lock.cc 34.3 KB