Opened 14 years ago

Closed 13 years ago

#3234 closed defect (fixed)

msLoadQuery fetches wrong record from DBMS

Reported by: mko Owned by: sdlime
Priority: high Milestone: 5.6.1 release
Component: MapServer C Library Version: svn-trunk (development)
Severity: major Keywords: msLoadQuery, msSaveQuery, MS RFC 52
Cc: mko

Description

In version 5.6.0 msLoadQuery with parameters MS_QUERY_SINGLE, MS_QUERY_BY_INDEX will return a wrong record when using a DBMS. msSaveQuery stores the index of the result set, not the oid or whatever is configured in the mapfile. Thus, the SQL statement looks like WHERE oid=[shapeindex]. This ends in wrong or no results.

Change History (3)

comment:1 by sdlime, 14 years ago

Status: newassigned

comment:2 by sdlime, 14 years ago

Getting back into the swing of things. Can you tell me a bit more about how your using this query type? msSaveQuery() saves the value passed into the CGI as shapeindex. How are you retrieving the value used for the query. For databases you can't use the shape->index from a result shape (from another query) since, as you mention, it refers to the index position in a result set. Instead you have to access the OID or something similar. Shapefiles don't have an index you can get at...

Anyway, a bit more detail on your process will help...

Steve

comment:3 by sdlime, 13 years ago

Resolution: fixed
Status: assignedclosed

No additional feedback provided, marking as fixed. I may well be a valid bug early in the 5.6 versions because we had munged how the index values were stored. It was done differently depending on backend driver. That was fixed in the 5.6.2 (I think) release and I don't believe is a problem any more...

Steve

Note: See TracTickets for help on using tickets.