• unknown's avatar
    Bug #32436 KILL QUERY completely deadlocks mysqld · fea1524d
    unknown authored
    Sending several "KILL QUERY" statements to target a connection running
    "SELECT SLEEP" could freeze the server.
    
    The locking order in Item_func_sleep was wrong and this could lead to a
    dead lock.
    
    This patch solves the issue by resolving the locking order properly.
    
    
    sql/item_func.cc:
      - Moved LOCK_user_locks critical region so that it doesn't share space with
        mysys_var->mutex region; this can lead to deadlock.
    fea1524d
item_func.cc 137 KB