[Bug 21622] New: Incorrect GROUP BY clause in acqui/ scripts
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Bug ID: 21622 Summary: Incorrect GROUP BY clause in acqui/ scripts Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Blocks: 17258 acqui/ordered.pl: GROUP BY aqorders.ordernumber acqui/spent.pl: GROUP BY aqorders.ordernumber 'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17258 [Bug 17258] [OMNIBUS] MySQL 5.7 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 80943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80943&action=edit Bug 21622: Remove incorrect GROUP BY clauses in acqui script acqui/ordered.pl: GROUP BY aqorders.ordernumber acqui/spent.pl: GROUP BY aqorders.ordernumbe 'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY Test plan: - Create orders for different basket and using different funds - Receive some of them - Hit the ordered and spent pages (from the acqui home page) => The tables must contain the same data with and without this patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 21718 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #80943|0 |1 is obsolete| | --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 81596 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81596&action=edit Bug 21622: Remove incorrect GROUP BY clauses in acqui script acqui/ordered.pl: GROUP BY aqorders.ordernumber acqui/spent.pl: GROUP BY aqorders.ordernumbe 'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY Test plan: - Create orders for different basket and using different funds - Receive some of them - Hit the ordered and spent pages (from the acqui home page) => The tables must contain the same data with and without this patch Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |julian.maurice@biblibre.com --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- The SQL queries have a JOIN clause with aqorders_items. Without the GROUP BY it can return multiple rows for the same order. It shouldn't be removed. On master, ordered.pl displays a table of 15 rows With the patch applied, it displays a table of 22 rows Same thing on spent.pl with different numbers. Failed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thx Julian! It didn't happen on mine, probably not enough data! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81596|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 81724 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81724&action=edit Bug 21622: Adjust incorrect GROUP BY clauses in acqui script acqui/ordered.pl: GROUP BY aqorders.ordernumber acqui/spent.pl: GROUP BY aqorders.ordernumbe 'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY Test plan: - Create orders for different basket and using different funds - Receive some of them - Hit the ordered and spent pages (from the acqui home page) => The tables must contain the same data with and without this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81724|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 81725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=81725&action=edit Bug 21622: Adjust incorrect GROUP BY clauses in acqui script acqui/ordered.pl: GROUP BY aqorders.ordernumber acqui/spent.pl: GROUP BY aqorders.ordernumbe 'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY Test plan: - Create orders for different basket and using different funds - Receive some of them - Hit the ordered and spent pages (from the acqui home page) => The tables must contain the same data with and without this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy CC| |aleisha@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jasmine Amohia <jasmineamohia.student@wegc.school.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Jasmine Amohia <jasmineamohia.student@wegc.school.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #81725|0 |1 is obsolete| | --- Comment #8 from Jasmine Amohia <jasmineamohia.student@wegc.school.nz> --- Created attachment 84101 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84101&action=edit Bug 21622: Adjust incorrect GROUP BY clauses in acqui script acqui/ordered.pl: GROUP BY aqorders.ordernumber acqui/spent.pl: GROUP BY aqorders.ordernumbe 'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY Test plan: - Create orders for different basket and using different funds - Receive some of them - Hit the ordered and spent pages (from the acqui home page) => The tables must contain the same data with and without this patch Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #84101|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 84679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84679&action=edit Bug 21622: Adjust incorrect GROUP BY clauses in acqui script acqui/ordered.pl: GROUP BY aqorders.ordernumber acqui/spent.pl: GROUP BY aqorders.ordernumbe 'koha_kohadev.aqorders.biblionumber' isn't in GROUP BY Test plan: - Create orders for different basket and using different funds - Receive some of them - Hit the ordered and spent pages (from the acqui home page) => The tables must contain the same data with and without this patch Signed-off-by: Jasmine Amohia <jasmineamohia.student@wegc.school.nz> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |In Discussion --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- I missed this one and filed 22260 I am wondering if one situation is preferable to the other (subquery vs adding all fields to group by) Bug 20182 and 21723 imply there may be some issues here - can we get some opinions here on the best way to fix these situations? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22260, | |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21723 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com, tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Nick Clemens from comment #10)
I missed this one and filed 22260
I am wondering if one situation is preferable to the other (subquery vs adding all fields to group by)
Bug 20182 and 21723 imply there may be some issues here - can we get some opinions here on the best way to fix these situations?
Could you benchmark the 2 queries on a big production DB? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 22260 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #11)
(In reply to Nick Clemens from comment #10)
I missed this one and filed 22260
I am wondering if one situation is preferable to the other (subquery vs adding all fields to group by)
Bug 20182 and 21723 imply there may be some issues here - can we get some opinions here on the best way to fix these situations?
Could you benchmark the 2 queries on a big production DB?
~.1 seconds for this solution vs ~4 seconds for the other Deprecated in favor of this one, we should invesitgate 21723 on its own I think -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- this one fails qa tool in 18.05.x AND i cannot successfully run through the test plan. not backporting to 18.05.x. let me know if it is needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #17 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 86973 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86973&action=edit Bug 21622: (RM follow-up) adjust for changes from bug 21282 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #86973|0 |1 is obsolete| | --- Comment #18 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 86974 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86974&action=edit Bug 21622: (RM follow-up) adjust for changes from bug 21282 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|Academy | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #19 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Nick Clemens from comment #18)
Created attachment 86974 [details] [review] Bug 21622: (RM follow-up) adjust for changes from bug 21282
Followup pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 --- Comment #20 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Followup pushed to 18.11.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21622 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org