different bug count with and without count_only=1 parameter
Categories
(bugzilla.mozilla.org :: Search, defect)
Tracking
()
People
(Reporter: aryx, Assigned: glob)
Details
Attachments
(1 file)
https://bugzilla.mozilla.org/buglist.cgi?bug_type=defect&bug_severity=blocker&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&resolution=---&resolution=FIXED&resolution=INACTIVE&resolution=INCOMPLETE&resolution=SUPPORT&resolution=EXPIRED&resolution=MOVED&chfield=cf_last_resolved&chfieldfrom=-14ws&chfieldto=-1ws&product=Core&product=DevTools&product=External%20Software%20Affecting%20Firefox&product=Firefox&product=Firefox%20Build%20System&product=Firefox%20for%20Android&product=Firefox%20for%20iOS&product=GeckoView&product=NSPR&product=NSS&product=Toolkit&product=WebExtensions&list_id=14965778
is the second query in the browser and lists 18 bugs here, one of those is a restricted one.
The second and third bug count make sense because the second query lacks the restricted bug due to missing authentication.
But the first and second query should return the same count of bugs.
Looks like what's happening is the standard query uses GROUP BY bugs.bug_id
to remove duplicates, while count_only
does not.
Using the above query, right now without the GROUP BY
3 rows are returned:
1606946 2020-01-07 21:45:37 UNCONFIRMED -- nobody@mozilla.org
1607059 2020-01-07 17:41:26 UNCONFIRMED -- nobody@mozilla.org
1607059 2020-01-07 17:41:26 UNCONFIRMED -- nobody@mozilla.org
Note 1607059 is returned twice.
We probably want to use COUNT(DISTINCT bugs.bug_id) AS count
instead of COUNT(*) AS count
for count_only
queries.
Comment 3•4 years ago
|
||
Merged to master.
Description
•