diff options
author | unknown <kostja@bodhi.local> | 2006-11-29 02:39:17 +0300 |
---|---|---|
committer | unknown <kostja@bodhi.local> | 2006-11-29 02:39:17 +0300 |
commit | a61be9aa9d51302a24d1859915d55f9b078c3254 (patch) | |
tree | c172f8bc04dd5489dda383ae40fd83fb0dbb583b /libmysqld | |
parent | 3d9319e6aa1b428e0f0628ba17dbd0dce7d348e7 (diff) | |
parent | 8d82e99c99d0440b0b78dc84e71a711087de6084 (diff) | |
download | mariadb-git-a61be9aa9d51302a24d1859915d55f9b078c3254.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into bodhi.local:/opt/local/work/mysql-4.1-runtime
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
sql/item_sum.cc:
Auto merged
Diffstat (limited to 'libmysqld')
-rw-r--r-- | libmysqld/lib_sql.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 64bc37fb40d..804c4e001d2 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -224,20 +224,24 @@ static int emb_stmt_execute(MYSQL_STMT *stmt) { DBUG_ENTER("emb_stmt_execute"); char header[4]; + my_bool res; + int4store(header, stmt->stmt_id); THD *thd= (THD*)stmt->mysql->thd; thd->client_param_count= stmt->param_count; thd->client_params= stmt->params; - if (emb_advanced_command(stmt->mysql, COM_EXECUTE,0,0, - header, sizeof(header), 1, stmt) || - emb_mysql_read_query_result(stmt->mysql)) + + res= test(emb_advanced_command(stmt->mysql, COM_EXECUTE,0,0, + header, sizeof(header), 1, stmt) || + emb_mysql_read_query_result(stmt->mysql)); + stmt->affected_rows= stmt->mysql->affected_rows; + stmt->insert_id= stmt->mysql->insert_id; + 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; DBUG_RETURN(0); } |