[Koha-bugs] [Bug 28977] Most-circulated items (cat_issues_top.pl) is failing with SQL Mode ONLY_FULL_GROUP_BY
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jan 14 19:33:20 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28977
--- Comment #15 from Michael Hafen <michael.hafen at washk12.org> ---
Looking at things again, only the title, rank, id and $colfield columns reach
the template. All the other columns in the SELECT clause (all the
GROUP_CONCATs except $colfield) could probably be dropped. Also, the $colfield
column should probably be pulled out of the GROUP_CONCAT since it's also added
to the GROUP BY clause.
Also, grouping by biblionumber is required, because the report contains a link
to the biblio record.
Coming back to the question about DISTINCT. I had to look up how it works; it
seems I didn't understand it completely. It works like the GROUP BY clause for
all the columns in the SELECT clause. Given that it should probably be dropped
for the sake of performance.
I tried running the query again, with and without the DISTINCT, and there was
no difference in the number or rows returned. I don't know what I was doing
before, but I think the previous runs were flawed; this result makes more
sense.
This amounts to a big change in the patch, and the status should probably be
moved back to Needs Signoff if the patch is updated. Which I think it should
be at this point; I really didn't understand this report completely when I
started this. So I'm going to go and work up another patch now.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list