• unknown's avatar
    Bug#32528 Global read lock with a low priority write lock causes a server crash · 719e64e4
    unknown authored
    FLUSH TABLES WITH READ LOCK fails to properly detect write locked
    tables when running under low priority updates.
    
    The problem is that when trying to aspire a global read lock, the
    reload_acl_and_cache() function fails to properly check if the thread
    has a low priority write lock, which later my cause a server crash or
    deadlock.
    
    The solution is to simple check if the thread has any type of the
    possible exclusive write locks.
    
    
    mysql-test/r/flush.result:
      Add test case result for Bug#32528
    mysql-test/t/flush.test:
      Add test case for Bug#32528
    sql/sql_parse.cc:
      Although it should not matter under LOCK TABLES, use TL_WRITE_ALLOW_WRITE
      to emphasize that it should fail in case of any write lock.
    719e64e4
flush.test 3.38 KB