BUG#9814: post-review fixes: clear thd->net.no_send error after SP instruction

execution, not before.
This commit is contained in:
sergefp@mysql.com 2005-07-04 23:40:01 +00:00
parent 4a90f7d04f
commit 3d5d366c72

View file

@ -642,13 +642,13 @@ sp_head::execute(THD *thd)
items made during other permanent subquery transformations).
*/
thd->current_arena= i;
ret= i->execute(thd, &ip);
/*
no_send_error may have been set by the previous SP instruction when it
sent eof. Allow the current SP instruction to produce an error.
(multi-statement execution code clears no_send_error, too)
If this SP instruction have sent eof, it has caused no_send_error to be
set. Clear it back to allow the next instruction to send error. (multi-
statement execution code clears no_send_error between statements too)
*/
thd->net.no_send_error= 0;
ret= i->execute(thd, &ip);
if (i->free_list)
cleanup_items(i->free_list);
i->state= Query_arena::EXECUTED;