Page Limit in Data editor is being applied to sub queries
Posted: Wed 18 Jul 2018 13:12
For some queries, if paginal mode is enabled, the page limit is applied to subqueries.
E.g: In the following query, even though there is a limit of 10000, a limit of 1000 is applied to the subquery.
SELECT GROUP_CONCAT(id)
FROM (
SELECT nr.id /* nr.*, getusername(nr.UsrLst_ID), a.name, a.catlst_id, cl.catagoryname*/
FROM notificationrule AS nr
INNER JOIN areaassign AS aa ON aa.id = nr.AreaAssign_ID
INNER JOIN areas AS a ON a.id = aa.Areas_id
INNER JOIN catlst AS cl ON cl.id = a.catlst_id
WHERE nr.UsrLst_ID = getuseridex('control room') AND a.catlst_id = 10
LIMIT 10000
) AS X;
But in the following similar query, it works fine:
SELECT
GROUP_CONCAT(id)
FROM (SELECT
nr.id /* nr.*, getusername(nr.UsrLst_ID), a.name, a.catlst_id, cl.catagoryname*/
FROM notificationrule AS nr
INNER JOIN areaassign AS aa
ON aa.id = nr.AreaAssign_ID
INNER JOIN areas AS a
ON a.id = aa.Areas_id
INNER JOIN catlst AS cl
ON cl.id = a.catlst_id
WHERE nr.UsrLst_ID = getuseridex('control room')
AND a.catlst_id = 10
LIMIT 10000) AS X;
SELECT
GROUP_CONCAT(id)
FROM (SELECT
*
FROM cameraconfig LIMIT 2000) AS x;
E.g: In the following query, even though there is a limit of 10000, a limit of 1000 is applied to the subquery.
SELECT GROUP_CONCAT(id)
FROM (
SELECT nr.id /* nr.*, getusername(nr.UsrLst_ID), a.name, a.catlst_id, cl.catagoryname*/
FROM notificationrule AS nr
INNER JOIN areaassign AS aa ON aa.id = nr.AreaAssign_ID
INNER JOIN areas AS a ON a.id = aa.Areas_id
INNER JOIN catlst AS cl ON cl.id = a.catlst_id
WHERE nr.UsrLst_ID = getuseridex('control room') AND a.catlst_id = 10
LIMIT 10000
) AS X;
But in the following similar query, it works fine:
SELECT
GROUP_CONCAT(id)
FROM (SELECT
nr.id /* nr.*, getusername(nr.UsrLst_ID), a.name, a.catlst_id, cl.catagoryname*/
FROM notificationrule AS nr
INNER JOIN areaassign AS aa
ON aa.id = nr.AreaAssign_ID
INNER JOIN areas AS a
ON a.id = aa.Areas_id
INNER JOIN catlst AS cl
ON cl.id = a.catlst_id
WHERE nr.UsrLst_ID = getuseridex('control room')
AND a.catlst_id = 10
LIMIT 10000) AS X;
SELECT
GROUP_CONCAT(id)
FROM (SELECT
*
FROM cameraconfig LIMIT 2000) AS x;