From a01d3f965b697a7ab44e071e619448cfe8711656 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 3 Jun 2014 20:38:21 -0700 Subject: [PATCH] ITS#7870 ignore index DBs in slapcat --- servers/slapd/back-mdb/init.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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); -- 2.39.5