On 03/06/2012 01:36 PM, ricardo.julio.rodriguez.fernan...@sergas.es wrote:
Hi!

Cleaning some spaces on a XWiki installation I've found a query that eats 100% 
CPU and never (at least not for some 20 minutes) through results. I deleted it 
but, please, could you check it to see if it contains an obvious error and, 
even in this case, see if some thing could be done to avoid submitting 
dangerous queries?

#set($query = ", BaseObject as obj, StringProperty as prop where doc.fullName = obj.name 
and obj.className='XWiki.XWikiGroups' and doc.fullName<>  'XWiki.XWikiGroupTemplate' 
order by doc.fullName asc")

You're adding StringProperty as prop to the query, but you put no condition on it, so this just means that it correctly joins documents with their associated XWikiGroups objects, but then it multiplies that with all the possible properties that there are in the database, not just the properties belonging to those objects.

#set($results=$xwiki.searchDocuments($query))

Running XWiki Enterprise 2.4.30451 on MySQL 5.0.26.


--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to