• Alexander Kuleshov's avatar
    Call profiling.restart() and profiling.reset() only if profiling is enabled · e7f54437
    Alexander Kuleshov authored
    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.
    e7f54437
sql_class.cc 215 KB