1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
WL#1246 (Query cache in embedded library)
Some fixes after testing


libmysqld/emb_qcache.cc:
  code added to check if the recordset has no rows
sql/sql_cache.cc:
  this code should not work if the query isn't cacheable
This commit is contained in:
unknown
2004-01-07 16:41:09 +04:00
parent fae79aeca5
commit 902c361910
2 changed files with 28 additions and 12 deletions

View File

@ -653,10 +653,6 @@ void query_cache_abort(NET *net)
void query_cache_end_of_result(THD *thd)
{
DBUG_ENTER("query_cache_end_of_result");
#ifdef EMBEDDED_LIBRARY
query_cache_insert(&thd->net, (byte*)thd,
emb_count_querycache_size(thd));
#endif
#ifndef DBUG_OFF
// Check if we have called query_cache.wreck() (which disables the cache)
@ -665,6 +661,10 @@ void query_cache_end_of_result(THD *thd)
if (thd->net.query_cache_query != 0) // Quick check on unlocked structure
{
#ifdef EMBEDDED_LIBRARY
query_cache_insert(&thd->net, (byte*)thd,
emb_count_querycache_size(thd));
#endif
STRUCT_LOCK(&query_cache.structure_guard_mutex);
Query_cache_block *query_block = ((Query_cache_block*)
thd->net.query_cache_query);