aurjson: Remove stray GROUP BY clause

The IDs of packages are unique, so there is no need to group search
results by package ID.

Note that the GROUP BY statement in question was introduced in commit
3447dfc (Support versioned RPC queries, 2014-04-28) for no apparent
reason and could even lead to errors in various DBMS.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2016-03-01 18:30:48 +01:00
parent 4c15f02ecb
commit 42f5c405c0

View file

@ -266,7 +266,6 @@ class AurJSON {
"ON Licenses.ID = PackageLicenses.LicenseID " . "ON Licenses.ID = PackageLicenses.LicenseID " .
"WHERE ${where_condition} " . "WHERE ${where_condition} " .
"AND PackageBases.PackagerUID IS NOT NULL " . "AND PackageBases.PackagerUID IS NOT NULL " .
"GROUP BY Packages.ID " .
"LIMIT $max_results"; "LIMIT $max_results";
} elseif ($this->version >= 2) { } elseif ($this->version >= 2) {
if ($this->version == 2 || $this->version == 3) { if ($this->version == 2 || $this->version == 3) {