Ticket #2613 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

PostGIS connection not always sanitized after failed query

Reported by: dfuhry Assigned to: pramsey
Priority: normal Milestone:
Component: PostGIS Interface Version: svn-trunk (development)
Severity: major Keywords: mappostgis.c msPOSTGISSanitizeConnection
Cc: pramsey, havard.tveite@umb.no

Description

Followup from bug #2497. In mappostgis.c, whenever PQexec gets called, if the query has failed, we need to call msPOSTGISSanitizeConnection(layerinfo->conn).

It seems this needs to be done in four additional places:

line 700: msPOSTGISLayerClose()

line 1430: msPOSTGISLayerGetItems()

line 1601: msPOSTGISLayerRetrievePGVersion()

line 1749: msPOSTGISLayerRetrievePK()

Patch attached.

Attachments

ms_sanitize_more.v1.patch (1.2 kB) - added by dfuhry on 05/09/08 19:13:19.

Change History

05/09/08 19:13:19 changed by dfuhry

  • attachment ms_sanitize_more.v1.patch added.

05/09/08 19:29:52 changed by pramsey

  • status changed from new to assigned.
  • owner changed from mapserver-bugs@refractions.net to pramsey.
  • cc changed from pramsey to pramsey, havard.tveite@umb.no.

Havard, can you try this patch with your failure case?

05/12/08 11:21:38 changed by pramsey

  • status changed from assigned to closed.
  • resolution set to fixed.

Applied to trunk (r7575) and branch-5-0 (r7576)

05/14/08 05:17:51 changed by havatv

The patch helped with my failure case (mapserver "crash" due to some single quote problems). After applying the patch, no crash occurred, and, for some reason, the problem query succeeded in getting the points from PostGIS.