ITS#7870 ignore index DBs in slapcat

This commit is contained in:
Howard Chu 2014-06-03 20:38:21 -07:00
parent 33e12f4de3
commit a01d3f965b

View File

@ -265,11 +265,16 @@ mdb_db_open( BackendDB *be, ConfigReply *cr )
goto fail; goto fail;
} }
/* slapcat doesn't need indexes. avoid a failure if
* a configured index wasn't created yet.
*/
if ( !(slapMode & SLAP_TOOL_READONLY) ) {
rc = mdb_attr_dbs_open( be, txn, cr ); rc = mdb_attr_dbs_open( be, txn, cr );
if ( rc ) { if ( rc ) {
mdb_txn_abort( txn ); mdb_txn_abort( txn );
goto fail; goto fail;
} }
}
rc = mdb_txn_commit(txn); rc = mdb_txn_commit(txn);
if ( rc != 0 ) { if ( rc != 0 ) {