From 5fdda034d070a174a362c7e2b89dc66f3bb89bec Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 9 May 2019 20:43:47 +0100 Subject: Add extra order by clause to getTopTrackedPackages Ensure predictable result order --- gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql b/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql index c328d73..16e711a 100644 --- a/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql +++ b/gentoobrowse-api/service/sql/portage/getTopTrackedPackages.sql @@ -2,5 +2,5 @@ SELECT p.packageid, p.categoryid, p.name, p.description, p.summary, p.firstseen, FROM gentoobrowse.packages p, gentoobrowse.user_packages up WHERE p.packageid = up.packageid GROUP BY p.packageid -ORDER BY COUNT(*) DESC +ORDER BY COUNT(*) DESC, p.packageid LIMIT ? -- cgit v1.2.3