Merge branch '2.3' into develop

This commit is contained in:
Markus Mäkelä
2019-06-20 14:36:48 +03:00
3 changed files with 19 additions and 11 deletions

View File

@ -1178,6 +1178,12 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, RWBackend* target, bool
*/
bool success = target->write(send_buf, response);
if (orig_id)
{
// Put the original ID back in case we try to route the query again
replace_binary_ps_id(querybuf, orig_id);
}
if (success)
{
if (store)
@ -1219,12 +1225,6 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, RWBackend* target, bool
}
else
{
if (orig_id)
{
// Put the original ID back in case we try to route the query again
replace_binary_ps_id(querybuf, orig_id);
}
MXS_ERROR("Routing query failed.");
}

View File

@ -994,7 +994,7 @@ void RWSplitSession::handleError(GWBUF* errmsgbuf,
if (m_current_master && m_current_master->in_use() && m_current_master == backend)
{
MXS_INFO("Master '%s' failed", backend->name());
MXS_INFO("Master '%s' failed: %s", backend->name(), extract_error(errmsgbuf).c_str());
/** The connection to the master has failed */
if (!backend->is_waiting_result())
@ -1066,7 +1066,7 @@ void RWSplitSession::handleError(GWBUF* errmsgbuf,
}
else
{
MXS_INFO("Slave '%s' failed", backend->name());
MXS_INFO("Slave '%s' failed: %s", backend->name(), extract_error(errmsgbuf).c_str());
if (m_target_node && m_target_node == backend
&& session_trx_is_read_only(problem_dcb->session))
{