MXS-2220 Move most remaining functions inside class
Most of the ones still remaining outside are special cases. Also, removed locking from status manipulation functions as it has not been required for quite some time.
This commit is contained in:
@ -2521,7 +2521,7 @@ static void set_server(DCB* dcb, Server* server, char* bit)
|
||||
{
|
||||
unsigned int bitvalue;
|
||||
|
||||
if ((bitvalue = server_map_status(bit)) != 0)
|
||||
if ((bitvalue = SERVER::status_from_string(bit)) != 0)
|
||||
{
|
||||
std::string errmsg;
|
||||
if (!mxs::server_set_status(server, bitvalue, &errmsg))
|
||||
@ -2547,7 +2547,7 @@ static void clear_server(DCB* dcb, Server* server, char* bit)
|
||||
{
|
||||
unsigned int bitvalue;
|
||||
|
||||
if ((bitvalue = server_map_status(bit)) != 0)
|
||||
if ((bitvalue = SERVER::status_from_string(bit)) != 0)
|
||||
{
|
||||
std::string errmsg;
|
||||
if (!mxs::server_clear_status(server, bitvalue, &errmsg))
|
||||
|
@ -320,7 +320,7 @@ void exec_set_server(DCB* dcb, MAXINFO_TREE* tree)
|
||||
|
||||
if (server)
|
||||
{
|
||||
int status = server_map_status(tree->right->value);
|
||||
int status = SERVER::status_from_string(tree->right->value);
|
||||
if (status != 0)
|
||||
{
|
||||
std::string errmsgs;
|
||||
@ -407,7 +407,7 @@ void exec_clear_server(DCB* dcb, MAXINFO_TREE* tree)
|
||||
|
||||
if (server)
|
||||
{
|
||||
int status = server_map_status(tree->right->value);
|
||||
int status = SERVER::status_from_string(tree->right->value);
|
||||
if (status != 0)
|
||||
{
|
||||
std::string errmsgs;
|
||||
|
@ -273,7 +273,7 @@ static void log_server_connections(select_criteria_t criteria, const PRWBackends
|
||||
b->server->stats.n_current,
|
||||
b->server->address,
|
||||
b->server->port,
|
||||
mxs::server_status(b->server).c_str());
|
||||
b->server->status_string().c_str());
|
||||
break;
|
||||
|
||||
case LEAST_ROUTER_CONNECTIONS:
|
||||
@ -281,7 +281,7 @@ static void log_server_connections(select_criteria_t criteria, const PRWBackends
|
||||
b->connections,
|
||||
b->server->address,
|
||||
b->server->port,
|
||||
mxs::server_status(b->server).c_str());
|
||||
b->server->status_string().c_str());
|
||||
break;
|
||||
|
||||
case LEAST_CURRENT_OPERATIONS:
|
||||
@ -289,7 +289,7 @@ static void log_server_connections(select_criteria_t criteria, const PRWBackends
|
||||
b->server->stats.n_current_ops,
|
||||
b->server->address,
|
||||
b->server->port,
|
||||
mxs::server_status(b->server).c_str());
|
||||
b->server->status_string().c_str());
|
||||
break;
|
||||
|
||||
case LEAST_BEHIND_MASTER:
|
||||
@ -297,7 +297,7 @@ static void log_server_connections(select_criteria_t criteria, const PRWBackends
|
||||
b->server->rlag,
|
||||
b->server->address,
|
||||
b->server->port,
|
||||
mxs::server_status(b->server).c_str());
|
||||
b->server->status_string().c_str());
|
||||
break;
|
||||
|
||||
case ADAPTIVE_ROUTING:
|
||||
@ -309,7 +309,7 @@ static void log_server_connections(select_criteria_t criteria, const PRWBackends
|
||||
os.str().c_str(),
|
||||
b->server->address,
|
||||
b->server->port,
|
||||
mxs::server_status(b->server).c_str());
|
||||
b->server->status_string().c_str());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -116,7 +116,7 @@ bool connect_backend_servers(SSRBackendList& backends, MXS_SESSION* session)
|
||||
b->server->stats.n_current,
|
||||
b->server->address,
|
||||
b->server->port,
|
||||
mxs::server_status(b->server).c_str());
|
||||
b->server->status_string().c_str());
|
||||
}
|
||||
}
|
||||
/**
|
||||
@ -170,7 +170,7 @@ bool connect_backend_servers(SSRBackendList& backends, MXS_SESSION* session)
|
||||
if ((*it)->in_use())
|
||||
{
|
||||
MXS_INFO("Connected %s in \t%s:%d",
|
||||
mxs::server_status(b->server).c_str(),
|
||||
b->server->status_string().c_str(),
|
||||
b->server->address,
|
||||
b->server->port);
|
||||
}
|
||||
|
Reference in New Issue
Block a user