MXS-2196: Don't loop over persistent connections
When doing a loop over each DCB, don't process DCBs without sessions. For now this is correct behavior as only DCBs in the persistent pool have no session.
This commit is contained in:
@ -2516,9 +2516,16 @@ void dcb_foreach_local(bool (* func)(DCB* dcb, void* data), void* data)
|
|||||||
|
|
||||||
for (DCB* dcb = this_unit.all_dcbs[thread_id]; dcb; dcb = dcb->thread.next)
|
for (DCB* dcb = this_unit.all_dcbs[thread_id]; dcb; dcb = dcb->thread.next)
|
||||||
{
|
{
|
||||||
if (!func(dcb, data))
|
if (dcb->session)
|
||||||
{
|
{
|
||||||
break;
|
if (!func(dcb, data))
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mxb_assert_message(dcb->persistentstart > 0, "The DCB must be in a connection pool");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user