From b209e91ad411a63434ffe4feb256fb3f2908a2db Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Mon, 2 Nov 2020 23:54:13 +0300 Subject: [PATCH] mdbx: zeroed `mc_top` while tracking nested cursors. This avoids scanning dummy cursors during tracking. Change-Id: Id4edc665010215b4a946f9438475691f1387313c --- src/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core.c b/src/core.c index 19cac114..633fa98d 100644 --- a/src/core.c +++ b/src/core.c @@ -3618,6 +3618,7 @@ static __maybe_unused bool cursor_is_tracked(const MDBX_cursor *mc) { MDBX_cursor *tracked = &(mn); \ if ((mn).mc_flags & C_SUB) { \ mc_dummy.mc_flags = C_INITIALIZED; \ + mc_dummy.mc_top = 0; \ mc_dummy.mc_xcursor = (MDBX_xcursor *)&(mn); \ tracked = &mc_dummy; \ } \