fix root entry deletion

This commit is contained in:
Pierangelo Masarati 2005-11-06 23:33:41 +00:00
parent 40cac2e37a
commit dbb88f203b

View File

@ -217,16 +217,19 @@ backsql_delete( Operation *op, SlapReply *rs )
/* /*
* Get the parent * Get the parent
*/ */
if ( !be_issuffix( op->o_bd, &op->o_req_ndn ) ) {
dnParent( &op->o_req_ndn, &pdn ); dnParent( &op->o_req_ndn, &pdn );
bsi.bsi_e = &p; bsi.bsi_e = &p;
e_id = bsi.bsi_base_id; e_id = bsi.bsi_base_id;
rs->sr_err = backsql_init_search( &bsi, &pdn, rs->sr_err = backsql_init_search( &bsi, &pdn,
LDAP_SCOPE_BASE, LDAP_SCOPE_BASE,
(time_t)(-1), NULL, dbh, op, rs, slap_anlist_no_attrs, (time_t)(-1), NULL, dbh, op, rs,
slap_anlist_no_attrs,
BACKSQL_ISF_GET_ENTRY ); BACKSQL_ISF_GET_ENTRY );
if ( rs->sr_err != LDAP_SUCCESS ) { if ( rs->sr_err != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE, "backsql_delete(): " Debug( LDAP_DEBUG_TRACE, "backsql_delete(): "
"could not retrieve deleteDN ID - no such entry\n", "could not retrieve deleteDN ID "
"- no such entry\n",
0, 0, 0 ); 0, 0, 0 );
e = &p; e = &p;
goto done; goto done;
@ -246,6 +249,7 @@ backsql_delete( Operation *op, SlapReply *rs )
goto done; goto done;
} }
}
/* avl_apply ... */ /* avl_apply ... */
rs->sr_err = backsql_delete_all_attrs( op, rs, dbh, &e_id, oc ); rs->sr_err = backsql_delete_all_attrs( op, rs, dbh, &e_id, oc );