s4-drs: spelling fix, and simpler search expression
authorAndrew Tridgell <tridge@samba.org>
Sat, 12 Sep 2009 02:08:34 +0000 (12:08 +1000)
committerAndrew Tridgell <tridge@samba.org>
Sat, 12 Sep 2009 02:08:34 +0000 (12:08 +1000)
uSNChanged>=N is good enough, and offers a possibility of a simple
optimisation where the partition module could look for that expression
and check the partitions sequence number, then avoid searching a
partition that doesn't have any records with a larger uSN.

source4/rpc_server/drsuapi/getncchanges.c

index 725a380f89b1f682b71102ed82f04037894b9533..7183b2f45bf0927ee31e3f4fdb6f87039f85b617 100644 (file)
@@ -315,7 +315,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
        ncRoot_dn = ldb_dn_new(mem_ctx, sam_ctx, ncRoot->dn);
        ret = drsuapi_search_with_extended_dn(sam_ctx, mem_ctx, &site_res,
                                              ncRoot_dn, LDB_SCOPE_SUBTREE, attrs,
-                                             "(&(uSNChanged>=%llu)(objectClass=*))", 
+                                             "uSNChanged>=%llu", 
                                              (unsigned long long)r->in.req->req8.highwatermark.highest_usn);
        if (ret != LDB_SUCCESS) {
                return WERR_DS_DRA_INTERNAL_ERROR;
@@ -390,7 +390,7 @@ WERROR dcesrv_drsuapi_DsGetNCChanges(struct dcesrv_call_state *dce_call, TALLOC_
        }
 
 
-       DEBUG(4,("DsGetNSChanges with uSNChanged >= %llu on %s gave %u objects\n", 
+       DEBUG(4,("DsGetNCChanges with uSNChanged >= %llu on %s gave %u objects\n", 
                 (unsigned long long)r->in.req->req8.highwatermark.highest_usn,
                 ncRoot->dn, r->out.ctr->ctr6.object_count));