summaryrefslogtreecommitdiff
path: root/sql/sql_profile.cc
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2007-11-09 20:29:02 -0500
committerunknown <cmiller@zippy.cornsilk.net>2007-11-09 20:29:02 -0500
commitac180f8272f9be0cf2621c11e03e313b891c4417 (patch)
tree4abdcb583d1ae9c1986d1ec059d9df25181ac2e0 /sql/sql_profile.cc
parent74da84cdb34cf0662bfdf4049c181f191471e4db (diff)
downloadmariadb-git-ac180f8272f9be0cf2621c11e03e313b891c4417.tar.gz
Don't start profiling too soon. Begin timing when the packet is
read. Do not store profiling information when there is no query text. We don't wish to capture non-COM_QUERY packets. sql/sql_parse.cc: Start profiling immediately after a command packet is read from the network. sql/sql_profile.cc: Do not store items for which there is no query, i.e., protocol API calls (non-COM_QUERY) and such.
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 */