Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapserver 6: Oracle & layerObj.queryByIndex #4416

Closed
benediktrothe opened this issue Aug 6, 2012 · 3 comments
Closed

Mapserver 6: Oracle & layerObj.queryByIndex #4416

benediktrothe opened this issue Aug 6, 2012 · 3 comments

Comments

@benediktrothe
Copy link

layerObj.queryByIndex doesn't run with oracle-layers.

DESCRIPTION:
The function "msQueryByIndex(mapObj* map)" has a local variable "resultObj record;".
The field "record.resultindex" is never initialized.

In this function the uninitialized record-variable is passed to "msLayerGetShape(...,&record)".

The Oracle-Implementation "msOracleSpatialLayerGetShape" of the msLayerGetShape-Function
evaluates the uninitialized "record.resultindex".

In my case "msOracleSpatialLayerGetShape" threw an error.

SOLUTION (Suggestion):
In msQueryByIndex resultObj record should be initialized.
At least:
record.resultindex = -1;

@tbonfort
Copy link
Member

tbonfort commented Aug 6, 2012

@sdlime , seems reslated to 242af9a
looking at the postgis driver, it seems that the unitialized record->resultindex would also cause issues , c.f in msPostgis LayerGetShape() there's a test for resutindex >= 0

@sdlime
Copy link
Member

sdlime commented Aug 7, 2012

Added initialization in both brach-6-2 and master. Closing... Steve

@benediktrothe
Copy link
Author

Steve & Thomas: Thank you!
Benedikt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants