diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/client_settings.h | 1 | ||||
-rw-r--r-- | sql/net_serv.cc | 18 | ||||
-rw-r--r-- | sql/protocol.cc | 35 |
3 files changed, 16 insertions, 38 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 fd5e4f1d71a..9e9eaf9eea1 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,3 @@ my_net_read(NET *net) return len; } -#endif /* #ifndef EMBEDDED_LIBRARY */ - diff --git a/sql/protocol.cc b/sql/protocol.cc index 1b9256c7723..b695409ec61 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 */ |