From fa110a4269ab5b8cf265be2cfe30f33887fb93e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Thu, 28 Apr 2022 16:43:01 +0200 Subject: [PATCH] MySQL idles thread should not call update_query_processor_stats() This was detected by valgrind --- lib/MySQL_Thread.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 09a7f6e02..b60a64622 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -3222,7 +3222,14 @@ __run_skip_1a: mypolls.loops++; mypolls.loop_counters->incr(curtime/1000000); - if (maintenance_loop) { + if (maintenance_loop == true +#ifdef IDLE_THREADS + // in case of idle thread + // do not run any mirror cleanup and do not + // update query processor stats + && idle_maintenance_thread == false +#endif // IDLE_THREADS + ) { // house keeping run___cleanup_mirror_queue(); GloQPro->update_query_processor_stats();