Commit fb3e9352 authored by Sergey Vojtovich's avatar Sergey Vojtovich

MDEV-7999 - PROFILING routines take 0.2% when profiling disabled

This is an addition to original patch. Embedded server does extra calls of
PROFILING::start_new_query() and PROFILING::finish_current_query(), which
cause DBUG_ASSERT(!current) failure.

Removed these extra calls: dispatch_command() does all needed job.
parent 18f88d6d
...@@ -130,10 +130,6 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, ...@@ -130,10 +130,6 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
thd= (THD *) mysql->thd; thd= (THD *) mysql->thd;
} }
#if defined(ENABLED_PROFILING)
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)
...@@ -178,10 +174,6 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, ...@@ -178,10 +174,6 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
thd->mysys_var= 0; thd->mysys_var= 0;
#if defined(ENABLED_PROFILING)
thd->profiling.finish_current_query();
#endif
end: end:
thd->reset_globals(); thd->reset_globals();
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