MXS-1503: Abort connection when inside transaction

Before the transaction migration is implemented, the connection must be
closed if a transaction is open and the connection to the master is
lost. Doing this retains the same transactionality as a direct connection
to the server would.
This commit is contained in:
Markus Mäkelä
2018-03-29 03:41:00 +03:00
parent ff496979f6
commit 3857912c61

View File

@ -1393,6 +1393,12 @@ static void handleError(MXS_ROUTER *instance,
}
}
if (session_trx_is_active(session))
{
// We have an open transaction, we can't continue
can_continue = false;
}
*succp = can_continue;
backend->close();
}