Hi list,<br><br>SLD support against Oracle is broken in MS 5.0 unfortunately. We've been debugging the whole morning and have identified the following problems in the source code (mapogcfilter.c):<br><br>1) the classes created by
mapogcsld.c are destroyed because of the following call:<br><br>line 919:<br>initClass(lp->class[0]);<br><br>the code already has a comment like which indicates this could be a problem:<br><br> /* TODO: Doesn't this code leak the contents of any pre-existing class
<br> * in the layer???<br> */<br><br>2) the if clause in FLTLayerApplyCondSQLFilterToLayer never gets entered since bOnlySpatialFilter is always true (it is passed in as MS_TRUE always in the caller function, i.e. return FLTApplyFilterToLayer(psNode, map, iLayerIndex, MS_TRUE);)
<br><br>This means Mapserver always evaluates the query, which is very slow for Oracle, instead of adding a WHERE to the SQL using FILTER. For now we just changed the if clause:<br><br>if (!bOnlySpatialFilter && FLTIsSimpleFilter(psNode))
<br><br>to:<br><br>if (FLTIsSimpleFilter(psNode))<br><br>but someone should look at this more carefully I guess ....<br><br>3) it's better to always use parantheses around the FILTER, since otherwise OR and AND won't work correctly as intended, so change line 929 from:
<br><br> else //POSTGIS OR ORACLE if (lp->connectiontype == MS_POSTGIS)<br> sprintf(pszBuffer, "%s", szExpression);<br><br>to<br><br> else //POSTGIS OR ORACLE if (lp->connectiontype == MS_POSTGIS)
<br> sprintf(pszBuffer, "(%s)", szExpression);<br><br>Hope this helps.<br><br>Best regards,<br>Bart<br>