diff options
author | Michael Widenius <monty@askmonty.org> | 2012-08-21 08:46:32 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-08-21 08:46:32 +0300 |
commit | a45c451e4002875187a40ec17e872d3b69a3452a (patch) | |
tree | 3b77baea158d3e2c0cc92b0f5b01bb3f7eb9ae37 /sql/sql_cache.cc | |
parent | 75e8ce6d7316900e3b9431e9d50889fe00d2928c (diff) | |
download | mariadb-git-a45c451e4002875187a40ec17e872d3b69a3452a.tar.gz |
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
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r-- | sql/sql_cache.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 7edd28446a2..191cc4e01c8 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -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) |