[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Simple paging causes certain searches to not use index? (ITS#3076)



I applied the patch to version 2.2.7, and it worked perfectly.  I also ran "make test" and they all passed.

Thanks a lot!


Dan

PS - I also still have one server running version 2.2.5, and I applied the patch there, and it fixed that one too (as would be expected, I assume)

 


-----Original Message-----
From: Howard Chu [mailto:hyc@highlandsun.com] 
Sent: Monday, April 12, 2004 1:49 PM
To: Armbrust, Daniel C.; openldap-its@OpenLDAP.org
Subject: RE: Simple paging causes certain searches to not use index? (ITS#3076)

Please try this patch and reply with your results:

Index: search.c
===================================================================
RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb/search.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -r1.184 -r1.185
--- search.c    9 Apr 2004 13:54:46 -0000       1.184
+++ search.c    12 Apr 2004 15:59:27 -0000      1.185
@@ -1,5 +1,5 @@
 /* search.c - search operation */
-/* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/search.c,v 1.184 2004/04/09
13:54:46 ando Exp $ */
+/* $OpenLDAP: pkg/ldap/servers/slapd/back-bdb/search.c,v 1.185 2004/04/12
15:59:27 hyc Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
  * Copyright 2000-2004 The OpenLDAP Foundation.
@@ -753,7 +753,7 @@

        if ( get_pagedresults(sop) ) {
                if ( sop->o_pagedresults_state.ps_cookie == 0 ) {
-                       id = 0;
+                       id = bdb_idl_first( candidates, &cursor );

                } else {
                        if ( sop->o_pagedresults_size == 0 ) {

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support

> -----Original Message-----
> From: owner-openldap-bugs@OpenLDAP.org
> [mailto:owner-openldap-bugs@OpenLDAP.org]On Behalf Of
> daniel.armbrust@mayo.edu
> Sent: Monday, April 12, 2004 9:51 AM
> To: openldap-its@OpenLDAP.org
> Subject: Simple paging causes certain searches to not use index?
> (ITS#3076)
>
>