Commit 1fd8b0a5 authored by Sergey Vojtovich's avatar Sergey Vojtovich Committed by GitHub

Merge pull request #226 from 0xAX/profile-must-be-enabled

Call profiling.restart() and profiling.reset() only if profiling is e…
parents 31a8cf54 e7f54437
......@@ -1661,7 +1661,9 @@ void THD::free_connection()
/* close all prepared statements, to save memory */
stmt_map.reset();
free_connection_done= 1;
#if defined(ENABLED_PROFILING)
profiling.restart(); // Reset profiling
#endif
}
/*
......@@ -1686,7 +1688,9 @@ void THD::reset_for_reuse()
abort_on_warning= 0;
free_connection_done= 0;
m_command= COM_CONNECT;
#if defined(ENABLED_PROFILING)
profiling.reset();
#endif
#ifdef SIGNAL_WITH_VIO_CLOSE
active_vio = 0;
#endif
......
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