Add server state helper functions
Added helper functions that check various server states. This makes the readwritesplit code easier to read as the function names convey the intention better than the macro invokations.
This commit is contained in:
@ -354,8 +354,8 @@ static bool reroute_stored_statement(ROUTER_CLIENT_SES *rses, const SRWBackend&
|
||||
SRWBackend& backend = *it;
|
||||
|
||||
if (backend->in_use() && backend != old &&
|
||||
!SERVER_IS_MASTER(backend->server()) &&
|
||||
SERVER_IS_SLAVE(backend->server()))
|
||||
!backend->is_master() &&
|
||||
backend->is_slave())
|
||||
{
|
||||
/** Found a valid candidate; a non-master slave that's in use */
|
||||
if (backend->write(stored))
|
||||
|
||||
Reference in New Issue
Block a user