• Nikita Malyavin's avatar
    MDEV-28930 ALTER TABLE Deadlocks with parallel TL_WRITE · 2ed03a41
    Nikita Malyavin authored
    ALTER ONLINE TABLE acquires table with TL_READ. Myisam normally acquires
    TL_WRITE for DML, which makes it hang until table is freed.
    
    We deadlock once ALTER upgrades its MDL lock.
    
    Solution:
    Unlock table earlier. We don't need to hold TL_READ once we finished
    copying. Relay log replication requires no data locks on `from` table.
    2ed03a41
alter_table_online_debug.test 17.8 KB