From 1ca870b88c64d38b83cfe0959844ffd422278211 Mon Sep 17 00:00:00 2001 From: hvlad Date: Tue, 8 Nov 2016 12:17:14 +0200 Subject: [PATCH] Respect large scans in new code path --- src/jrd/dpm.epp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/jrd/dpm.epp b/src/jrd/dpm.epp index 082a04066a..9368900a78 100644 --- a/src/jrd/dpm.epp +++ b/src/jrd/dpm.epp @@ -1676,7 +1676,16 @@ bool DPM_next(thread_db* tdbb, record_param* rpb, USHORT lock_type, bool onepage } } - CCH_RELEASE(tdbb, window); + if (window->win_flags & WIN_large_scan) + CCH_RELEASE_TAIL(tdbb, window); + else if (window->win_flags & WIN_garbage_collector && + window->win_flags & WIN_garbage_collect) + { + CCH_RELEASE_TAIL(tdbb, window); + window->win_flags &= ~WIN_garbage_collect; + } + else + CCH_RELEASE(tdbb, window); } // Find the next pointer page, data page, and record