summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-05-07 13:05:09 +0200
committerSergei Golubchik <sergii@pisem.net>2013-05-07 13:05:09 +0200
commitb381cf843c841151f96541b19bd753cd3bbae326 (patch)
treedfc377a1dfbd4d2044a0b799ff5ed6411c7e864f /libmysql/libmysql.c
parentd4be9e7bc0cfd5ddd444ecc64daa4166597ca2eb (diff)
parente5055e22f1f311fa48457cfcc97b72e93a37329f (diff)
downloadmariadb-git-b381cf843c841151f96541b19bd753cd3bbae326.tar.gz
mysql-5.5.31 merge
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r--libmysql/libmysql.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index f90cc96a90f..6d2582ad9a4 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2130,7 +2130,14 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
DBUG_RETURN(1);
}
- net_clear(net, 1); /* Sets net->write_pos */
+ if (net->vio)
+ net_clear(net, 1); /* Sets net->write_pos */
+ else
+ {
+ set_stmt_errmsg(stmt, net);
+ DBUG_RETURN(1);
+ }
+
/* Reserve place for null-marker bytes */
null_count= (stmt->param_count+7) /8;
if (my_realloc_str(net, null_count + 1))