From fc965c57acb2e80c96f1f951e85088f4ee8d8a8a Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 29 Sep 2020 22:15:12 +0300 Subject: [PATCH] mdbx: fix merge_sync_flags() to preserve MDBX_UTTERLY_NOSYNC. Change-Id: I59dbd1ef8ac1747dd20565ff444e4feb5d0e0e71 --- src/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 2fa44cae..aba44542 100644 --- a/src/core.c +++ b/src/core.c @@ -10286,7 +10286,8 @@ static uint32_t merge_sync_flags(const uint32_t a, const uint32_t b) { /* convert MDBX_DEPRECATED_MAPASYNC to MDBX_SAFE_NOSYNC */ if ((r & (MDBX_WRITEMAP | MDBX_DEPRECATED_MAPASYNC)) == - (MDBX_WRITEMAP | MDBX_DEPRECATED_MAPASYNC)) + (MDBX_WRITEMAP | MDBX_DEPRECATED_MAPASYNC) && + !F_ISSET(r, MDBX_UTTERLY_NOSYNC)) r = (r - MDBX_DEPRECATED_MAPASYNC) | MDBX_SAFE_NOSYNC; /* force MDBX_NOMETASYNC if MDBX_SAFE_NOSYNC enabled */