diff options
Diffstat (limited to '')
-rw-r--r-- | sql/sql_cache.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index b284189d..34d063fc 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -2530,14 +2530,9 @@ void Query_cache::destroy() void Query_cache::disable_query_cache(THD *thd) { + lock(thd); m_cache_status= DISABLE_REQUEST; - /* - If there is no requests in progress try to free buffer. - try_lock(TRY) will exit immediately if there is lock. - unlock() should free block. - */ - if (m_requests_in_progress == 0 && !try_lock(thd, TRY)) - unlock(); + unlock(); } |