]> git.sur5r.net Git - openldap/commitdiff
fix NOOP return code (ITS#4563; I'll check and confirm it later; NOOP support might...
authorPierangelo Masarati <ando@openldap.org>
Thu, 25 May 2006 16:58:41 +0000 (16:58 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 25 May 2006 16:58:41 +0000 (16:58 +0000)
servers/slapd/back-sql/add.c
servers/slapd/back-sql/delete.c
servers/slapd/back-sql/modify.c
servers/slapd/back-sql/modrdn.c

index 078df583a1728668eaee3de434789e9d52086921..eb24f67b928cd61e29a50932023c521973690df6 100644 (file)
@@ -1461,6 +1461,7 @@ done:;
                SQLUSMALLINT    CompletionType = SQL_ROLLBACK;
 
                if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
+                       assert( e == NULL );
                        CompletionType = SQL_COMMIT;
                }
 
@@ -1503,6 +1504,10 @@ done:;
                }
        }
 
+       if ( op->o_noop && rs->sr_err == LDAP_SUCCESS ) {
+               rs->sr_err = LDAP_X_NO_OPERATION;
+       }
+
        send_ldap_result( op, rs );
        slap_graduate_commit_csn( op );
 
index a6656a89844014fcd3221e2b21f3ff0d736dcaac..7f010fb083af0efa8c44e7a5cca4cc1464a4b5a6 100644 (file)
@@ -441,6 +441,7 @@ backsql_delete( Operation *op, SlapReply *rs )
                SQLUSMALLINT    CompletionType = SQL_ROLLBACK;
        
                if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
+                       assert( e == NULL );
                        CompletionType = SQL_COMMIT;
                }
 
@@ -462,6 +463,10 @@ done:;
                }
        }
 
+       if ( op->o_noop && rs->sr_err == LDAP_SUCCESS ) {
+               rs->sr_err = LDAP_X_NO_OPERATION;
+       }
+
        send_ldap_result( op, rs );
 
        Debug( LDAP_DEBUG_TRACE, "<==backsql_delete()\n", 0, 0, 0 );
index a3a93d983790d8751e76f84eac61a3048fa88dc7..df1c95341e5f8fc77cdfd148abaf5c5c081c62ac 100644 (file)
@@ -168,6 +168,7 @@ do_transact:;
         * Commit only if all operations succeed
         */
        if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop ) {
+               assert( e == NULL );
                CompletionType = SQL_COMMIT;
        }
 
@@ -188,6 +189,10 @@ done:;
                }
        }
 
+       if ( op->o_noop && rs->sr_err == LDAP_SUCCESS ) {
+               rs->sr_err = LDAP_X_NO_OPERATION;
+       }
+
        send_ldap_result( op, rs );
        slap_graduate_commit_csn( op );
 
index 1c81cead296a9a68023a045965eb1983988313ed..67940a58ba881d3e649c0ffc6a2ca950bc595729 100644 (file)
@@ -491,6 +491,10 @@ done:;
                SQLTransact( SQL_NULL_HENV, dbh, CompletionType );
        }
 
+       if ( op->o_noop && rs->sr_err == LDAP_SUCCESS ) {
+               rs->sr_err = LDAP_X_NO_OPERATION;
+       }
+
        send_ldap_result( op, rs );
        slap_graduate_commit_csn( op );