• Aleksey Midenkov's avatar
    MDEV-28956 Locking is broken if CREATE OR REPLACE fails under LOCK TABLES · a228ec80
    Aleksey Midenkov authored
    add_back_last_deleted_lock() was called when the lock was never
    removed. Lock is removed in finalize_atomic_replace() in
    close_all_tables_for_name(). finalize_atomic_replace() is done only
    for successful operation.
    
    In non-atomic codepath it drops the table first, if anything fails
    later we don't need to return back the lock since there is no table
    now. So the fix is required as well.
    a228ec80
sql_insert.cc 183 KB