summaryrefslogtreecommitdiffstats
path: root/ldap/servers/slapd/pblock.c
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2009-08-04 11:54:34 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2009-08-04 11:54:34 -0700
commit0565e8c39894b059191cfaff2176f758141ffe3b (patch)
treec654289fb6104ee5c1ef10f1373da9b9897f0a41 /ldap/servers/slapd/pblock.c
parentcbed8a2780469cdbf298c30e7f10da01c4356d03 (diff)
downloadds-0565e8c39894b059191cfaff2176f758141ffe3b.tar.gz
ds-0565e8c39894b059191cfaff2176f758141ffe3b.tar.xz
ds-0565e8c39894b059191cfaff2176f758141ffe3b.zip
513916 Server doesn't ignore paged control, if page size and server's estimate of total no of entries are same
The code processing search results were returning the PAGE END without knowing there are more entries to return or not. To learn it, introduced "read ahead" one entry when it comes to the PAGE END. If there are more entries, the code undo the read ahead, which prompts for the next page on the client side. If there is no more entries, it returns the status SEARCH END instead of PAGE END. In addition to the read ahead implementation to fix the bug 513916, * supporting Simple Paged Results for chaining backend is added. * fixed a bug in idl_new_fetch (idl_new.c) -- idlistscanlimit was not checked when the cursor comes to the end of an index file.
Diffstat (limited to 'ldap/servers/slapd/pblock.c')
-rw-r--r--ldap/servers/slapd/pblock.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ldap/servers/slapd/pblock.c b/ldap/servers/slapd/pblock.c
index 419ca959..072b6185 100644
--- a/ldap/servers/slapd/pblock.c
+++ b/ldap/servers/slapd/pblock.c
@@ -518,6 +518,12 @@ slapi_pblock_get( Slapi_PBlock *pblock, int arg, void *value )
}
(*(VFPP *)value) = pblock->pb_plugin->plg_search_results_release;
break;
+ case SLAPI_PLUGIN_DB_PREV_SEARCH_RESULTS_FN:
+ if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
+ return( -1 );
+ }
+ (*(VFP *)value) = pblock->pb_plugin->plg_prev_search_results;
+ break;
case SLAPI_PLUGIN_DB_COMPARE_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );
@@ -1824,6 +1830,12 @@ slapi_pblock_set( Slapi_PBlock *pblock, int arg, void *value )
}
pblock->pb_plugin->plg_search_results_release = (VFPP) value;
break;
+ case SLAPI_PLUGIN_DB_PREV_SEARCH_RESULTS_FN:
+ if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
+ return( -1 );
+ }
+ pblock->pb_plugin->plg_prev_search_results = (VFP) value;
+ break;
case SLAPI_PLUGIN_DB_COMPARE_FN:
if ( pblock->pb_plugin->plg_type != SLAPI_PLUGIN_DATABASE ) {
return( -1 );