• Vladislav Vaintroub's avatar
    MDEV-3945 - do not hold LOCK_thread_count when freeing THD. · 21b4fda3
    Vladislav Vaintroub authored
      
    The patch decreases the duration of LOCK_thread_count, so it is not hold during THD destructor and freeing memory.
    This mutex  now only protects the integrity of threads list, when removing THD from it,  and thread_count variable.
      
    The add_to_status() function that updates global status during client disconnect,  is now correctly protected by the LOCK_status mutex.
    
    Benchmark : in a  "non-persistent" sysbench test (oltp_ro with reconnect after each query),  ~ 25% more connects/disconnects were measured
    21b4fda3
threadpool_common.cc 6.71 KB