Hi list,<br><br>SLD support against Oracle is broken in MS 5.0 unfortunately. We&#39;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-&gt;class[0]);<br><br>the code already has a comment like which indicates this could be a problem:<br><br>&nbsp;&nbsp;&nbsp; /* TODO: Doesn&#39;t this code leak the contents of any pre-existing class
<br>&nbsp;&nbsp;&nbsp;&nbsp; * in the layer???<br>&nbsp;&nbsp;&nbsp;&nbsp; */<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 &amp;&amp; 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&#39;s better to always use parantheses around the FILTER, since otherwise OR and AND won&#39;t work correctly as intended, so change line 929 from:
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else //POSTGIS OR ORACLE if (lp-&gt;connectiontype == MS_POSTGIS)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sprintf(pszBuffer, &quot;%s&quot;, szExpression);<br><br>to<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else //POSTGIS OR ORACLE if (lp-&gt;connectiontype == MS_POSTGIS)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sprintf(pszBuffer, &quot;(%s)&quot;, szExpression);<br><br>Hope this helps.<br><br>Best regards,<br>Bart<br>