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:
@ -2908,6 +2908,10 @@ public:
|
|||||||
for (DCB *dcb = this_unit.all_dcbs[thread_id];
|
for (DCB *dcb = this_unit.all_dcbs[thread_id];
|
||||||
dcb && atomic_load_int32(&m_more);
|
dcb && atomic_load_int32(&m_more);
|
||||||
dcb = dcb->thread.next)
|
dcb = dcb->thread.next)
|
||||||
|
{
|
||||||
|
ss_dassert(dcb->session);
|
||||||
|
|
||||||
|
if (dcb->session->state != SESSION_STATE_DUMMY)
|
||||||
{
|
{
|
||||||
if (!m_func(dcb, m_data))
|
if (!m_func(dcb, m_data))
|
||||||
{
|
{
|
||||||
@ -2916,6 +2920,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool more() const
|
bool more() const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user