summaryrefslogtreecommitdiff
path: root/sql/net_serv.cc
diff options
context:
space:
mode:
authorkostja@bodhi.local <>2006-08-30 03:00:19 +0400
committerkostja@bodhi.local <>2006-08-30 03:00:19 +0400
commitebb70704303ef3f7e227e8102d8eb4b466bdd9e4 (patch)
tree844b46ab5d82eec374f925e63be3812e697f87e3 /sql/net_serv.cc
parent0368914b9a22891e9eac2b8a77dfbe43ea80c820 (diff)
parent3bf609b7f2b73555b1e241dc7c354818b0bbbc5a (diff)
downloadmariadb-git-ebb70704303ef3f7e227e8102d8eb4b466bdd9e4.tar.gz
Merge bodhi.local:/opt/local/work/mysql-5.0-runtime-safemerge
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
Diffstat (limited to 'sql/net_serv.cc')
-rw-r--r--sql/net_serv.cc17
1 files changed, 11 insertions, 6 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 03164827e8f..a44e07bbb86 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -95,8 +95,11 @@ extern uint test_flags;
extern ulong bytes_sent, bytes_received, net_big_packet_count;
extern pthread_mutex_t LOCK_bytes_sent , LOCK_bytes_received;
#ifndef MYSQL_INSTANCE_MANAGER
-extern void query_cache_insert(NET *net, const char *packet, ulong length);
+#ifdef HAVE_QUERY_CACHE
#define USE_QUERY_CACHE
+extern void query_cache_init_query(NET *net);
+extern void query_cache_insert(NET *net, const char *packet, ulong length);
+#endif // HAVE_QUERY_CACHE
#define update_statistics(A) A
#endif /* MYSQL_INSTANCE_MANGER */
#endif /* defined(MYSQL_SERVER) && !defined(MYSQL_INSTANCE_MANAGER) */
@@ -132,7 +135,11 @@ my_bool my_net_init(NET *net, Vio* vio)
net->compress=0; net->reading_or_writing=0;
net->where_b = net->remain_in_buf=0;
net->last_errno=0;
- net->query_cache_query=0;
+#ifdef USE_QUERY_CACHE
+ query_cache_init_query(net);
+#else
+ net->query_cache_query= 0;
+#endif
net->report_error= 0;
if (vio != 0) /* If real connection */
@@ -551,10 +558,8 @@ net_real_write(NET *net,const char *packet,ulong len)
my_bool net_blocking = vio_is_blocking(net->vio);
DBUG_ENTER("net_real_write");
-#if defined(MYSQL_SERVER) && defined(HAVE_QUERY_CACHE) \
- && !defined(MYSQL_INSTANCE_MANAGER)
- if (net->query_cache_query != 0)
- query_cache_insert(net, packet, len);
+#if defined(MYSQL_SERVER) && defined(USE_QUERY_CACHE)
+ query_cache_insert(net, packet, len);
#endif
if (net->error == 2)