Merge branch '2.1' into develop

This commit is contained in:
Markus Mäkelä
2017-09-20 10:47:53 +03:00
16 changed files with 278 additions and 60 deletions

View File

@ -519,10 +519,6 @@ static void log_closed_session(mxs_mysql_cmd_t mysql_command, bool is_closed,
{
sprintf(msg, "Server '%s' is down.", ref->server->unique_name);
}
else if (!SERVER_REF_IS_ACTIVE(ref))
{
sprintf(msg, "Server '%s' was removed from the service.", ref->server->unique_name);
}
else if (SERVER_IN_MAINT(ref->server))
{
sprintf(msg, "Server '%s' is in maintenance.", ref->server->unique_name);
@ -576,7 +572,6 @@ routeQuery(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session, GWBUF *queu
}
if (rses_is_closed || backend_dcb == NULL ||
!SERVER_REF_IS_ACTIVE(router_cli_ses->backend) ||
!SERVER_IS_RUNNING(router_cli_ses->backend->server))
{
log_closed_session(mysql_command, rses_is_closed, router_cli_ses->backend);

View File

@ -424,7 +424,7 @@ SRWBackend get_target_backend(RWSplitSession *rses, backend_type_t btype,
/** The server must be a valid slave, relay server, or master */
if (backend->in_use() && backend->is_active() &&
if (backend->in_use() &&
(strcasecmp(name, backend->name()) == 0) &&
(backend->is_slave() ||
backend->is_relay() ||
@ -451,7 +451,7 @@ SRWBackend get_target_backend(RWSplitSession *rses, backend_type_t btype,
* Unused backend or backend which is not master nor
* slave can't be used
*/
if (!backend->in_use() || !backend->is_active() ||
if (!backend->in_use() ||
(!backend->is_master() && !backend->is_slave()))
{
continue;
@ -527,7 +527,7 @@ SRWBackend get_target_backend(RWSplitSession *rses, backend_type_t btype,
*/
else if (btype == BE_MASTER)
{
if (master && master->is_active())
if (master)
{
/** It is possible for the server status to change at any point in time
* so copying it locally will make possible error messages