Possible fix for bug #896

v1.4.0-955
René Cannaò 9 years ago
parent b6f1892a63
commit 27d2c8a93f

@ -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;

Loading…
Cancel
Save