Summary: | noisy statement handle still active warnings when generating notices | ||
---|---|---|---|
Product: | Koha | Reporter: | Galen Charlton <gmcharlt> |
Component: | Notices | Assignee: | Galen Charlton <gmcharlt> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | minor | ||
Priority: | P5 - low | CC: | bgkriegel, chrish, jonathan.druart, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
bug 10559: remove spurious "statement handle still active" warnings
[SIGNED-OFF] bug 10559: remove spurious "statement handle still active" warnings bug 10559: remove spurious "statement handle still active" warnings |
Description
Galen Charlton
2013-07-09 17:52:14 UTC
Created attachment 19508 [details] [review] bug 10559: remove spurious "statement handle still active" warnings Generating (e.g.) overdue notices can result in spurious warnings in the cronjob logs: $ ./misc/cronjobs/overdue_notices.pl -t -library CPL prepare_cached(SELECT * FROM issues WHERE itemnumber = ?) statement handle DBI::st=HASH(0x54a7828) still Active at C4/Letters.pm line 589 This patch removes the warning by making sure that the relevant statement handle is finished after fetching its first row of results. To test: [1] Set up an overdue loan such that running overdue_notices.pl will trigger the generation of a notice. [2] Run overdue_notices.pl -t and note the warning message. [3] Apply the patch. [4] Run overdue_notices.pl -t again and note that the warning message is no longer displayed. [5] Check the message_queue table and verify that the overdue notices generated in steps 2 and 4 have the same text. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Created attachment 19709 [details] [review] [SIGNED-OFF] bug 10559: remove spurious "statement handle still active" warnings Generating (e.g.) overdue notices can result in spurious warnings in the cronjob logs: $ ./misc/cronjobs/overdue_notices.pl -t -library CPL prepare_cached(SELECT * FROM issues WHERE itemnumber = ?) statement handle DBI::st=HASH(0x54a7828) still Active at C4/Letters.pm line 589 This patch removes the warning by making sure that the relevant statement handle is finished after fetching its first row of results. To test: [1] Set up an overdue loan such that running overdue_notices.pl will trigger the generation of a notice. [2] Run overdue_notices.pl -t and note the warning message. [3] Apply the patch. [4] Run overdue_notices.pl -t again and note that the warning message is no longer displayed. [5] Check the message_queue table and verify that the overdue notices generated in steps 2 and 4 have the same text. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Srdjan <srdjan@catalyst.net.nz> QA comment: This patch removes the warnings. Koha uses many bad uses of $sth->finish(). Maybe it would be great to add a comment for this one. Marked as Passed QA. Created attachment 19769 [details] [review] bug 10559: remove spurious "statement handle still active" warnings Generating (e.g.) overdue notices can result in spurious warnings in the cronjob logs: $ ./misc/cronjobs/overdue_notices.pl -t -library CPL prepare_cached(SELECT * FROM issues WHERE itemnumber = ?) statement handle DBI::st=HASH(0x54a7828) still Active at C4/Letters.pm line 589 This patch removes the warning by making sure that the relevant statement handle is finished after fetching its first row of results. To test: [1] Set up an overdue loan such that running overdue_notices.pl will trigger the generation of a notice. [2] Run overdue_notices.pl -t and note the warning message. [3] Apply the patch. [4] Run overdue_notices.pl -t again and note that the warning message is no longer displayed. [5] Check the message_queue table and verify that the overdue notices generated in steps 2 and 4 have the same text. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Srdjan <srdjan@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Pushed to master. This patch has been pushed to 3.12.x, will be in 3.12.4. Thanks Galen! Pushed to 3.10.x, will be in 3.10.11 Pushed to 3.8.x, will be in 3.8.18. |