MXS-2734: Check preferred server on table conflict

If the schemarouter detects a table conflict in a query and one of the
servers is the preferred one, don't log an error.
This commit is contained in:
Markus Mäkelä 2019-10-28 09:01:23 +02:00
parent e82be12be9
commit 639b0af6aa
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -1644,9 +1644,12 @@ SERVER* SchemaRouterSession::get_query_target(GWBUF* buffer)
{
if (rval && target != rval)
{
MXS_ERROR("Query targets tables on servers '%s' and '%s'. "
"Cross server queries are not supported.",
rval->name(), target->name());
if (target != m_config->preferred_server && rval != m_config->preferred_server)
{
MXS_ERROR("Query targets tables on servers '%s' and '%s'. "
"Cross server queries are not supported.",
rval->name(), target->name());
}
}
else if (rval == NULL)
{