From 6ae4590edc1ec7613771bf429f0dcb154aa22640 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 26 Dec 2012 19:48:01 +0100 Subject: [PATCH] Removing problematic per-MySQL LIMIT prefix --- lib/core/agent.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 4bf056352..028dfa707 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -602,13 +602,7 @@ class Agent(object): if query.startswith("SELECT "): query = query[len("SELECT "):] - limitOriginal = "" - - if where == PAYLOAD.WHERE.ORIGINAL: - if Backend.getIdentifiedDbms() in (DBMS.MYSQL, ): - limitOriginal = "%s " % (queries[Backend.getIdentifiedDbms()].limit.query % (0, kb.testMode)) - - unionQuery = self.prefixQuery("%sUNION ALL SELECT " % limitOriginal, prefix=prefix) + unionQuery = self.prefixQuery("UNION ALL SELECT ", prefix=prefix) if limited: unionQuery += ','.join(char if _ != position else '(SELECT %s)' % query for _ in xrange(0, count))