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:
Markus Mäkelä 2018-12-04 12:54:14 +02:00
parent 77477d9648
commit 3cc34f0696
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -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)
{
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");
}
}
}