summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2004-12-18 00:17:25 +0300
committerkonstantin@mysql.com <>2004-12-18 00:17:25 +0300
commit7055fc5122ccfe02b5f08806e238d7704687fdc1 (patch)
tree75100b91f7d8e8ab02c6fa3120b8fbb75d8e7265 /libmysql
parent0d831520cfae645eb6f9cc2788452ce257b054c9 (diff)
downloadmariadb-git-7055fc5122ccfe02b5f08806e238d7704687fdc1.tar.gz
Truncations patch: a post-review fix.
Diffstat (limited to 'libmysql')
-rw-r--r--libmysql/libmysql.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 7d078a179ed..ce8a5aaaaab 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -4342,7 +4342,6 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
MYSQL_FIELD *field;
ulong bind_count= stmt->field_count;
uint param_count= 0;
- uchar report_data_truncation= 0;
DBUG_ENTER("mysql_stmt_bind_result");
DBUG_PRINT("enter",("field_count: %d", bind_count));
@@ -4380,8 +4379,6 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
if (!param->error)
param->error= &param->error_value;
- else
- report_data_truncation= REPORT_DATA_TRUNCATION;
param->param_number= param_count++;
param->offset= 0;
@@ -4395,7 +4392,10 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
DBUG_RETURN(1);
}
}
- stmt->bind_result_done= BIND_RESULT_DONE | report_data_truncation;
+ stmt->bind_result_done= BIND_RESULT_DONE;
+ if (stmt->mysql->options.report_data_truncation)
+ stmt->bind_result_done|= REPORT_DATA_TRUNCATION;
+
DBUG_RETURN(0);
}