Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Base_HostGroups_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change is inside a large #if 0 block, which means this code is not being compiled and the change has no effect. This block appears to be a duplicated, outdated implementation of MySQL_HostGroups_Manager::drop_all_idle_connections(). To prevent confusion and improve maintainability, it would be best to remove this dead code.

delete mc;
i--;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/MySQL_HostGroups_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/PgSQL_HostGroups_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
}
Expand Down
Loading