diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-04-04 13:10:13 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-04-04 13:10:13 +0100 |
commit | 6d4744cce88ac44352a9d5fb29c919c670699dea (patch) | |
tree | 2b6544a6d6295905080cfcb851b28b785660b9e0 /sql/sql_parse.cc | |
parent | f2d549d8dbda1906b3e5ae0c2fa5589f2b9de662 (diff) | |
download | mariadb-git-bb-5.5-wlad.tar.gz |
MDEV-17610 Unexpected connection abort after certain operations from within stored procedurebb-5.5-wlad
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.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 95243ead2fe..bb53c116b0c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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)) { |