summaryrefslogtreecommitdiffstats
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 13:22:53 +0000
commit347c164c35eddab388009470e6848cb361ac93f8 (patch)
tree2c0c44eac690f510bb0a35b2a13b36d606b77b6b /sql/sql_cache.cc
parentReleasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff)
downloadmariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz
mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc9
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();
}