[Koha-bugs] [Bug 28523] Patrons with the most checkouts (bor_issues_top.pl) is failing with MySQL 8

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 18 20:39:14 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28523

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |david at davidnind.com

--- Comment #2 from David Nind <david at davidnind.com> ---
I attempted to test this.

With MySQL 8 I was able to get this to work following the test plan (starting
KTD with ku=my8).

However, if I change back to MariaDB (starting KTD with ku) I get a different
error message:

CGI::Compile::ROOT::kohadevbox_koha_reports_bor_issues_top_2epl::calculate():
DBI Exception: DBD::mysql::st execute failed: 'koha_kohadev.borrowers.surname'
isn't in GROUP BY [for Statement "SELECT  CONCAT_WS('', borrowers.surname ,
",\t", borrowers.firstname),  COUNT(*) AS `RANK`, borrowers.borrowernumber AS
ID FROM `old_issues`
                  LEFT JOIN  borrowers  USING(borrowernumber)
                  LEFT JOIN    items    USING(itemnumber)
                  LEFT JOIN biblioitems USING(biblioitemnumber)
                  WHERE old_issues.borrowernumber IS NOT NULL
                   AND old_issues.issuedate > '2021-06-01'  AND
old_issues.issuedate < '2021-06-30'  AND old_issues.returndate > '2021-06-01' 
AND old_issues.returndate < '2021-06-30'  GROUP BY borrowers.borrowernumber
ORDER BY `RANK` DESC LIMIT 5"] at /kohadevbox/koha/reports/bor_issues_top.pl
line 70
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77


Testing notes (koha-testing-docker):
- Start KTD with MySQL 8 (rather than MariaDB): ku-my8
- Turn off strict mode
(https://www.linode.com/community/questions/17070/how-can-i-disable-mysql-strict-mode):
  . access database container: docker exec -it koha_db_1 bash
  . mysql -uroot -ppassword
  . SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';
  . SELECT @@GLOBAL.sql_mode;

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list