summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <kroki/tomash@moonlight.intranet>2006-11-17 12:30:26 +0300
committerunknown <kroki/tomash@moonlight.intranet>2006-11-17 12:30:26 +0300
commitb06733a9f44c00ca6df1af0ea0ba0ac13e8465b5 (patch)
tree15150c92c2ee93d449ec48a1bf992e1f510ed040 /libmysqld
parent1031c460de5bd4b1014614e8871393eebd0a51bc (diff)
parent2d04b1914de45129569d08dceb74f647f3004563 (diff)
downloadmariadb-git-b06733a9f44c00ca6df1af0ea0ba0ac13e8465b5.tar.gz
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug23383
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23383 libmysql/libmysql.c: Manual merge. libmysqld/lib_sql.cc: Manual merge. tests/mysql_client_test.c: Manual merge.
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 98c75dfe719..a33e7fa6100 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -279,24 +279,26 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
char header[5];
MYSQL_DATA *res;
THD *thd;
+ my_bool res;
int4store(header, stmt->stmt_id);
header[4]= stmt->flags;
thd= (THD*)stmt->mysql->thd;
thd->client_param_count= stmt->param_count;
thd->client_params= stmt->params;
- if (emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE,0,0,
- header, sizeof(header), 1, stmt) ||
- emb_read_query_result(stmt->mysql))
+
+ res= test(emb_advanced_command(stmt->mysql, COM_STMT_EXECUTE, 0, 0,
+ header, sizeof(header), 1, stmt) ||
+ emb_read_query_result(stmt->mysql));
+ stmt->affected_rows= stmt->mysql->affected_rows;
+ stmt->insert_id= stmt->mysql->insert_id;
+ stmt->server_status= stmt->mysql->server_status;
+ if (res)
{
NET *net= &stmt->mysql->net;
set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate);
DBUG_RETURN(1);
}
- stmt->affected_rows= stmt->mysql->affected_rows;
- stmt->insert_id= stmt->mysql->insert_id;
- stmt->server_status= stmt->mysql->server_status;
-
DBUG_RETURN(0);
}