summaryrefslogtreecommitdiff
path: root/libmysqld/emb_qcache.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-09 12:35:11 +0200
commitd3e2e1243bb0dae95ce35b0380dd4f8f476b254d (patch)
tree8779ad6b2059f181770cc07e2437925d7d5d5d04 /libmysqld/emb_qcache.cc
parent229dad1f9b12f8e9f64b6a605bdf8e31c339d018 (diff)
parent124428a9e28e59f98b25d8ee07b57d264f63cbe4 (diff)
downloadmariadb-git-d3e2e1243bb0dae95ce35b0380dd4f8f476b254d.tar.gz
5.5 merge
Diffstat (limited to 'libmysqld/emb_qcache.cc')
-rw-r--r--libmysqld/emb_qcache.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc
index f1e850f4218..ccdfaf286eb 100644
--- a/libmysqld/emb_qcache.cc
+++ b/libmysqld/emb_qcache.cc
@@ -316,7 +316,8 @@ uint emb_count_querycache_size(THD *thd)
result+= field->def_length;
}
- if (thd->protocol == &thd->protocol_binary)
+ if (thd->protocol == &thd->protocol_binary ||
+ thd->get_command() == COM_STMT_EXECUTE)
{
result+= (uint) (4*n_rows);
for (; cur_row; cur_row=cur_row->next)
@@ -379,7 +380,8 @@ void emb_store_querycache_result(Querycache_stream *dst, THD *thd)
dst->store_safe_str(field->def, field->def_length);
}
- if (thd->protocol == &thd->protocol_binary)
+ if (thd->protocol == &thd->protocol_binary ||
+ thd->get_command() == COM_STMT_EXECUTE)
{
for (; cur_row; cur_row=cur_row->next)
dst->store_str((char *) cur_row->data, cur_row->length);
@@ -447,7 +449,8 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src)
data->rows= rows;
if (!rows)
goto return_ok;
- if (thd->protocol == &thd->protocol_binary)
+ if (thd->protocol == &thd->protocol_binary ||
+ thd->get_command() == COM_STMT_EXECUTE)
{
uint length;
row= (MYSQL_ROWS *)alloc_root(&data->alloc,