Fix slave reconnection logic

Allowing calls to select_connect_backend_servers even when all slaves are
connected solves the debug assertion in select_connect_backend_servers
that happens when the execution of a queued query causes a new connection
to be created.
This commit is contained in:
Markus Mäkelä
2018-06-13 12:44:09 +03:00
parent 3ed6411741
commit 2005164222
4 changed files with 27 additions and 13 deletions

View File

@ -179,6 +179,7 @@ void Backend::set_state(backend_state state)
bool Backend::connect(MXS_SESSION* session, SessionCommandList* sescmd)
{
ss_dassert(!in_use());
bool rval = false;
if ((m_dcb = dcb_connect(m_backend->server, session, m_backend->server->protocol)))