mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-29 23:19:20 +08:00
mdbx: separate and describe MDBX_DB_ACCEDE.
Change-Id: I1a846d196eb00138c1c5ec453537757b1df78d31
This commit is contained in:
parent
b3dde2bafc
commit
3bcf808005
14
mdbx.h
14
mdbx.h
@ -1063,7 +1063,19 @@ enum MDBX_db_flags_t {
|
||||
MDBX_REVERSEDUP = UINT32_C(0x40),
|
||||
|
||||
/** Create DB if not already existing */
|
||||
MDBX_CREATE = UINT32_C(0x40000)
|
||||
MDBX_CREATE = UINT32_C(0x40000),
|
||||
|
||||
/** Opens an existing sub-database created with unknown flags.
|
||||
*
|
||||
* The `MDBX_DB_ACCEDE` flag is intend to open a existing sub-database which
|
||||
* was created with unknown flags (\ref MDBX_REVERSEKEY, \ref MDBX_DUPSORT,
|
||||
* \ref MDBX_INTEGERKEY, \ref MDBX_DUPFIXED, \ref MDBX_INTEGERDUP and
|
||||
* \ref MDBX_REVERSEDUP).
|
||||
*
|
||||
* In such cases, instead of returning the \ref MDBX_INCOMPATIBLE error, the
|
||||
* sub-database will be opened with flags which it was created, and then an
|
||||
* application could determine the actual flags by \ref mdbx_dbi_flags(). */
|
||||
MDBX_DB_ACCEDE = MDBX_ACCEDE
|
||||
};
|
||||
#ifndef __cplusplus
|
||||
/** \ingroup c_dbi */
|
||||
|
@ -575,7 +575,7 @@ static int process_db(MDBX_dbi dbi_handle, char *dbi_name, visitor *handler,
|
||||
|
||||
if (dbi_handle == ~0u) {
|
||||
rc = mdbx_dbi_open_ex(
|
||||
txn, dbi_name, MDBX_ACCEDE, &dbi_handle,
|
||||
txn, dbi_name, MDBX_DB_ACCEDE, &dbi_handle,
|
||||
(dbi_name && ignore_wrong_order) ? equal_or_greater : nullptr,
|
||||
(dbi_name && ignore_wrong_order) ? equal_or_greater : nullptr);
|
||||
if (rc) {
|
||||
|
Loading…
Reference in New Issue
Block a user