MXS-1165 MaxInfo endless loop

If one queried in MySQL MaxInfo 'show sessions' or 'show clients',
MaxScale would go in an endless loop and finally crash when memory
ran out. The reason is the rather confusing callback-based dcb-
iterating code. Adding one line fixes the issue, although the iteration
is still rather awkward with calling dcb_foreach for every session/
client.
This commit is contained in:
Esa Korhonen 2017-03-06 19:10:57 +02:00
parent b4d81ffe27
commit a7379d7ae2

View File

@ -769,6 +769,7 @@ sessionRowCallback(RESULTSET *set, void *data)
SESSIONFILTER *cbdata = (SESSIONFILTER*)data;
RESULT_ROW *row = NULL;
cbdata->current = 0;
dcb_foreach(dcb_iter_cb, cbdata);
if (cbdata->row)