summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 47b698c3a2f..27238fa05d2 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3100,7 +3100,12 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
res= m_lex_keeper.reset_lex_and_exec_core(thd, nextp, FALSE, this);
if (thd->stmt_da->is_eof())
+ {
+ /* Finalize server status flags after executing a statement. */
+ thd->update_server_status();
+
thd->protocol->end_statement();
+ }
query_cache_end_of_result(thd);