summaryrefslogtreecommitdiff
path: root/sql/sql_profile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_profile.cc')
-rw-r--r--sql/sql_profile.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc
index 5b6e0187a92..fd2ae32c711 100644
--- a/sql/sql_profile.cc
+++ b/sql/sql_profile.cc
@@ -378,6 +378,7 @@ void PROFILING::finish_current_query()
if ((enabled) && /* ON at start? */
((thd->options & OPTION_PROFILING) != 0) && /* and ON at end? */
+ (current->query_source != NULL) &&
(! current->entries.is_empty()))
{
current->profiling_query_id= next_profile_id(); /* assign an id */