Skip to content

Commit

Permalink
MDEV-11761: CLIENT_DEPRECATE_EOF : Client must identify a "stored pro…
Browse files Browse the repository at this point in the history
…cedure output resultset"

fix proposed by Diego
  • Loading branch information
sanja-byelkin committed Mar 15, 2017
1 parent 5dd4d66 commit 122d070
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sql/protocol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1617,16 +1617,14 @@ bool Protocol_binary::send_out_parameters(List<Item_param> *sp_params)
if (write())
return TRUE;

/* Restore THD::server_status. */
thd->server_status&= ~SERVER_PS_OUT_PARAMS;

ret= net_send_eof(thd, thd->server_status, 0);

/*
Reset SERVER_MORE_RESULTS_EXISTS bit, because this is the last packet
for sure.
Reset server_status:
- SERVER_MORE_RESULTS_EXISTS bit, because this is the last packet for sure.
- Restore SERVER_PS_OUT_PARAMS status.
*/
thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
thd->server_status&= ~(SERVER_PS_OUT_PARAMS | SERVER_MORE_RESULTS_EXISTS);

return ret ? FALSE : TRUE;
}

0 comments on commit 122d070

Please sign in to comment.