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:
@ -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;
|
*succp = can_continue;
|
||||||
backend->close();
|
backend->close();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user