Skip to content

Commit

Permalink
MDEV-5924 MariaDB could crash after changing the query_cache size wit…
Browse files Browse the repository at this point in the history
…h SET GLOBAL

* remove incorrect assertion (it didn't take into account concurrent clients)
* fix the comment
  • Loading branch information
Sergei Golubchik committed Jul 29, 2014
1 parent 6ef1397 commit c1c6f6f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sql/sql_cache.cc
Expand Up @@ -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.
Expand All @@ -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;

Expand Down

0 comments on commit c1c6f6f

Please sign in to comment.