summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-06-18 15:58:57 +0500
committerunknown <hf@deer.(none)>2003-06-18 15:58:57 +0500
commit13e8bf67fc63280f76023fab73c373f33e363bfc (patch)
treef2de81966600f6bb3e831afc62a7ed1d9babbf42 /sql/protocol.cc
parent4c7431dc906cd5e5dba8515ec63107b590708898 (diff)
downloadmariadb-git-13e8bf67fc63280f76023fab73c373f33e363bfc.tar.gz
SCRUM
including client code into embedded server code to guess what library to use added net_field_length moved to pack.c include/mysql.h: typedefinitions moved for suitability mysql_option.methods_to_use added include/mysql_com.h: net_store_length declaration libmysql/libmysql.c: net_store_length moved to sql-common/pack.c libmysqld/libmysqld.c: added code to guess whether to use remote or embedded connection sql-common/client.c: options checking added sql-common/pack.c: net_store_length implementation moved here sql/protocol.cc: net_store_length moved to sql-common/pack.c
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc34
1 files changed, 0 insertions, 34 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index da363a478fd..3933cd08d40 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -349,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
*/