MXS-2450: Don't discard history if it's disabled
If the session command history is not enabled, it shouldn't be discarded when a COM_CHANGE_USER is executed.
This commit is contained in:
@ -162,9 +162,10 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
|
||||
*ppPacket = NULL;
|
||||
}
|
||||
|
||||
if (m_expected_responses == 0
|
||||
if (m_expected_responses == 0 && !m_config.disable_sescmd_history
|
||||
&& (command == MXS_COM_CHANGE_USER || command == MXS_COM_RESET_CONNECTION))
|
||||
{
|
||||
mxb_assert_message(!m_sescmd_list.empty(), "Must have stored session commands");
|
||||
mxb_assert_message(m_slave_responses.empty(), "All responses should've been processed");
|
||||
// This is the last session command to finish that resets the session state, reset the history
|
||||
MXS_INFO("Resetting session command history (length: %lu)", m_sescmd_list.size());
|
||||
|
Reference in New Issue
Block a user