From 30972102e519c22092595f878bfc6e32392375a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Fri, 25 Nov 2022 18:56:15 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BF=D1=80=D0=B8=20`MDBX=5FPNL=5FASCENDING=3D1`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 089be05b..51184bf1 100644 --- a/src/core.c +++ b/src/core.c @@ -6212,6 +6212,8 @@ MDBX_MAYBE_UNUSED static __always_inline size_t __builtin_clzl(size_t value) { } #endif /* _MSC_VER */ +#if !MDBX_PNL_ASCENDING + #if !defined(MDBX_ATTRIBUTE_TARGET) && \ (__has_attribute(__target__) || __GNUC_PREREQ(5, 0)) #define MDBX_ATTRIBUTE_TARGET(target) __attribute__((__target__(target))) @@ -6525,6 +6527,8 @@ __hot static pgno_t *scan4seq_neon(pgno_t *range, const size_t len, /* Choosing of another variants should be added here. */ #endif /* scan4seq_default */ +#endif /* MDBX_PNL_ASCENDING */ + #ifndef scan4seq_default #define scan4seq_default scan4seq_fallback #endif /* scan4seq_default */ @@ -10518,7 +10522,7 @@ static __inline void txn_merge(MDBX_txn *const parent, MDBX_txn *const txn, DEBUG("refund parent's spilled page %" PRIaPGNO, sl[i] >> 1); i -= 1; } while (i && sl[i] >= (parent->mt_next_pgno << 1)); - MDBX_PNL_GETSIZE(sl) = i; + MDBX_PNL_SETSIZE(sl, i); #else assert(MDBX_PNL_MOST(sl) == MDBX_PNL_FIRST(sl)); size_t i = 0;