summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2010-03-04 09:03:07 +0100
committerunknown <knielsen@knielsen-hq.org>2010-03-04 09:03:07 +0100
commit4bf849c23c2fe2174016da630705a362f76d3922 (patch)
treef39b89f218ff81ceb62349eb225a455d52c3ba78 /libmysql
parentf04cf03f75ffca0b99562c027c1c57340d375f66 (diff)
parent62db6839b82d824567979ef3e05caccd67ed11ec (diff)
downloadmariadb-git-4bf849c23c2fe2174016da630705a362f76d3922.tar.gz
Merge MySQL 5.1.44 into MariaDB.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 3a62208fd92..77068edd7ec 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -211,7 +211,6 @@ void STDCALL mysql_server_end()
}
else
{
- free_charsets();
mysql_thread_end();
}
@@ -719,7 +718,10 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
if (!passwd)
passwd="";
- /* Store user into the buffer */
+ /*
+ Store user into the buffer.
+ Advance position as strmake returns a pointer to the closing NUL.
+ */
end= strmake(end, user, USERNAME_LENGTH) + 1;
/* write scrambled password according to server capabilities */
@@ -1269,7 +1271,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
{
MYSQL_RES *result;
MYSQL_FIELD *fields;
- char buff[257],*end;
+ char buff[258],*end;
DBUG_ENTER("mysql_list_fields");
DBUG_PRINT("enter",("table: '%s' wild: '%s'",table,wild ? wild : ""));
@@ -2284,7 +2286,7 @@ mysql_stmt_param_metadata(MYSQL_STMT *stmt)
/* Store type of parameter in network buffer. */
-static void store_param_type(uchar **pos, MYSQL_BIND *param)
+static void store_param_type(unsigned char **pos, MYSQL_BIND *param)
{
uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0);
int2store(*pos, typecode);