1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for bug lp:1039277 "Crash in sql_cache.cc".

The crash happend when combining query cache, prepared statements and using a read only cursor.

sql/sql_cache.cc:
  Fixed unlikely error when one adjust query cache size in middle of operation
sql/sql_cursor.cc:
  Disable query cache when using cursors. This fixed lp:1039277
tests/mysql_client_test.c:
  Test case for lp:1039277
This commit is contained in:
Michael Widenius
2012-08-21 08:46:32 +03:00
parent 75e8ce6d73
commit a45c451e40
3 changed files with 52 additions and 0 deletions

View File

@ -1813,7 +1813,10 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
goto err;
if (query_cache_size == 0)
{
thd->query_cache_is_applicable= 0; // Query can't be cached
goto err_unlock;
}
Query_cache_block *query_block;
if (thd->variables.query_cache_strip_comments)