mdbx: fix compatibility (use zero for invalid DBI).

Change-Id: I4ab6430eb96d97991cbd0c151dfd98a9930805d2
This commit is contained in:
Leonid Yuriev 2020-01-27 03:00:13 +03:00
parent d159a8252d
commit 2c08ec21fd

View File

@ -15818,7 +15818,7 @@ int mdbx_dbi_open_ex(MDBX_txn *txn, const char *table_name, unsigned user_flags,
MDBX_cmp_func *datacmp) {
if (unlikely(!dbi || (user_flags & ~VALID_FLAGS) != 0))
return MDBX_EINVAL;
*dbi = (MDBX_dbi)-1;
*dbi = 0;
int rc = check_txn(txn, MDBX_TXN_BLOCKED);
if (unlikely(rc != MDBX_SUCCESS))