Commit 1ceb1d1b authored by Staale Smedseng's avatar Staale Smedseng

Automerge

parents 45c6803f 3b3983a4
......@@ -2127,6 +2127,11 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
stmt->insert_id= mysql->insert_id;
if (res)
{
/*
Don't set stmt error if stmt->mysql is NULL, as the error in this case
has already been set by mysql_prune_stmt_list().
*/
if (stmt->mysql)
set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
......@@ -2338,6 +2343,11 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row)
buff, sizeof(buff), (uchar*) 0, 0,
1, stmt))
{
/*
Don't set stmt error if stmt->mysql is NULL, as the error in this case
has already been set by mysql_prune_stmt_list().
*/
if (stmt->mysql)
set_stmt_errmsg(stmt, net);
return 1;
}
......@@ -3025,6 +3035,11 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
buff, sizeof(buff), (uchar*) data,
length, 1, stmt))
{
/*
Don't set stmt error if stmt->mysql is NULL, as the error in this case
has already been set by mysql_prune_stmt_list().
*/
if (stmt->mysql)
set_stmt_errmsg(stmt, &mysql->net);
DBUG_RETURN(1);
}
......@@ -4440,6 +4455,11 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff),
(uchar*) 0, 0, 1, stmt))
{
/*
Don't set stmt error if stmt->mysql is NULL, as the error in this case
has already been set by mysql_prune_stmt_list().
*/
if (stmt->mysql)
set_stmt_errmsg(stmt, net);
DBUG_RETURN(1);
}
......
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