Permalink
Browse files

applied patch by Benedikt, works for me

  • Loading branch information...
1 parent d206d4d commit 8f66815e88226dc438689ffb6de4b124c64316e6 @unicolet unicolet committed Nov 28, 2012
Showing with 8 additions and 10 deletions.
  1. +8 −10 maporaclespatial.c
View
@@ -2153,15 +2153,14 @@ int msOracleSpatialLayerNextShape( layerObj *layer, shapeObj *shape )
&& TRY( hand, OCIAttrGet( (dvoid *)sthand->stmthp, (ub4)OCI_HTYPE_STMT, (dvoid *)&sthand->rows_fetched, (ub4 *)0, (ub4)OCI_ATTR_ROWS_FETCHED, hand->errhp ) )
&& TRY( hand, OCIAttrGet( (dvoid *)sthand->stmthp, (ub4)OCI_HTYPE_STMT, (dvoid *)&sthand->rows_count, (ub4 *)0, (ub4)OCI_ATTR_ROW_COUNT, hand->errhp ) );
+
+ if (!success || sthand->rows_fetched == 0 || sthand->row_num >= sthand->rows_count) {
+ hand->last_oci_status=MS_SUCCESS;
+ return MS_DONE;
+ }
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;
-
sthand->row = 0; /* reset buffer row index */
}
@@ -3156,11 +3155,10 @@ int msOracleSpatialLayerGetExtent(layerObj *layer, rectObj *extent)
success = TRY( hand, OCIStmtFetch( sthand->stmthp, hand->errhp, (ub4)ARRAY_SIZE, (ub2)OCI_FETCH_NEXT, (ub4)OCI_DEFAULT ) )
&& TRY( hand, OCIAttrGet( (dvoid *)sthand->stmthp, (ub4)OCI_HTYPE_STMT, (dvoid *)&sthand->rows_fetched, (ub4 *)0, (ub4)OCI_ATTR_ROW_COUNT, hand->errhp ) );
- if (!success || sthand->rows_fetched == 0)
- break;
-
- if (sthand->row_num >= sthand->rows_fetched)
+ if (!success || sthand->rows_fetched == 0 || sthand->row_num >= sthand->rows_fetched) {
+ hand->last_oci_status=MS_SUCCESS;
break;
+ }
sthand->row = 0; /* reset row index */
}

0 comments on commit 8f66815

Please sign in to comment.