diff options
author | unknown <hf@deer.(none)> | 2003-07-14 16:41:58 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2003-07-14 16:41:58 +0500 |
commit | ef46c1f32b748505bd0aca150c59ecc54fd64737 (patch) | |
tree | 47aa245dbe934b5af04e6b6945258c3ba48c4adb /sql | |
parent | f1e3a929e844d13bd1e2e51aba19ccc0ea5659a5 (diff) | |
parent | 90091dee465cef6cd50ef85ed9dd67b06a0edfd2 (diff) | |
download | mariadb-git-ef46c1f32b748505bd0aca150c59ecc54fd64737.tar.gz |
Including client code into libmysqld
Merging
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
sql/protocol.cc:
Auto merged
sql/net_serv.cc:
#ifndef was removed
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 */ |