mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
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
This commit is contained in:
@ -1730,39 +1730,6 @@ static void store_param_type(NET *net, uint type)
|
||||
net->write_pos+=2;
|
||||
}
|
||||
|
||||
/*
|
||||
Store the length of parameter data
|
||||
(Same function as in sql/net_pkg.cc)
|
||||
*/
|
||||
|
||||
char *
|
||||
net_store_length(char *pkg, ulong length)
|
||||
{
|
||||
uchar *packet=(uchar*) pkg;
|
||||
if (length < 251)
|
||||
{
|
||||
*packet=(uchar) length;
|
||||
return (char*) packet+1;
|
||||
}
|
||||
/* 251 is reserved for NULL */
|
||||
if (length < 65536L)
|
||||
{
|
||||
*packet++=252;
|
||||
int2store(packet,(uint) length);
|
||||
return (char*) packet+2;
|
||||
}
|
||||
if (length < 16777216L)
|
||||
{
|
||||
*packet++=253;
|
||||
int3store(packet,(ulong) length);
|
||||
return (char*) packet+3;
|
||||
}
|
||||
*packet++=254;
|
||||
int8store(packet, (ulonglong) length);
|
||||
return (char*) packet+9;
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
Functions to store parameter data from a prepared statement.
|
||||
|
||||
|
Reference in New Issue
Block a user