MXS-2246 Remove duplicate info in SERVICE and Service

Both of them contained fields for the service and router names.
Now the names are in SERVICE and they must be accessed via member
function.
This commit is contained in:
Johan Wikman
2019-02-14 10:25:04 +02:00
parent 2528c5fa4d
commit 1fed465fdb
32 changed files with 294 additions and 278 deletions

View File

@ -155,7 +155,7 @@ bool RWSplit::have_enough_servers() const
MXS_ERROR("Unable to start %s service. There are "
"too few backend servers available. Found %d "
"when %d is required.",
m_service->name,
m_service->name(),
router_nsrv,
min_nsrv);
}
@ -169,7 +169,7 @@ bool RWSplit::have_enough_servers() const
MXS_ERROR("Unable to start %s service. There are "
"too few backend servers configured in "
"MaxScale.cnf. Found %d when %d is required.",
m_service->name,
m_service->name(),
m_config->max_slave_connections,
min_nsrv);
}
@ -180,7 +180,7 @@ bool RWSplit::have_enough_servers() const
"too few backend servers configured in "
"MaxScale.cnf. Found %d%% when at least %.0f%% "
"would be required.",
m_service->name,
m_service->name(),
m_config->rw_max_slave_conn_percent,
dbgpct);
}
@ -203,7 +203,7 @@ static void log_router_options_not_supported(SERVICE* service, std::string route
MXS_ERROR("`router_options` is no longer supported in readwritesplit. "
"To define the router options as parameters, add the following "
"lines to service '%s':\n\n%s\n",
service->name,
service->name(),
ss.str().c_str());
}

View File

@ -527,7 +527,7 @@ bool RWSplitSession::route_session_write(GWBUF* querybuf, uint8_t command, uint3
"command history, add `disable_sescmd_history=true` to "
"service '%s'. To increase the limit (currently %lu), add "
"`max_sescmd_history` to the same service and increase the value.",
m_router->service()->name,
m_router->service()->name(),
m_config.max_sescmd_history);
warn_history_exceeded = false;
}
@ -965,7 +965,7 @@ void RWSplitSession::log_master_routing_failure(bool found,
}
MXS_WARNING("[%s] Write query received from %s@%s. %s. Closing client connection.",
m_router->service()->name,
m_router->service()->name(),
m_client->user,
m_client->remote,
errmsg);