summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <petr@mysql.com>2004-11-06 02:14:56 +0300
committerunknown <petr@mysql.com>2004-11-06 02:14:56 +0300
commit4f32ec18822f90ff118f4cbe655b80f977d7077f (patch)
tree8d01854a219c3f5156c99ba00a3f942fb8adc0c0 /sql
parent5a7c108556ad10b3a81ed131737f816d4dacdbb6 (diff)
downloadmariadb-git-4f32ec18822f90ff118f4cbe655b80f977d7077f.tar.gz
fix for the IM linking problem
BitKeeper/etc/ignore: Added mysql-5.0.2-alpha.tar.gz server-tools/instance-manager/client.c server-tools/instance-manager/client_settings.h server-tools/instance-manager/errmsg.c to the ignore list server-tools/instance-manager/instance_map.cc: Comment updated server-tools/instance-manager/priv.cc: added variables needed by net_serv.cc server-tools/instance-manager/priv.h: declared variables needed by net_serv.cc sql/net_serv.cc: added some IM-specific defines
Diffstat (limited to 'sql')
-rw-r--r--sql/net_serv.cc25
1 files changed, 10 insertions, 15 deletions
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 0a728440e4d..ed4cc6a5942 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -78,11 +78,11 @@ my_bool net_flush(NET *net);
can't normally do this the client should have a bigger max_allowed_packet.
*/
-#if (defined(__WIN__) || (!defined(MYSQL_SERVER) && !defined(MYSQL_INSTANCE_MANAGER)))
+#if defined(__WIN__) || !defined(MYSQL_SERVER)
/* The following is because alarms doesn't work on windows. */
#define NO_ALARM
#endif
-
+
#ifndef NO_ALARM
#include "my_pthread.h"
void sql_print_error(const char *format,...);
@@ -93,7 +93,6 @@ void sql_print_error(const char *format,...);
#include "thr_alarm.h"
#ifdef MYSQL_SERVER
-#define USE_QUERY_CACHE
/*
The following variables/functions should really not be declared
extern, but as it's hard to include mysql_priv.h here, we have to
@@ -102,9 +101,14 @@ void sql_print_error(const char *format,...);
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);
+#define USE_QUERY_CACHE
#define update_statistics(A) A
-#else
+#endif /* MYSQL_INSTANCE_MANGER */
+#endif /* defined(MYSQL_SERVER) && !defined(MYSQL_INSTANCE_MANAGER) */
+
+#if !defined(MYSQL_SERVER) || defined(MYSQL_INSTANCE_MANAGER)
#define update_statistics(A)
#define thd_increment_bytes_sent()
#endif
@@ -453,7 +457,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)
+#if defined(MYSQL_SERVER) && defined(HAVE_QUERY_CACHE) \
+ && !defined(MYSQL_INSTANCE_MANAGER)
if (net->query_cache_query != 0)
query_cache_insert(net, packet, len);
#endif
@@ -663,13 +668,6 @@ static my_bool my_net_skip_rest(NET *net, uint32 remain, thr_alarm_t *alarmed,
}
#endif /* NO_ALARM */
-/*
- If we are inside of the instance manageer, we need to simulate mysql
- server for the following function.
-*/
-#ifdef MYSQL_INSTANCE_MANAGER
-#define MYSQL_SERVER
-#endif
/*
Reads one packet to net->buff + net->where_b
@@ -859,9 +857,6 @@ end:
return(len);
}
-#ifdef MYSQL_INSTANCE_MANAGER
-#undef MYSQL_SERVER
-#endif
/*
Read a packet from the client/server and return it without the internal