mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user