Commit d1824b14 authored by Pierangelo Masarati's avatar Pierangelo Masarati
Browse files

fix NOOP return code (ITS#4563; I'll check and confirm it later; NOOP support might be broken)

parent ce44bdbc
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment