Commit 5218a0cd authored by unknown's avatar unknown

Fix for #1470


libmysqld/lib_sql.cc:
  check for error
sql/sql_prepare.cc:
  set success mark here
parent 4f4b786d
...@@ -128,6 +128,8 @@ static MYSQL_FIELD * STDCALL emb_list_fields(MYSQL *mysql) ...@@ -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) static my_bool STDCALL emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
{ {
THD *thd= (THD*)mysql->thd; THD *thd= (THD*)mysql->thd;
if (mysql->net.last_errno)
return 1;
stmt->stmt_id= thd->client_stmt_id; stmt->stmt_id= thd->client_stmt_id;
stmt->param_count= thd->client_param_count; stmt->param_count= thd->client_param_count;
stmt->field_count= mysql->field_count; stmt->field_count= mysql->field_count;
......
...@@ -169,6 +169,7 @@ static bool send_prep_stmt(PREP_STMT *stmt, uint columns __attribute__((unused)) ...@@ -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_stmt_id= stmt->stmt_id;
thd->client_param_count= stmt->param_count; thd->client_param_count= stmt->param_count;
thd->net.last_errno= 0;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment