diff --git a/mdb_chk.c b/mdb_chk.c index 1315e0cb..972653c5 100644 --- a/mdb_chk.c +++ b/mdb_chk.c @@ -279,7 +279,7 @@ static long handle_maindb(size_t record_number, MDB_val *key, MDB_val* data) { rc = process_db(-1, name, handle_userdb, 0); free(name); - if (rc != MDB_BAD_DBI) + if (rc != MDB_INCOMPATIBLE) return rc; return handle_userdb(record_number, key, data); @@ -302,7 +302,7 @@ static long process_db(MDB_dbi dbi, char *name, visitor *handler, int silent) if (0 > (int) dbi) { rc = mdb_dbi_open(txn, name, 0, &dbi); if (rc) { - if (!name || rc != MDB_BAD_DBI) /* LY: mainDB's record is not a user's DB. */ { + if (!name || rc != MDB_INCOMPATIBLE) /* LY: mainDB's record is not a user's DB. */ { error(" - mdb_open '%s' failed, error %d %s\n", name ? name : "main", rc, mdb_strerror(rc)); }