diff --git a/include/Command_Counter.h b/include/Command_Counter.h index 9b790e697..c832a4ae7 100644 --- a/include/Command_Counter.h +++ b/include/Command_Counter.h @@ -3,10 +3,9 @@ class Command_Counter { public: - Command_Counter(int cmd_idx, int col_count, char** cmd_desc) : _counters{}, _total_time(0), _cmd_idx(cmd_idx), + Command_Counter(int cmd_idx, int col_count, char** cmd_desc) : _total_time(0), _cmd_idx(cmd_idx), _col_count(col_count), _cmd_desc(cmd_desc) { - - //memset(_counters, 0, sizeof(_counters)); + memset(_counters, 0, sizeof(_counters)); } void add_and_reset(Command_Counter* cc) { for (int j = 0; j < static_cast(sizeof(_counters)/sizeof(_counters[0])); j++) { diff --git a/lib/PgSQL_Query_Processor.cpp b/lib/PgSQL_Query_Processor.cpp index f880db0be..8820d9a4f 100644 --- a/lib/PgSQL_Query_Processor.cpp +++ b/lib/PgSQL_Query_Processor.cpp @@ -245,7 +245,9 @@ PgSQL_Query_Processor::~PgSQL_Query_Processor() { void PgSQL_Query_Processor::update_query_processor_stats() { Query_Processor::update_query_processor_stats(); - for (int i = 0; i < PGSQL_QUERY___NONE; i++) commands_counters[i]->add_and_reset(_thr_commands_counters[i]); + for (int i = 0; i < PGSQL_QUERY___NONE; i++) { + commands_counters[i]->add_and_reset(_thr_commands_counters[i]); + } } void PgSQL_Query_Processor::init_thread() {