Added a check for candidate server, if NULL return
This commit is contained in:
@ -56,8 +56,9 @@
|
|||||||
* with macros and MySQL commands with MYSQL_ prefix
|
* with macros and MySQL commands with MYSQL_ prefix
|
||||||
* avoiding any conflict with the standard ones
|
* avoiding any conflict with the standard ones
|
||||||
* in mysql.h
|
* in mysql.h
|
||||||
* 22/07/13 Mark Riddoch Addition of joined router option for Galera
|
* 22/07/2013 Mark Riddoch Addition of joined router option for Galera
|
||||||
* clusters
|
* clusters
|
||||||
|
* 31/07/2013 Massimiliano Pinto Added a check for candidate server, if NULL return
|
||||||
*
|
*
|
||||||
* @endverbatim
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
@ -296,6 +297,12 @@ int i;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* no candidate server here, clean and return NULL */
|
||||||
|
if (!candidate) {
|
||||||
|
free(client);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We now have the server with the least connections.
|
* We now have the server with the least connections.
|
||||||
* Bump the connection count for this server
|
* Bump the connection count for this server
|
||||||
|
|||||||
Reference in New Issue
Block a user