summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-01-22 09:22:26 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-01-22 09:22:26 -0200
commit6157433b2ad450bc8f8d2e84eca86f64b0cf6616 (patch)
treed963cae6e8e386289ad1e7e15e7f258014bd699f /sql/sql_cache.cc
parent4562b69fedb26a5095f45dbe0441c952aa09001c (diff)
parentecfdc3560c1e20c673337420761fa11c084ed2d8 (diff)
downloadmariadb-git-6157433b2ad450bc8f8d2e84eca86f64b0cf6616.tar.gz
Merge test case of Bug#40264 to mysql-5.1-bugteam
sql/sql_cache.cc: Assert that results are always complete.
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 5e098edbd7f..7c97ee4cf32 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -781,6 +781,9 @@ void query_cache_end_of_result(THD *thd)
if (thd->net.query_cache_query == 0)
DBUG_VOID_RETURN;
+ /* Ensure that only complete results are cached. */
+ DBUG_ASSERT(thd->main_da.is_eof());
+
if (thd->killed)
{
query_cache_abort(&thd->net);