From 3e0b3db65ed4585c1cc850c45670d143fa282643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 20 Mar 2018 11:54:19 +0200 Subject: [PATCH] MXS-359: Fix master_failure_mode=fail_instantly The connection was not closed when master_failure_mode=fail_instantly was used. This caused rwsplit_readonly to fail. --- server/modules/routing/readwritesplit/readwritesplit.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/readwritesplit/readwritesplit.cc b/server/modules/routing/readwritesplit/readwritesplit.cc index 364fa9b53..e20275073 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.cc +++ b/server/modules/routing/readwritesplit/readwritesplit.cc @@ -1389,7 +1389,10 @@ static void handleError(MXS_ROUTER *instance, * can't be sure whether it was executed or not. In this * case the safest thing to do is to close the client * connection. */ - can_continue = true; + if (rses->rses_config.master_failure_mode != RW_FAIL_INSTANTLY) + { + can_continue = true; + } } else if (!SERVER_IS_MASTER(srv) && !srv->master_err_is_logged) {