Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#2613 closed defect (fixed)

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 (1)

ms_sanitize_more.v1.patch (1.2 KB ) - added by dfuhry 16 years ago.

Download all attachments as: .zip

Change History (4)

by dfuhry, 16 years ago

Attachment: ms_sanitize_more.v1.patch added

comment:1 by pramsey, 16 years ago

Cc: havard.tveite@… added
Owner: changed from mapserver-bugs@… to pramsey
Status: newassigned

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

comment:2 by pramsey, 16 years ago

Resolution: fixed
Status: assignedclosed

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

comment:3 by havatv, 16 years ago

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.