summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 98e04e45bdd..62a5a79a833 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -6169,6 +6169,11 @@ void mysql_parse(THD *thd, const char *inBuf, uint length,
(thd->query_length= (ulong)(lip.found_semicolon - thd->query)))
thd->query_length--;
/* Actually execute the query */
+ if (*found_semicolon)
+ {
+ lex->safe_to_cache_query= 0;
+ thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
+ }
lex->set_trg_event_type_for_tables();
mysql_execute_command(thd);
query_cache_end_of_result(thd);