From 0fae7f98da323af2a67e5c2fc112de6ff9502551 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, 31 Mar 2023 00:54:05 +0300 Subject: [PATCH] mdbx: fix reset of comparison functions on change MainDB flags (backport). --- src/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core.c b/src/core.c index add874c8..f41ad8e0 100644 --- a/src/core.c +++ b/src/core.c @@ -20327,6 +20327,10 @@ static int mdbx_dbi_bind(MDBX_txn *txn, const MDBX_dbi dbi, unsigned user_flags, /* make sure flags changes get committed */ txn->mt_dbs[dbi].md_flags = user_flags & DB_PERSISTENT_FLAGS; txn->mt_flags |= MDBX_TXN_DIRTY; + /* обнуляем компараторы для установки в соответствии с флагами, + * либо заданных пользователем */ + txn->mt_dbxs[dbi].md_cmp = nullptr; + txn->mt_dbxs[dbi].md_dcmp = nullptr; } else { return /* FIXME: return extended info */ MDBX_INCOMPATIBLE; }