Commit 5e212a72 authored by unknown's avatar unknown

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

  execution, not before.

parent b87b3255
......@@ -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;
......
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