Minor bug fixes on #544 and #545

pull/642/head
René Cannaò 10 years ago
parent db33ee961e
commit 00caba00fc

@ -689,6 +689,12 @@ MySrvC *MyHGC::get_random_MySrvC() {
}
}
}
if (New_sum==0) {
proxy_debug(PROXY_DEBUG_MYSQL_CONNPOOL, 7, "Returning MySrvC NULL because no backend ONLINE or with weight\n");
return NULL; // if we reach here, we couldn't find any target
}
unsigned int k=rand()%New_sum;
k++;
New_sum=0;

@ -1018,7 +1018,7 @@ __end_monitor_ping_loop:
if (resultset) {
if (resultset->rows_count) {
// disable host
proxy_error("Server %s:%s missed %d heartbeats, shunning it and killing all the connections\n", addresses[j], atoi(ports[j]), max_failures);
proxy_error("Server %s:%s missed %d heartbeats, shunning it and killing all the connections\n", addresses[j], ports[j], max_failures);
MyHGM->shun_and_killall(addresses[j],atoi(ports[j]));
}
delete resultset;

Loading…
Cancel
Save