[mapserver-commits] r7576 - branches/branch-5-0/mapserver

svn at osgeo.org svn at osgeo.org
Mon May 12 11:20:41 EDT 2008


Author: pramsey
Date: 2008-05-12 11:20:41 -0400 (Mon, 12 May 2008)
New Revision: 7576

Modified:
   branches/branch-5-0/mapserver/HISTORY.TXT
   branches/branch-5-0/mapserver/mappostgis.c
Log:
Fix PostGIS transaction behavior in fcgi situations (#2613)



Modified: branches/branch-5-0/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-0/mapserver/HISTORY.TXT	2008-05-12 15:19:48 UTC (rev 7575)
+++ branches/branch-5-0/mapserver/HISTORY.TXT	2008-05-12 15:20:41 UTC (rev 7576)
@@ -22,7 +22,7 @@
 - WFS Multipoint query with PostGIS bug fixed (#2443)
 
 - mappostgis.c: Fixed overlapping transactions causing core
-  dump in fcgi (#2497)
+  dump in fcgi (#2497, #2613)
 
 - mapagg.cpp: Fixed rendering of non filled vector symbols (#2585)
 

Modified: branches/branch-5-0/mapserver/mappostgis.c
===================================================================
--- branches/branch-5-0/mapserver/mappostgis.c	2008-05-12 15:19:48 UTC (rev 7575)
+++ branches/branch-5-0/mapserver/mappostgis.c	2008-05-12 15:20:41 UTC (rev 7576)
@@ -699,7 +699,12 @@
             query_result = PQexec(layerinfo->conn, cmd_buffer );
             if(query_result) {
                 PQclear(query_result);
-            }
+            } else {
+              if (msPOSTGISSanitizeConnection(layerinfo->conn) != MS_SUCCESS)
+	      {
+                return MS_FAILURE;
+	      }
+	    }
 
             layerinfo->cursor_name[0] = '\0';
         }
@@ -1433,7 +1438,9 @@
 
         if(query_result) {
             PQclear(query_result);
-        }
+        } else {
+            msPOSTGISSanitizeConnection(layerinfo->conn);
+	}
 
         free(sql);
         free(geom_column_name);
@@ -1611,6 +1618,7 @@
           msDebug("msPOSTGISLayerRetrievePGVersion: No results returned.\n");
         }
         free(tmp2);
+        msPOSTGISSanitizeConnection(layerinfo->conn);
         return(MS_FAILURE);
 
     }
@@ -1758,6 +1766,7 @@
       msSetError(MS_QUERYERR, tmp2, "msPOSTGISLayerRetrievePK()");
       free(tmp2);
       free(sql);
+      msPOSTGISSanitizeConnection(layerinfo->conn);
       return(MS_FAILURE);
 
     }



More information about the mapserver-commits mailing list