be->be_suffix[0].bv_val, 0, 0 );
return -1;
}
+ if ( rc == ALOCK_CLEAN )
+ be->be_flags |= SLAP_DBFLAG_CLEAN;
/*
* The DB_CONFIG file may have changed. If so, recover the
si->si_sids = slap_parse_csn_sids( si->si_ctxcsn, a->a_numvals, NULL );
}
overlay_entry_release_ov( op, e, 0, on );
- if ( si->si_ctxcsn ) {
+ if ( si->si_ctxcsn && !SLAP_DBCLEAN( be )) {
op->o_req_dn = be->be_suffix[0];
op->o_req_ndn = be->be_nsuffix[0];
op->ors_scope = LDAP_SCOPE_SUBTREE;
#define SLAP_DBFLAG_SINGLE_SHADOW 0x4000U /* a single-master shadow */
#define SLAP_DBFLAG_SYNC_SHADOW 0x1000U /* a sync shadow */
#define SLAP_DBFLAG_SLURP_SHADOW 0x2000U /* a slurp shadow */
+#define SLAP_DBFLAG_CLEAN 0x10000U /* was cleanly shutdown */
slap_mask_t be_flags;
#define SLAP_DBFLAGS(be) ((be)->be_flags)
#define SLAP_NOLASTMOD(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_NOLASTMOD)
#define SLAP_SLURP_SHADOW(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_SLURP_SHADOW)
#define SLAP_SINGLE_SHADOW(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_SINGLE_SHADOW)
#define SLAP_MULTIMASTER(be) (!SLAP_SINGLE_SHADOW(be))
+#define SLAP_DBCLEAN(be) (SLAP_DBFLAGS(be) & SLAP_DBFLAG_CLEAN)
slap_mask_t be_restrictops; /* restriction operations */
#define SLAP_RESTRICT_OP_ADD 0x0001U