1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +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:
Vladislav Vaintroub
2019-04-04 13:10:13 +01:00
parent f2d549d8db
commit 370886a9e2
3 changed files with 34 additions and 7 deletions

View File

@ -4088,15 +4088,16 @@ create_sp_error:
my_error(ER_SP_BADSELECT, MYF(0), sp->m_qname.str);
goto error;
}
/*
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;
if (check_routine_access(thd, EXECUTE_ACL,
sp->m_db.str, sp->m_name.str, TRUE, FALSE))
{