Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
MXS-1913: Check session before invoking dcb_foreach callback
If the session is the dummy session, the callback should not be called.
  • Loading branch information
markus456 committed Jun 12, 2018
1 parent d910027 commit 24870e2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions server/core/dcb.cc
Expand Up @@ -2909,10 +2909,15 @@ class SerialDcbTask : public WorkerTask
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;
}
}
}
}
Expand Down

0 comments on commit 24870e2

Please sign in to comment.