diff options
author | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-01-22 08:28:01 -0200 |
---|---|---|
committer | Davi Arnaut <Davi.Arnaut@Sun.COM> | 2009-01-22 08:28:01 -0200 |
commit | ecfdc3560c1e20c673337420761fa11c084ed2d8 (patch) | |
tree | f51942abc6312aa29e64b57ebda8c11b8278ccd6 /mysql-test/r/query_cache_notembedded.result | |
parent | bdec5458aebded82d52cb535810ad73be244b690 (diff) | |
download | mariadb-git-ecfdc3560c1e20c673337420761fa11c084ed2d8.tar.gz |
Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit
The problem is that the query cache was storing partial results
if the statement failed when sending the results to the client.
This could cause clients to hang when trying to read the results
from the cache as they would, for example, wait indefinitely for
a eof packet that wasn't saved.
The solution is to always discard the caching of a query that
failed to send its results to the associated client.
mysql-test/r/query_cache_notembedded.result:
Add test case result for Bug#40264
mysql-test/t/query_cache_notembedded.test:
Add test case for Bug#40264
sql/sql_cache.cc:
Abort if a unreported error was raised.
Diffstat (limited to 'mysql-test/r/query_cache_notembedded.result')
-rw-r--r-- | mysql-test/r/query_cache_notembedded.result | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result index 8e5df012cfb..bf582bfaec6 100644 --- a/mysql-test/r/query_cache_notembedded.result +++ b/mysql-test/r/query_cache_notembedded.result @@ -345,3 +345,19 @@ id drop table t1; drop function f1; set GLOBAL query_cache_size=0; +DROP TABLE IF EXISTS t1; +FLUSH STATUS; +SET GLOBAL query_cache_size=1048576; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +LOCK TABLES t1 WRITE; +SELECT * FROM t1; +UNLOCK TABLES; +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +DROP TABLE t1; +SET GLOBAL query_cache_size= default; |