[mapserver-commits] r9778 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Thu Feb 4 14:01:12 EST 2010
Author: assefa
Date: 2010-02-04 14:01:11 -0500 (Thu, 04 Feb 2010)
New Revision: 9778
Modified:
trunk/mapserver/maporaclespatial.c
Log:
correct oracle query string when used with layer's filter and maxfeatures #3290
Modified: trunk/mapserver/maporaclespatial.c
===================================================================
--- trunk/mapserver/maporaclespatial.c 2010-02-04 18:02:40 UTC (rev 9777)
+++ trunk/mapserver/maporaclespatial.c 2010-02-04 19:01:11 UTC (rev 9778)
@@ -2017,10 +2017,12 @@
if (layer->maxfeatures > 0 && layer->startindex < 0)
{
- if (function == FUNCTION_NONE)
+ if (function == FUNCTION_NONE && layer->filter.string == NULL)
sprintf( query_str + strlen(query_str), "%s"," WHERE ");
- sprintf( query_str + strlen(query_str), " ROWNUM<=%d ", layer->maxfeatures);
- if (function != FUNCTION_NONE)
+ else if (function == FUNCTION_NONE && layer->filter.string != NULL)
+ sprintf( query_str + strlen(query_str), "%s"," AND ");
+ sprintf( query_str + strlen(query_str), " ROWNUM<=%d ", layer->maxfeatures);
+ if (function != FUNCTION_NONE)
sprintf (query_str + strlen(query_str), " AND ");
}
More information about the mapserver-commits
mailing list