summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-05-14 16:28:52 +0300
committerunknown <monty@mysql.com>2005-05-14 16:28:52 +0300
commit78f2e7b53db62a3bc67dcb5ed20dfe47cf680c66 (patch)
treef1cac9a1c4316309957484e84db30e99f9f8eca8 /libmysql
parent2059908b9ce2bde6848f247c4ee4a72a7e42738a (diff)
parentba3540cc6991c49e0f43501e600018896b5e0dcb (diff)
downloadmariadb-git-78f2e7b53db62a3bc67dcb5ed20dfe47cf680c66.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1 libmysql/libmysql.c: Auto merged sql/share/danish/errmsg.txt: Auto merged
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index ff90cfb6007..4d92db26406 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -3947,9 +3947,12 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
/*
We only need to check that stmt->field_count - if it is not null
stmt->bind was initialized in mysql_stmt_prepare
- */
+ stmt->bind overlaps with bind if mysql_stmt_bind_param
+ is called from mysql_stmt_store_result.
+ */
- memcpy((char*) stmt->bind, (char*) bind, sizeof(MYSQL_BIND) * bind_count);
+ if (stmt->bind != bind)
+ memcpy((char*) stmt->bind, (char*) bind, sizeof(MYSQL_BIND) * bind_count);
for (param= stmt->bind, end= param + bind_count, field= stmt->fields ;
param < end ;