diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-07-29 12:05:58 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-07-29 12:05:58 +0200 |
commit | c1c6f6f161ce5f87dc78e30ce7eee615ed2b935c (patch) | |
tree | c93d76f3d035403f534c79c86b77eae2795def53 /sql/sql_cache.cc | |
parent | 6ef139780d7a6ae6ea001523b4505de6b5c3a7bc (diff) | |
download | mariadb-git-c1c6f6f161ce5f87dc78e30ce7eee615ed2b935c.tar.gz |
MDEV-5924 MariaDB could crash after changing the query_cache size with SET GLOBAL
* remove incorrect assertion (it didn't take into account concurrent clients)
* fix the comment
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index d558572f3a2..e6a795ba56e 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1669,7 +1669,7 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length) DBUG_ENTER("Query_cache::send_result_to_client"); /* - Testing 'query_cache_size' without a lock here is safe: the thing + Testing without a lock here is safe: the thing we may loose is that the query won't be served from cache, but we save on mutex locking in the case when query cache is disabled. @@ -1689,8 +1689,6 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length) goto err; } - DBUG_ASSERT(query_cache_size != 0); // otherwise cache would be disabled - thd->query_cache_is_applicable= 1; sql= org_sql; sql_end= sql + query_length; |