Opened 15 years ago
Closed 15 years ago
#3042 closed defect (fixed)
Problem with OGC Filter FEATUREID and WFS with type ORACLESPATIAL
Reported by: | msmitherdc | Owned by: | assefa |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | WFS Server | Version: | 5.4 |
Severity: | normal | Keywords: | oraclespatial, featureid, filter, where |
Cc: | dmorissette, aboudreault |
Description
When querying an Oracle Spatial layer using WFS and passing a FEATUREID filter, the constructed sql query is missing parens around the collected OR predicates. It is missing 2 opening parens and the closing parens before the SDO_FILTER part and there is a quote character outside the last parens when it should be inside.
This looks to be in mapogcfilter.c
example call:
returns
<ServiceExceptionReport version="1.2.0" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd"> <ServiceException code="NoApplicableCode" locator="mapserv"> msWFSGetFeature: WFS server error. FLTApplyFilterToLayer() failed msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-00933: SQL command not properly ended
Query statement: SELECT objectid, PERCENTILE, SHAPE FROM METAR.USGS_REALSTX WHERE objectid = '7759') OR (objectid = '7760') OR (objectid = '7761') OR (objectid = '7762') OR (objectid = '7792') OR (objectid = '7794') OR (objectid = '7795') OR (objectid = '7796') OR (objectid = '7797') OR (objectid = '7810') OR (objectid = '7811') OR (objectid = '7812)' AND SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, 8265, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(-177.47,13.43,-64.71,72.55) ),'querytype=window') = 'TRUE' . Check your data statement.
Attachments (1)
Change History (7)
comment:1 by , 15 years ago
Owner: | changed from | to
---|
comment:2 by , 15 years ago
Milestone: | → 5.6 release |
---|
Assefa, Mike, can we get this in the 5.6 release?
comment:3 by , 15 years ago
Cc: | added |
---|
comment:4 by , 15 years ago
The correction was made in the trunk. Is it possible to do a test on an Oracle layer and report? Thanks.
From what I can see using the 5.4.x branch, It was missing the enclosing brackets for the whole expressions but the first opening bracket should be there. Here is is I had on my tests:
I have attached a patch (against the 5.4.x branch) here that puts the enclosing brackets. I do not have oracle installed locally to test it fully so if you are able to test it, that would be great. if not I will install oracle to do some local tests.