MXS-1913: Check session before invoking dcb_foreach callback

If the session is the dummy session, the callback should not be called.
This commit is contained in:
Markus Mäkelä 2018-06-12 09:31:24 +03:00
parent d9100278b0
commit 24870e278c
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -2909,10 +2909,15 @@ public:
dcb && atomic_load_int32(&m_more);
dcb = dcb->thread.next)
{
if (!m_func(dcb, m_data))
ss_dassert(dcb->session);
if (dcb->session->state != SESSION_STATE_DUMMY)
{
atomic_store_int32(&m_more, 0);
break;
if (!m_func(dcb, m_data))
{
atomic_store_int32(&m_more, 0);
break;
}
}
}
}