mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
SCRUM
embedded&client library some fixes: zero at the end of the data added mysql_list_fields became 'virtual' include/mysql.h: mysql_list_fields became 'virtual' libmysql/client_settings.h: in client library we need proper implementation for list_fields libmysql/libmysql.c: implementation for remote server libmysqld/lib_sql.cc: we still need zero at the end of the data in client (see mysql.cc). I feel it should be changed libmysqld/libmysqld.c: implementation for embedded server sql-common/client.c: cli_list_fields member set for client library sql/client_settings.h: we don't need mysql_list_fields in mini_client code
This commit is contained in:
@ -487,11 +487,12 @@ bool Protocol_simple::store_null()
|
||||
bool Protocol::net_store_data(const char *from, uint length)
|
||||
{
|
||||
char *field_buf;
|
||||
if (!(field_buf=alloc_root(alloc, length + sizeof(uint))))
|
||||
if (!(field_buf=alloc_root(alloc, length + sizeof(uint) + 1)))
|
||||
return true;
|
||||
*(uint *)field_buf= length;
|
||||
*next_field= field_buf + sizeof(uint);
|
||||
memcpy(*next_field, from, length);
|
||||
(*next_field)[length]= 0;
|
||||
if (next_mysql_field->max_length < length)
|
||||
next_mysql_field->max_length=length;
|
||||
++next_field;
|
||||
|
Reference in New Issue
Block a user