From d6f15e9d02d7fb33627c937ff47c948dd9ae0b2e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Sep 2003 09:46:31 +0500 Subject: 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 --- libmysqld/lib_sql.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmysqld/lib_sql.cc') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index e4631f3d319..00658eaffdd 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -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; -- cgit v1.2.1