diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/client_settings.h | 1 | ||||
-rw-r--r-- | sql/net_serv.cc | 17 | ||||
-rw-r--r-- | sql/protocol.cc | 35 | ||||
-rw-r--r-- | sql/sql_client.cc | 2 |
4 files changed, 18 insertions, 37 deletions
diff --git a/sql/client_settings.h b/sql/client_settings.h index efae3f18a8b..b357e52ec9d 100644 --- a/sql/client_settings.h +++ b/sql/client_settings.h @@ -31,3 +31,4 @@ #define mysql_rpl_probe(mysql) 0 #undef HAVE_SMEM #undef _CUSTOMCONFIG_ + diff --git a/sql/net_serv.cc b/sql/net_serv.cc index eb4d76bbf6e..3f73825b2d8 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -30,7 +30,10 @@ 3 byte length & 1 byte package-number. */ -#ifndef EMBEDDED_LIBRARY +/* + HFTODO this must be hidden if we don't want client capabilities in + embedded library + */ #ifdef __WIN__ #include <winsock.h> #endif @@ -46,6 +49,17 @@ #include <signal.h> #include <errno.h> +#ifdef EMBEDDED_LIBRARY + +#undef net_flush + +extern "C" { +my_bool net_flush(NET *net); +} + +#endif /*EMBEDDED_LIBRARY */ + + /* The following handles the differences when this is linked between the client and the server. @@ -959,5 +973,4 @@ my_net_read(NET *net) return len; } -#endif /* EMBEDDED_LIBRARY */ diff --git a/sql/protocol.cc b/sql/protocol.cc index 1a1d1f0a585..9fc2a1a676c 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -235,7 +235,6 @@ net_printf(THD *thd, uint errcode, ...) DBUG_VOID_RETURN; } - /* Return ok to the client. @@ -350,40 +349,6 @@ send_eof(THD *thd, bool no_flush) } #endif /* EMBEDDED_LIBRARY */ - -/**************************************************************************** - Store a field length in logical packet - This is used to code the string length for normal protocol -****************************************************************************/ - -char * -net_store_length(char *pkg, ulonglong length) -{ - uchar *packet=(uchar*) pkg; - if (length < LL(251)) - { - *packet=(uchar) length; - return (char*) packet+1; - } - /* 251 is reserved for NULL */ - if (length < LL(65536)) - { - *packet++=252; - int2store(packet,(uint) length); - return (char*) packet+2; - } - if (length < LL(16777216)) - { - *packet++=253; - int3store(packet,(ulong) length); - return (char*) packet+3; - } - *packet++=254; - int8store(packet,length); - return (char*) packet+8; -} - - /* Faster net_store_length when we know length is a 32 bit integer */ diff --git a/sql/sql_client.cc b/sql/sql_client.cc index 1ae9a23a924..4b0f3f930f3 100644 --- a/sql/sql_client.cc +++ b/sql/sql_client.cc @@ -20,6 +20,7 @@ #include "mysql_priv.h" +#ifdef CLEAN_DUP /* Function called by my_net_init() to set some check variables */ @@ -37,6 +38,7 @@ void my_net_local_init(NET *net) #endif } } +#endif /*CLEAN_DUP*/ extern "C" { void mysql_once_init(void) |