From 27d2c8a93f83beea2e79bf6ec7204a31c6f6b7e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Tue, 7 Feb 2017 21:44:27 +0000 Subject: [PATCH] Possible fix for bug #896 --- lib/MySQL_Thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MySQL_Thread.cpp b/lib/MySQL_Thread.cpp index 5cabfe05e..63f99e62a 100644 --- a/lib/MySQL_Thread.cpp +++ b/lib/MySQL_Thread.cpp @@ -2268,7 +2268,7 @@ __run_skip_1a: mysess->thread=NULL; // we first delete the association in sessmap sessmap.erase(mysess->thread_session_id); - if (mysql_sessions->len-1 > 0) { + if (mysql_sessions->len) { // take the last element and adjust the map MySQL_Session *mysess_last=(MySQL_Session *)mysql_sessions->index(mysql_sessions->len-1); sessmap[mysess_last->thread_session_id]=sess_pos; @@ -2313,7 +2313,7 @@ __run_skip_1a: mysess->thread=NULL; // we first delete the association in sessmap sessmap.erase(mysess->thread_session_id); - if (mysql_sessions->len-1 > 0) { + if (mysql_sessions->len) { // take the last element and adjust the map MySQL_Session *mysess_last=(MySQL_Session *)mysql_sessions->index(mysql_sessions->len-1); sessmap[mysess_last->thread_session_id]=sess_pos;