Skip to content

Commit

Permalink
Merge pull request #226 from 0xAX/profile-must-be-enabled
Browse files Browse the repository at this point in the history
Call profiling.restart() and profiling.reset() only if profiling is e…
  • Loading branch information
Sergey Vojtovich committed Aug 27, 2016
2 parents 31a8cf5 + e7f5443 commit 1fd8b0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sql/sql_class.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/*
Expand All @@ -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
Expand Down

0 comments on commit 1fd8b0a

Please sign in to comment.