Merge pull request #5344 from sysown/fix/remove-wrong-index-connection-cleanup

Fix wrong index in connection cleanup loops (MySQL and PgSQL)
pull/5345/head
René Cannaò 3 months ago committed by GitHub
commit abddff3355
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2600,7 +2600,7 @@ void MySQL_HostGroups_Manager::drop_all_idle_connections() {
unsigned long long intv = mysql_thread___connection_max_age_ms;
intv *= 1000;
if (curtime > mc->creation_time + intv) {
mc=mscl->remove(0);
mc=mscl->remove(i);
delete mc;
i--;
}

@ -2936,7 +2936,7 @@ void MySQL_HostGroups_Manager::drop_all_idle_connections() {
unsigned long long intv = mysql_thread___connection_max_age_ms;
intv *= 1000;
if (curtime > mc->creation_time + intv) {
mc=mscl->remove(0);
mc=mscl->remove(i);
delete mc;
i--;
}

@ -2779,7 +2779,7 @@ void PgSQL_HostGroups_Manager::drop_all_idle_connections() {
unsigned long long intv = pgsql_thread___connection_max_age_ms;
intv *= 1000;
if (curtime > mc->creation_time + intv) {
mc=mscl->remove(0);
mc=mscl->remove(i);
delete mc;
i--;
}

Loading…
Cancel
Save