]> git.sur5r.net Git - openldap/commitdiff
minor improvements
authorPierangelo Masarati <ando@openldap.org>
Sat, 11 Sep 2004 16:16:41 +0000 (16:16 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 11 Sep 2004 16:16:41 +0000 (16:16 +0000)
servers/slapd/back-sql/delete.c
servers/slapd/back-sql/modrdn.c

index beed3cd95d498e570d92bf2373ee6d9aacc41c36..31d0ef8c107a82f560c4f52e68b69a3355d536a6 100644 (file)
@@ -163,6 +163,12 @@ backsql_delete( Operation *op, SlapReply *rs )
                goto done;
        }
 
+       /* avl_apply ... */
+       rs->sr_err = backsql_delete_all_attrs( op, rs, dbh, &e_id, oc );
+       if ( rs->sr_err != LDAP_SUCCESS ) {
+               goto done;
+       }
+
        rc = backsql_Prepare( dbh, &sth, oc->bom_delete_proc, 0 );
        if ( rc != SQL_SUCCESS ) {
                Debug( LDAP_DEBUG_TRACE,
@@ -206,12 +212,6 @@ backsql_delete( Operation *op, SlapReply *rs )
        }
        SQLFreeStmt( sth, SQL_DROP );
 
-       /* avl_apply ... */
-       rs->sr_err = backsql_delete_all_attrs( op, rs, dbh, &e_id, oc );
-       if ( rs->sr_err != LDAP_SUCCESS ) {
-               goto done;
-       }
-
        /* delete "auxiliary" objectClasses, if any... */
        rc = backsql_Prepare( dbh, &sth, bi->delobjclasses_query, 0 );
        if ( rc != SQL_SUCCESS ) {
index c17f90415b3d617bfc5066dc131f567a0408275f..419065ccf6115663a01d5e35a06ad97fd9f37468 100644 (file)
@@ -69,7 +69,8 @@ backsql_modrdn( Operation *op, SlapReply *rs )
        rs->sr_err = backsql_dn2id( bi, &e_id, dbh, &op->o_req_ndn );
        if ( rs->sr_err != LDAP_SUCCESS ) {
                Debug( LDAP_DEBUG_TRACE, "   backsql_modrdn(): "
-                       "could not lookup entry id\n", 0, 0, 0 );
+                       "could not lookup entry id (%d)\n",
+                       rs->sr_err, 0, 0 );
                rs->sr_text = ( rs->sr_err == LDAP_OTHER )
                        ?  "SQL-backend error" : NULL;
                send_ldap_result( op, rs );