Minor opimization on previous commit

pull/2637/head
René Cannaò 6 years ago
parent 29142e6e4f
commit 95e62b0b4b

@ -2685,10 +2685,12 @@ MySQL_Connection * MySrvConnList::get_random_MyConn(MySQL_Session *sess, bool ff
unsigned int i;
unsigned int l=conns_length();
bool needs_warming = false;
unsigned int total_connections = mysrvc->ConnectionsFree->conns_length()+mysrvc->ConnectionsUsed->conns_length();
unsigned int expected_warm_connections = mysql_thread___free_connections_pct*mysrvc->max_connections/100;
if (mysql_thread___connection_warming && (total_connections < expected_warm_connections)) {
needs_warming = true;
if (mysql_thread___connection_warming) {
unsigned int total_connections = mysrvc->ConnectionsFree->conns_length()+mysrvc->ConnectionsUsed->conns_length();
unsigned int expected_warm_connections = mysql_thread___free_connections_pct*mysrvc->max_connections/100;
if (total_connections < expected_warm_connections) {
needs_warming = true;
}
}
if (l && ff==false && needs_warming==false) {
if (l>32768) {

Loading…
Cancel
Save