mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-06 19:04:12 +08:00
mdbx: fix 'db_dummy' inside mdbx_dbi_open_ex().
Change-Id: I70a21c9b77a43c5af749da5723fa965487a056b0
This commit is contained in:
parent
d72ba6fd69
commit
6a51343b89
@ -10922,10 +10922,10 @@ int mdbx_dbi_open_ex(MDBX_txn *txn, const char *table_name, unsigned user_flags,
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned dbflag = DB_FRESH | DB_VALID | DB_USRVALID;
|
unsigned dbflag = DB_FRESH | DB_VALID | DB_USRVALID;
|
||||||
|
MDBX_db db_dummy;
|
||||||
if (unlikely(rc)) {
|
if (unlikely(rc)) {
|
||||||
/* MDBX_NOTFOUND and MDBX_CREATE: Create new DB */
|
/* MDBX_NOTFOUND and MDBX_CREATE: Create new DB */
|
||||||
assert(rc == MDBX_NOTFOUND);
|
assert(rc == MDBX_NOTFOUND);
|
||||||
MDBX_db db_dummy;
|
|
||||||
memset(&db_dummy, 0, sizeof(db_dummy));
|
memset(&db_dummy, 0, sizeof(db_dummy));
|
||||||
db_dummy.md_root = P_INVALID;
|
db_dummy.md_root = P_INVALID;
|
||||||
db_dummy.md_flags = user_flags & PERSISTENT_FLAGS;
|
db_dummy.md_flags = user_flags & PERSISTENT_FLAGS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user