Bugzilla – Attachment 95378 Details for
Bug 24030
GetItemsForInventory failing with "ORDER BY clause is not in SELECT list"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24030: Fix GetItemsForInventory under MySQL 8
Bug-24030-Fix-GetItemsForInventory-under-MySQL-8.patch (text/plain), 1.97 KB, created by
Martin Renvoize (ashimema)
on 2019-11-13 13:25:54 UTC
(
hide
)
Description:
Bug 24030: Fix GetItemsForInventory under MySQL 8
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-11-13 13:25:54 UTC
Size:
1.97 KB
patch
obsolete
>From dfb33b7f87f905e044bb6c23bccead0551c1190f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 13 Nov 2019 11:09:37 +0100 >Subject: [PATCH] Bug 24030: Fix GetItemsForInventory under MySQL 8 > >t/db_dependent/Items/GetItemsForInventory.t .. 1/9 DBD::mysql::st execute failed: Expression #1 of ORDER BY clause is not in SELECT list, references column 'koha_kohadev.items.cn_sort' which is not in SELECT list; this is incompatible with DISTINCT [for Statement " > SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber > > FROM items > LEFT JOIN biblio ON items.biblionumber = biblio.biblionumber > LEFT JOIN biblioitems on items.biblionumber = biblioitems.biblionumber > ORDER BY items.cn_sort, itemcallnumber, title"] at /kohadevbox/koha/C4/Items.pm line 838. > >We simply follow what the error says, and add items.cn_sort to the SELECT list > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Items.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index cca700258d..b81fb0aa17 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -764,7 +764,7 @@ sub GetItemsForInventory { > my $max_cnsort = GetClassSort($class_source,undef,$maxlocation); > > my $select_columns = q{ >- SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber >+ SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber, items.cn_sort > }; > my $select_count = q{SELECT COUNT(DISTINCT(items.itemnumber))}; > my $query = q{ >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24030
:
95356
|
95357
|
95377
| 95378