mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-17610 Unexpected connection abort after certain operations from
within stored procedure Always set SERVER_MORE_RESULTS_EXIST when executing stored procedure. statements If statements produce a result, EOF packet needs this flag (SP ends with an OK packet). IF statetement does not produce a result, affected rows count are part of the final OK packet.
This commit is contained in:
@ -2442,15 +2442,14 @@ static bool do_execute_sp(THD *thd, sp_head *sp)
|
||||
my_error(ER_SP_BADSELECT, MYF(0), sp->m_qname.str);
|
||||
return 1;
|
||||
}
|
||||
/*
|
||||
If SERVER_MORE_RESULTS_EXISTS is not set,
|
||||
then remember that it should be cleared
|
||||
*/
|
||||
bits_to_be_cleared= (~thd->server_status &
|
||||
SERVER_MORE_RESULTS_EXISTS);
|
||||
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
|
||||
}
|
||||
|
||||
/*
|
||||
If SERVER_MORE_RESULTS_EXISTS is not set,
|
||||
then remember that it should be cleared
|
||||
*/
|
||||
bits_to_be_cleared= (~thd->server_status &
|
||||
SERVER_MORE_RESULTS_EXISTS);
|
||||
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
|
||||
ha_rows select_limit= thd->variables.select_limit;
|
||||
thd->variables.select_limit= HA_POS_ERROR;
|
||||
|
||||
|
Reference in New Issue
Block a user