From 9998555eff2db5f4d757f44958cc6c1cb7a67c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Tue, 5 May 2020 01:07:41 +0200 Subject: [PATCH] Port of v2.0.11-QP_stmt_2 into v2.1.0-QP_stmt_2 --- lib/MySQL_Session.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index d8f13b30c..0df4dd381 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -3178,7 +3178,7 @@ __get_pkts_from_client: qpo=GloQPro->process_mysql_query(this,pkt.ptr,pkt.size,&CurrentQuery); if (thread->variables.stats_time_query_processor) { clock_gettime(CLOCK_THREAD_CPUTIME_ID,&endt); - thread->status_variables.query_processor_time=thread->status_variables.query_processor_time + + thread->status_variables.stvar[st_var_query_processor_time] = thread->status_variables.stvar[st_var_query_processor_time] + (endt.tv_sec*1000000000+endt.tv_nsec) - (begint.tv_sec*1000000000+begint.tv_nsec); } @@ -3300,11 +3300,11 @@ __get_pkts_from_client: } qpo=GloQPro->process_mysql_query(this,pkt.ptr,pkt.size,&CurrentQuery); if (qpo->max_lag_ms >= 0) { - thread->status_variables.queries_with_max_lag_ms++; + thread->status_variables.stvar[st_var_queries_with_max_lag_ms]++; } if (thread->variables.stats_time_query_processor) { clock_gettime(CLOCK_THREAD_CPUTIME_ID,&endt); - thread->status_variables.query_processor_time=thread->status_variables.query_processor_time + + thread->status_variables.stvar[st_var_query_processor_time] = thread->status_variables.stvar[st_var_query_processor_time] + (endt.tv_sec*1000000000+endt.tv_nsec) - (begint.tv_sec*1000000000+begint.tv_nsec); } @@ -3361,7 +3361,7 @@ __get_pkts_from_client: char *buf = (char *)malloc(strlen(err_msg)+strlen(nqn.c_str())+strlen(end)+64); sprintf(buf, err_msg, current_hostgroup, locked_on_hostgroup, nqn.c_str(), end); client_myds->myprot.generate_pkt_ERR(true,NULL,NULL,client_myds->pkt_sid+1,9005,(char *)"HY000",buf, true); - thread->status_variables.hostgroup_locked_queries++; + thread->status_variables.stvar[st_var_hostgroup_locked_queries]++; RequestEnd(NULL); free(buf); l_free(pkt.size,pkt.ptr);