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.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 1e22d7c9f83..d767a74ae8f 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4189,6 +4189,12 @@ unsent_create_error:
thd->row_count_func= 0;
res= sp->execute_procedure(thd, &lex->value_list);
+ /* If warnings have been cleared, we have to clear total_warn_count
+ * too, otherwise the clients get confused.
+ */
+ if (thd->warn_list.is_empty())
+ thd->total_warn_count= 0;
+
thd->variables.select_limit= select_limit;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
sp_restore_security_context(thd, sp, &save_ctx);