• dlenev@mockturtle.local's avatar
    Fix for bug #25044 "ALTER TABLE ... ENABLE KEYS acquires global 'opening · 7b1a94ef
    dlenev@mockturtle.local authored
    tables' lock."
    
    Execution of ALTER TABLE ... ENABLE KEYS on a table (which can take rather
    long time) prevented concurrent execution of all statements using tables.
    
    The problem was caused by the fact that we were holding LOCK_open mutex
    during whole duration of this statement and particularly during call
    to handler::enable_indexes(). This behavior was introduced as part of the
    fix for bug 14262 "SP: DROP PROCEDURE|VIEW (maybe more) write to binlog
    too late (race cond)"
    
    The patch simply restores old behavior. Note that we can safely do this as
    this operation takes exclusive lock (similar to name-lock) which blocks both
    DML and DDL on the table being altered.
    
    It also introduces mysql-test/include/wait_show_pattern.inc helper script
    which is used to make test-case for this bug robust enough.
    7b1a94ef
alter_table-big.result 632 Bytes