From 0f0758b2eb5c05ed3f3ce3fd917a99e7ed8550dc Mon Sep 17 00:00:00 2001 From: Andrei Ismail Date: Tue, 18 Aug 2015 13:44:14 +0300 Subject: [PATCH] #333 Removing run_stats flag, it's unnecessary It's because admindb has statsdb attached to it via the SQLite3 attach database mechanism. --- lib/ProxySQL_Admin.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ProxySQL_Admin.cpp b/lib/ProxySQL_Admin.cpp index 5967893cb..deff3d469 100644 --- a/lib/ProxySQL_Admin.cpp +++ b/lib/ProxySQL_Admin.cpp @@ -914,7 +914,7 @@ void admin_session_handler(MySQL_Session *sess, ProxySQL_Admin *pa, PtrSize_t *p char *error=NULL; int cols; int affected_rows; - bool run_query=true, run_stats=false; + bool run_query=true; SQLite3_result *resultset=NULL; char *strA=NULL; char *strB=NULL; @@ -1125,7 +1125,6 @@ void admin_session_handler(MySQL_Session *sess, ProxySQL_Admin *pa, PtrSize_t *p l_free(query_length,query); query=l_strdup("SELECT * FROM stats_mysql_processlist"); query_length=strlen(query)+1; - run_stats=true; goto __run_query; } @@ -1157,7 +1156,7 @@ __end_show_commands: __run_query: if (run_query) { ProxySQL_Admin *SPA=(ProxySQL_Admin *)pa; - if (sess->stats==false && run_stats==false) { + if (sess->stats==false) { SPA->admindb->execute_statement(query, &error , &cols , &affected_rows , &resultset); } else { SPA->statsdb->execute("PRAGMA query_only = ON");