MXS-2464: Fix crash on failed session command

If the master fails when a session command is being executed with
delayed_retry enabled, a null query would get placed into the query
queue. This change simply prevents the crash and closes the session even
though the query could be retried.
This commit is contained in:
Markus Mäkelä
2019-05-31 07:58:57 +03:00
parent 13b258a151
commit 625740e69d

View File

@ -945,7 +945,7 @@ void RWSplitSession::handleError(GWBUF* errmsgbuf,
m_expected_responses--;
errmsg += " Lost connection to master server while waiting for a result.";
if (can_retry_query())
if (m_current_query.get() && can_retry_query())
{
can_continue = true;
retry_query(m_current_query.release());