mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-30 16:42:06 +08:00
mdbx: fix reset of comparison functions on change MainDB flags (backport).
This commit is contained in:
parent
61d19dcf95
commit
0fae7f98da
@ -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 */
|
/* make sure flags changes get committed */
|
||||||
txn->mt_dbs[dbi].md_flags = user_flags & DB_PERSISTENT_FLAGS;
|
txn->mt_dbs[dbi].md_flags = user_flags & DB_PERSISTENT_FLAGS;
|
||||||
txn->mt_flags |= MDBX_TXN_DIRTY;
|
txn->mt_flags |= MDBX_TXN_DIRTY;
|
||||||
|
/* обнуляем компараторы для установки в соответствии с флагами,
|
||||||
|
* либо заданных пользователем */
|
||||||
|
txn->mt_dbxs[dbi].md_cmp = nullptr;
|
||||||
|
txn->mt_dbxs[dbi].md_dcmp = nullptr;
|
||||||
} else {
|
} else {
|
||||||
return /* FIXME: return extended info */ MDBX_INCOMPATIBLE;
|
return /* FIXME: return extended info */ MDBX_INCOMPATIBLE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user