mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Call profiling.restart() and profiling.reset() only if profiling is enabled
in other case we will get: ../alex/dev/server/sql/sql_class.cc: In member function ‘void THD::free_connection()’: ../server/sql/sql_class.cc:1664:3: error: ‘profiling’ was not declared in this scope profiling.restart(); // Reset profiling ^~~~~~~~~ ../server/sql/sql_class.cc: In member function ‘void THD::reset_for_reuse()’: ../server/sql/sql_class.cc:1689:3: error: ‘profiling’ was not declared in this scope profiling.reset(); ^~~~~~~~~ errors.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user