-
unknown authored
Reseting the query cache by issuing a SET GLOBAL query_cache_size=0 caused the server to crash if a the server concurrently was saving a new result set to the query cache. The reason for this was that the invalidation wasn't waiting on the result writers to release the block level locks on the query cache. mysql-test/r/query_cache.result: Added test for verifying that 'SET query_cache_size= 0' while inserting new statements into the query cache won't cause the server to crash. mysql-test/t/query_cache.test: Added test for verifying that 'SET query_cache_size= 0' while inserting new statements into the query cache won't cause the server to crash. sql/sql_cache.cc: - Applying a block level lock iteration of all query-type blocks prevents writers and readers from crashing when the query cache is removed.
a3561354