Log slave error message on failed session command

If the master succeeds in executing a session command but the slave fails,
the error message could help explain why it failed. At the moment this is
mainly relevant for inspection of test results.
This commit is contained in:
Markus Mäkelä 2018-11-10 08:00:35 +02:00
parent e3c9ac9e98
commit 370483fb4b
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -141,6 +141,12 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
} }
else else
{ {
if (cmd == MYSQL_REPLY_ERR && m_sescmd_responses[id] != MYSQL_REPLY_ERR)
{
MXS_INFO("Session command failed on slave '%s': %s",
backend->name(), extract_error(*ppPacket).c_str());
}
discard_if_response_differs(backend, m_sescmd_responses[id], cmd, sescmd); discard_if_response_differs(backend, m_sescmd_responses[id], cmd, sescmd);
} }