From aa0f8d95a6373772283832fdae4b33d08d9e22c1 Mon Sep 17 00:00:00 2001 From: Carson Ip Date: Mon, 11 Mar 2019 17:36:05 +0800 Subject: [PATCH] Fix skipped mypoll processing --- lib/MySQL_Thread.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 1653b0c22..b0cabcf09 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -2921,7 +2921,6 @@ __mysql_thread_exit_add_mirror: } } unsigned long long idle_since = curtime - myds->sess->IdleTime(); - bool exit_cond=false; if (conns==0) { mypolls.remove_index_fast(n); myds->mypolls=NULL; @@ -2931,14 +2930,12 @@ __mysql_thread_exit_add_mirror: if (mysess==myds->sess) { mysess->thread=NULL; unregister_session(i); - exit_cond=true; mysess->idle_since = idle_since; idle_mysql_sessions->add(mysess); break; } } - } - if (exit_cond) { + n--; // compensate mypolls.remove_index_fast(n) and n++ of loop continue; } }