• Sergei Golubchik's avatar
    MDEV-5405 RQG induced crash in mi_assign_to_key_cache in safe mutex unlock · b4dd13b5
    Sergei Golubchik authored
    if two threads were calling mi_assign_to_key_cache() for the same table,
    one could change share->key_cache while the other was having
    share->key_cache->op_lock locked. The other thread would crash then,
    trying to unlock share->key_cache->op_lock (because it would be a different mutex).
    
    fixed by caching the value of share->key_cache in a local variable. The thread can still
    call flush_key_blocks() for an unassigned keycache, but it's harmless.
    b4dd13b5
mi_keycache.c 5.62 KB