Permalink
Browse files

Rolled back bc4ccf0 to fix pagination loop issue #4508 with oracle sp…

…atial layers
  • Loading branch information...
1 parent 46a9c0c commit 2fb006da6758b5537bcc234583fb4e058d60657a @unicolet unicolet committed Nov 6, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 maporaclespatial.c
View
@@ -2148,9 +2148,6 @@ int msOracleSpatialLayerNextShape( layerObj *layer, shapeObj *shape )
do {
/* is buffer empty? */
if (sthand->row >= sthand->rows_fetched) {
- if (sthand->row_num >= sthand->rows_count)
- return MS_DONE;
-
/* fetch more */
success = TRY( hand, OCIStmtFetch2( sthand->stmthp, hand->errhp, (ub4)ARRAY_SIZE, (ub2)OCI_FETCH_NEXT, (sb4)0, (ub4)OCI_DEFAULT ) )
&& TRY( hand, OCIAttrGet( (dvoid *)sthand->stmthp, (ub4)OCI_HTYPE_STMT, (dvoid *)&sthand->rows_fetched, (ub4 *)0, (ub4)OCI_ATTR_ROWS_FETCHED, hand->errhp ) )
@@ -2159,6 +2156,8 @@ int msOracleSpatialLayerNextShape( layerObj *layer, shapeObj *shape )
if(layer->debug >= 4 )
msDebug("msOracleSpatialLayerNextShape on layer %p, Fetched %d more rows (%d total)\n", layer, sthand->rows_fetched, sthand->rows_count);
+ if (sthand->row_num >= sthand->rows_count)
+ return MS_DONE;
if (!success || sthand->rows_fetched == 0)
return MS_DONE;

0 comments on commit 2fb006d

Please sign in to comment.