From: Howard Chu Date: Wed, 4 Jun 2014 03:38:21 +0000 (-0700) Subject: ITS#7870 ignore index DBs in slapcat X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a01d3f965b697a7ab44e071e619448cfe8711656;p=openldap ITS#7870 ignore index DBs in slapcat --- diff --git a/servers/slapd/back-mdb/init.c b/servers/slapd/back-mdb/init.c index 34ad9cbc09..d59b207bc6 100644 --- a/servers/slapd/back-mdb/init.c +++ b/servers/slapd/back-mdb/init.c @@ -265,10 +265,15 @@ mdb_db_open( BackendDB *be, ConfigReply *cr ) goto fail; } - rc = mdb_attr_dbs_open( be, txn, cr ); - if ( rc ) { - mdb_txn_abort( txn ); - 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 ); + if ( rc ) { + mdb_txn_abort( txn ); + goto fail; + } } rc = mdb_txn_commit(txn);