• Aleksey Midenkov's avatar
    MDEV-18154 Deadlock and assertion upon no-op ALTER under LOCK TABLES · 22914ec7
    Aleksey Midenkov authored
    1. Fix DBUG_ASSERT(!table->pos_in_locked_tables) in tc_release_table();
    2. Fix access of prematurely freed MDL_ticket: don't close ticket if table was not closed;
    3. Fix deadlock after erroneous ALTER.
    
    mysql_alter_table() leaves dirty table->m_needs_reopen in case of
    error exit which then incorrectly treated by mysql_lock_tables().
    22914ec7
alter_table.result 85.2 KB