mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Add profiling support for embedded server.
libmysqld/lib_sql.cc: Start and finish profiling for a query in an embedded server.
This commit is contained in:
parent
f8ccbcc431
commit
72d97dfdae
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue