Ticket #2613 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

PostGIS connection not always sanitized after failed query

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

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 Download (1.2 KB) - added by dfuhry 5 years ago.

Change History

Changed 5 years ago by dfuhry

Changed 5 years ago by pramsey

  • cc havard.tveite@… added
  • owner changed from mapserver-bugs@… to pramsey
  • status changed from new to assigned

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

Changed 5 years ago by pramsey

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

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

Changed 5 years ago 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.

Note: See TracTickets for help on using tickets.