(From ITS#8958) allow 2.5 slapcat to read 2.4 DB

This commit is contained in:
Howard Chu 2021-08-06 22:50:23 +01:00
parent 6237ae17db
commit d877251b2c

View File

@ -215,6 +215,8 @@ mdb_db_open( BackendDB *be, ConfigReply *cr )
&mdb->mi_dbis[i] );
if ( rc != 0 ) {
/* when read-only, it's ok for ID2VAL or IDXCKP to not exist */
if (( flags & MDB_CREATE ) || ( i < MDB_ID2VAL )) {
snprintf( cr->msg, sizeof(cr->msg), "database \"%s\": "
"mdb_dbi_open(%s/%s) failed: %s (%d).",
be->be_suffix[0].bv_val,
@ -225,6 +227,7 @@ mdb_db_open( BackendDB *be, ConfigReply *cr )
cr->msg );
goto fail;
}
}
if ( i == MDB_ID2ENTRY )
mdb_set_compare( txn, mdb->mi_dbis[i], mdb_id_compare );