• unknown's avatar
    MDEV-4506: Parallel replication · c90f4f02
    unknown authored
    MDEV-5217: Unlock of de-allocated mutex
    
    There was a race in the code for wait_for_commit::wakeup().
    
    Since the waiter does a dirty read of the waiting_for_commit
    flag, it was possible for the waiter to complete and deallocate
    the wait_for_commit object while the waitee was still running
    inside wakeup(). This would cause the waitee to access invalid
    memory.
    
    Fixed by putting an extra lock/unlock in the destructor for
    wait_for_commit, to ensure that waitee has finished with the
    object before it is deallocated.
    c90f4f02
sql_class.cc 171 KB