summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-09-11 09:46:31 +0500
committerunknown <hf@deer.(none)>2003-09-11 09:46:31 +0500
commitd6f15e9d02d7fb33627c937ff47c948dd9ae0b2e (patch)
tree538cb9bd71ffb376946c4f646c4b2ebb67844cb1 /libmysqld/lib_sql.cc
parent565d92210eb23c973b0eff9796e21cec611666dc (diff)
downloadmariadb-git-d6f15e9d02d7fb33627c937ff47c948dd9ae0b2e.tar.gz
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
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc3
1 files changed, 2 insertions, 1 deletions
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;