fix crash on "proxysql restart"

MySQL_HostGroups_Manager::get_MyConn_from_pool() inserts connection
to mysrvc->ConnectionUsed, and this connections is also inserted
to My_Thread->cached_connections which leads to double deallocation.

Fixed https://github.com/sysown/proxysql/issues/1985.
v2.0.5
Yubao Liu 7 years ago committed by René Cannaò
parent cfbdfb1134
commit ae80f15315

@ -2714,10 +2714,7 @@ MySQL_Thread::~MySQL_Thread() {
#endif // IDLE_THREADS
if (cached_connections) {
while(cached_connections->len) {
MySQL_Connection *c=(MySQL_Connection *)cached_connections->remove_index_fast(0);
delete c;
}
return_local_connections();
delete cached_connections;
}

Loading…
Cancel
Save