Bugzilla – Attachment 71452 Details for
Bug 20144
Test suite is failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20144: [sql_modes] Remove HAVING clause from GetTopIssues
Bug-20144-sqlmodes-Remove-HAVING-clause-from-GetTo.patch (text/plain), 1.46 KB, created by
Julian Maurice
on 2018-02-12 12:29:38 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Remove HAVING clause from GetTopIssues
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 12:29:38 UTC
Size:
1.46 KB
patch
obsolete
>From 0173bcfa70b27da633d273f084fd1e935325a235 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Feb 2018 12:34:34 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Remove HAVING clause from GetTopIssues > >Fix for: >'koha_kohadev.b.title' isn't in GROUP BY > >t/db_dependent/Circulation/GetTopIssues.t > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > C4/Circulation.pm | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 75215db2e2..075ed60f65 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3975,6 +3975,7 @@ sub GetTopIssues { > > my $dbh = C4::Context->dbh; > my $query = q{ >+ SELECT * FROM ( > SELECT b.biblionumber, b.title, b.author, bi.itemtype, bi.publishercode, > bi.place, bi.publicationyear, b.copyrightdate, bi.pages, bi.size, > i.ccode, SUM(i.issues) AS count >@@ -4012,11 +4013,13 @@ sub GetTopIssues { > } > > $query .= q{ >- GROUP BY b.biblionumber >- HAVING count > 0 >+ GROUP BY b.biblionumber, b.title, b.author, bi.itemtype, bi.publishercode, >+ bi.place, bi.publicationyear, b.copyrightdate, bi.pages, bi.size, >+ i.ccode > ORDER BY count DESC > }; > >+ $query .= q{ ) xxx WHERE count > 0 }; > $count = int($count); > if ($count > 0) { > $query .= "LIMIT $count"; >-- >2.14.2
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 20144
:
71410
|
71411
|
71412
|
71413
|
71414
|
71415
|
71416
|
71417
|
71418
|
71419
|
71420
|
71421
|
71422
|
71423
|
71424
|
71425
|
71427
|
71428
|
71429
|
71430
|
71431
|
71432
|
71434
|
71435
|
71436
|
71437
|
71438
|
71440
|
71441
|
71442
|
71443
|
71444
|
71445
|
71446
|
71447
|
71448
|
71449
|
71450
|
71451
| 71452 |
71453
|
71454
|
71455
|
71456
|
71457
|
71458
|
71459
|
71460
|
71461
|
71462
|
71463
|
71467
|
71564