[mapserver-commits] r10208 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Jun 7 10:32:44 EDT 2010


Author: aboudreault
Date: 2010-06-07 10:32:43 -0400 (Mon, 07 Jun 2010)
New Revision: 10208

Modified:
   trunk/mapserver/maporaclespatial.c
Log:
Fixed segmentation fault in oracle driver: calling resultsGetShape after a query with no results

Modified: trunk/mapserver/maporaclespatial.c
===================================================================
--- trunk/mapserver/maporaclespatial.c	2010-06-07 03:19:20 UTC (rev 10207)
+++ trunk/mapserver/maporaclespatial.c	2010-06-07 14:32:43 UTC (rev 10208)
@@ -2343,10 +2343,6 @@
          * return msOracleSpatialLayerGetShape(layer, shape, pkey);*/
     }
     
-    if (layer->debug >= 5)
-        msDebug("msOracleSpatialLayerResultGetShape was called. Using the record = %ld of %ld. (shape: %ld should equal pkey: %ld)\n", 
-                record, layer->resultcache->numresults, layer->resultcache->results[record].shapeindex, pkey);
-    
     //record = layer->resultcache->results[record].tileindex; // Do we need to do this? Is record our tile index or an index into the result cache?
         
     if (record >= sthand->rows_count || record < 0)
@@ -2359,6 +2355,10 @@
         return MS_FAILURE;
     }
     
+    if (layer->debug >= 5)
+        msDebug("msOracleSpatialLayerResultGetShape was called. Using the record = %ld of %ld. (shape: %ld should equal pkey: %ld)\n", 
+                record, layer->resultcache->numresults, layer->resultcache->results[record].shapeindex, pkey);
+
     /* NOTE: with the way the resultcache works, we should see items in increasing order, but some may have been filtered out. */
     /* Best case: item in buffer */
     /* Next best case: item is in next fetch block */



More information about the mapserver-commits mailing list