Add profiling support for embedded server.

parent 62d29ea8
...@@ -77,6 +77,10 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, ...@@ -77,6 +77,10 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
THD *thd=(THD *) mysql->thd; THD *thd=(THD *) mysql->thd;
NET *net= &mysql->net; NET *net= &mysql->net;
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.start_new_query();
#endif
thd->clear_data_list(); thd->clear_data_list();
/* Check that we are calling the client functions in right order */ /* Check that we are calling the client functions in right order */
if (mysql->status != MYSQL_STATUS_READY) if (mysql->status != MYSQL_STATUS_READY)
...@@ -116,6 +120,9 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, ...@@ -116,6 +120,9 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
if (!skip_check) if (!skip_check)
result= thd->net.last_errno ? -1 : 0; result= thd->net.last_errno ? -1 : 0;
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.finish_current_query();
#endif
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment