From a7379d7ae2baa3fba82ae04a98ea3fa07c5a670f Mon Sep 17 00:00:00 2001 From: Esa Korhonen Date: Mon, 6 Mar 2017 19:10:57 +0200 Subject: [PATCH] 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. --- server/core/session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/server/core/session.c b/server/core/session.c index f4de7b7d7..fff7f9832 100644 --- a/server/core/session.c +++ b/server/core/session.c @@ -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)