mirror of
https://github.com/MariaDB/server.git
synced 2025-07-24 19:42:23 +03:00
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
This commit is contained in:
@ -2496,6 +2496,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_PRINT("enter",("packet: %s, length :%d",packet ? packet :" ", length));
|
||||
|
||||
@ -2503,15 +2505,17 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
|
||||
int4store(buff, stmt->stmt_id); /* Send stmt id to server */
|
||||
buff[4]= (char) 0; /* no flags */
|
||||
int4store(buff+5, 1); /* iteration count */
|
||||
if (cli_advanced_command(mysql, COM_EXECUTE, buff, sizeof(buff),
|
||||
packet, length, 1, NULL) ||
|
||||
(*mysql->methods->read_query_result)(mysql))
|
||||
|
||||
res= test(cli_advanced_command(mysql, COM_EXECUTE, buff, sizeof(buff),
|
||||
packet, length, 1, NULL) ||
|
||||
(*mysql->methods->read_query_result)(mysql));
|
||||
stmt->affected_rows= mysql->affected_rows;
|
||||
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->insert_id= mysql->insert_id;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user