summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2003-10-06 12:10:18 +0500
committerunknown <hf@deer.(none)>2003-10-06 12:10:18 +0500
commit1d5c187e2fd7e24782829cc32aaa00e3e015a0b6 (patch)
treee0430430dbca86b71c8cbe835ae90d07bf0bc7a1
parent9b8114845bd9e3108d35b14d985a3131438d1e67 (diff)
parent5218a0cd15ab6ac3f0e91394ef085107bd79e5a1 (diff)
downloadmariadb-git-1d5c187e2fd7e24782829cc32aaa00e3e015a0b6.tar.gz
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.stmt
-rw-r--r--libmysqld/lib_sql.cc2
-rw-r--r--sql/sql_prepare.cc1
2 files changed, 3 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index e70f34397d6..94246135d37 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -128,6 +128,8 @@ static MYSQL_FIELD * STDCALL emb_list_fields(MYSQL *mysql)
static my_bool STDCALL emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
{
THD *thd= (THD*)mysql->thd;
+ if (mysql->net.last_errno)
+ return 1;
stmt->stmt_id= thd->client_stmt_id;
stmt->param_count= thd->client_param_count;
stmt->field_count= mysql->field_count;
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index ff1a8f8f8e6..3089bd670b2 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -169,6 +169,7 @@ static bool send_prep_stmt(PREP_STMT *stmt, uint columns __attribute__((unused))
thd->client_stmt_id= stmt->stmt_id;
thd->client_param_count= stmt->param_count;
+ thd->net.last_errno= 0;
return 0;
}