Bug 22869

Summary: Can't use an undefined value as an ARRAY reference at /usr/lib/x86_64-linux-gnu/perl5/5.26/DBI.pm line 2081.
Product: Koha Reporter: Ata ur Rehman <ata.rehman>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: CLOSED WORKSFORME QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: 18.11   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Screen before searching a term

Description Ata ur Rehman 2019-05-08 20:49:16 UTC
Created attachment 89479 [details]
Screen before searching a term

I got the above mentioned error while search or add new vendor in acquisition module in Koha 18.11.05 on Linux Ubuntu 18.04 LTS.  I updated my database from an old version of koha and this error is new after up-gradation. 
Note: Migration was normal without any error.  When I look into log files, I see the following entries:
   

[Thu May 09 01:31:31.751639 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl: DBD::mysql::st execute failed: Out of sort memory, consider increasing server sort buffer size [for Statement ": /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.752809 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:         SELECT aqbasket.basketno, aqbasket.basketname, aqbasket.note, aqbasket.booksellernote, aqbasket.contractnumber, aqbasket.creationdate, aqbasket.closedate, aqbasket.booksellerid, aqbasket.authorisedby, aqbasket.booksellerinvoicenumber, aqbasket.basketgroupid, aqbasket.deliveryplace, aqbasket.billingplace, aqbasket.branch, aqbasket.is_standing, aqbasket.create_items,: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.753108 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           SUM(aqorders.quantity) AS total_items,: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.753281 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           SUM(: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.753555 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             IF ( aqorders.orderstatus = 'cancelled', aqorders.quantity, 0 ): /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.753784 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           ) AS total_items_cancelled,: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.754027 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           COUNT(DISTINCT aqorders.biblionumber) AS total_biblios,: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.754164 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           SUM(: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.754361 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             IF(aqorders.datereceived IS NULL: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.754741 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:               AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00'): /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.754920 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             , aqorders.quantity: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.755064 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             , 0): /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.755235 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           ) AS expected_items: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.755404 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:         FROM aqbasket: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.755786 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           LEFT JOIN aqorders ON aqorders.basketno = aqbasket.basketno: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.756914 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:         WHERE booksellerid = ? GROUP BY aqbasket.basketno, aqbasket.basketname, aqbasket.note, aqbasket.booksellernote, aqbasket.contractnumber, aqbasket.creationdate, aqbasket.closedate, aqbasket.booksellerid, aqbasket.authorisedby, aqbasket.booksellerinvoicenumber, aqbasket.basketgroupid, aqbasket.deliveryplace, aqbasket.billingplace, aqbasket.branch, aqbasket.is_standing, aqbasket.create_items HAVING (closedate IS NULL OR (: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.757067 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:           SUM(: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.757268 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             IF(aqorders.datereceived IS NULL: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.757644 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:               AND (aqorders.datecancellationprinted IS NULL OR aqorders.datecancellationprinted='0000-00-00'): /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.757851 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             , aqorders.quantity: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.757993 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             , 0): /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.762276 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl:             ) > 0))" with ParamValues: 0=1] at /usr/share/koha/lib/C4/Acquisition.pm line 705.: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
[Thu May 09 01:31:31.762667 2019] [cgi:error] [pid 18056] [client 192.168.8.104:55296] AH01215: [Thu May  9 01:31:31 2019] booksellers.pl: Can't use an undefined value as an ARRAY reference at /usr/lib/x86_64-linux-gnu/perl5/5.26/DBI.pm line 2081.: /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl, referer: http://192.168.8.106:8001/cgi-bin/koha/acqui/acqui-home.pl
Comment 1 Katrin Fischer 2019-05-11 23:29:57 UTC
It looks like the interesting bit might be this line:

DBD::mysql::st execute failed: Out of sort memory, consider increasing server sort buffer size [for Statement ": /usr/share/koha/intranet/cgi-bin/acqui/booksellers.pl

'Google' suggests that increasing the sort_buffer_size in your my.cnf might help.

As this doesn't appear to be a general problem (works fine for me) I think it is more likely to be related to your setup and better suited for the mailinglist.
Please ask your question on the mailing list.