summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <cmiller@zippy.cornsilk.net>2007-12-14 09:39:57 -0500
committerunknown <cmiller@zippy.cornsilk.net>2007-12-14 09:39:57 -0500
commit72d97dfdaed719b3b7ffd8a65f0c9096a479d7b5 (patch)
treef2de397382e6a85b3e94de514dabff6145702f65 /libmysqld
parentf8ccbcc4315c843636cfdc6330c6b000cb5b05ad (diff)
downloadmariadb-git-72d97dfdaed719b3b7ffd8a65f0c9096a479d7b5.tar.gz
Add profiling support for embedded server.
libmysqld/lib_sql.cc: Start and finish profiling for a query in an embedded server.
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 13847c324e1..5eda45ee5d7 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -77,6 +77,10 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
THD *thd=(THD *) mysql->thd;
NET *net= &mysql->net;
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+ thd->profiling.start_new_query();
+#endif
+
thd->clear_data_list();
/* Check that we are calling the client functions in right order */
if (mysql->status != MYSQL_STATUS_READY)
@@ -116,6 +120,9 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
if (!skip_check)
result= thd->net.last_errno ? -1 : 0;
+#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
+ thd->profiling.finish_current_query();
+#endif
return result;
}