summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-05-14 16:28:52 +0300
committermonty@mysql.com <>2005-05-14 16:28:52 +0300
commit6588997eb8218233b664fbbb32b130e832387daa (patch)
treef1cac9a1c4316309957484e84db30e99f9f8eca8 /libmysql
parentbeb5867dfb429a88dc2b732fb1d379560d29fc29 (diff)
parent6c981c0b8005a1577c7dfd93eb656a5da46ef9f0 (diff)
downloadmariadb-git-6588997eb8218233b664fbbb32b130e832387daa.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
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 ;