diff options
author | unknown <kroki/tomash@moonlight.intranet> | 2006-11-17 12:33:59 +0300 |
---|---|---|
committer | unknown <kroki/tomash@moonlight.intranet> | 2006-11-17 12:33:59 +0300 |
commit | f84b294a0434c3a7f6ec60bf44d9cc2300409b92 (patch) | |
tree | 0d0aa7163e6996bd504d24973123ca780bfb99ab /libmysql/libmysql.c | |
parent | 4b1897c6bf62fbc4f63c00bad14fa1d306f8d841 (diff) | |
parent | 4d9d524f9102dad9393583b5d6748496a84edc29 (diff) | |
download | mariadb-git-f84b294a0434c3a7f6ec60bf44d9cc2300409b92.tar.gz |
Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug23383
into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug23383
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r-- | libmysql/libmysql.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index e80b142e419..bf9d2ffb0f0 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2472,6 +2472,8 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) NET *net= &mysql->net; char buff[4 /* size of stmt id */ + 5 /* execution flags */]; + my_bool res; + DBUG_ENTER("execute"); DBUG_DUMP("packet", packet, length); @@ -2479,16 +2481,18 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) int4store(buff, stmt->stmt_id); /* Send stmt id to server */ buff[4]= (char) stmt->flags; int4store(buff+5, 1); /* iteration count */ - if (cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), - packet, length, 1, NULL) || - (*mysql->methods->read_query_result)(mysql)) + + res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), + packet, length, 1, NULL) || + (*mysql->methods->read_query_result)(mysql)); + stmt->affected_rows= mysql->affected_rows; + stmt->server_status= mysql->server_status; + stmt->insert_id= mysql->insert_id; + if (res) { set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate); DBUG_RETURN(1); } - stmt->affected_rows= mysql->affected_rows; - stmt->server_status= mysql->server_status; - stmt->insert_id= mysql->insert_id; DBUG_RETURN(0); } |