diff --git a/server/modules/routing/readwritesplit/readwritesplit.cc b/server/modules/routing/readwritesplit/readwritesplit.cc index 564c85026..0efb64b86 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.cc +++ b/server/modules/routing/readwritesplit/readwritesplit.cc @@ -227,6 +227,13 @@ RWSplit* RWSplit::create(SERVICE* service, MXS_CONFIG_PARAMETER* params) return NULL; } + if (config.master_reconnection && config.disable_sescmd_history) + { + MXS_ERROR("Both 'master_reconnection' and 'disable_sescmd_history' are enabled: " + "Master reconnection cannot be done without session command history."); + return NULL; + } + return new(std::nothrow) RWSplit(service, config); } diff --git a/server/modules/routing/schemarouter/schemaroutersession.cc b/server/modules/routing/schemarouter/schemaroutersession.cc index fc6749e97..8475abf86 100644 --- a/server/modules/routing/schemarouter/schemaroutersession.cc +++ b/server/modules/routing/schemarouter/schemaroutersession.cc @@ -1393,8 +1393,7 @@ void SchemaRouterSession::query_databases() for (SSRBackendList::iterator it = m_backends.begin(); it != m_backends.end(); it++) { - if ((*it)->in_use() && !(*it)->is_closed() - & server_is_usable((*it)->backend()->server)) + if ((*it)->in_use() && !(*it)->is_closed() && server_is_usable((*it)->backend()->server)) { GWBUF* clone = gwbuf_clone(buffer); MXS_ABORT_IF_NULL(clone);