diff --git a/lib/core/agent.py b/lib/core/agent.py
index b4414d7d7..c609b2f8a 100644
--- a/lib/core/agent.py
+++ b/lib/core/agent.py
@@ -886,7 +886,11 @@ class Agent(object):
fromFrom = limitedQuery[fromIndex + 1:]
orderBy = None
- if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL, DBMS.SQLITE):
+ if Backend.isDbms(DBMS.MYSQL):
+ limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (1, num)
+ limitedQuery += " %s" % limitStr
+
+ elif Backend.getIdentifiedDbms() in (DBMS.PGSQL, DBMS.SQLITE):
limitStr = queries[Backend.getIdentifiedDbms()].limit.query % (num, 1)
limitedQuery += " %s" % limitStr
diff --git a/xml/queries.xml b/xml/queries.xml
index 98b79cac7..ceca2f28e 100644
--- a/xml/queries.xml
+++ b/xml/queries.xml
@@ -7,7 +7,7 @@
-
+
@@ -26,28 +26,28 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
@@ -55,7 +55,7 @@
-
+