]> git.koha-community.org Git - koha.git/commit
bug 10559: remove spurious "statement handle still active" warnings
authorGalen Charlton <gmc@esilibrary.com>
Tue, 9 Jul 2013 17:53:16 +0000 (17:53 +0000)
committerChris Hall <followingthepath@gmail.com>
Sun, 15 Sep 2013 05:24:19 +0000 (17:24 +1200)
commiteda8049421939750bf3767173e98cfaf0a6cf630
tree39cec5a11e9ae0541a2c33d927bb619aab99f89c
parent750950c17a243dbec1001ef8b6a17f2a13f45bcb
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>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 2bab95cac5f43b034adec36ec62a8c8f7f520627)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 5e7452758949e037fcf286cead721b559dd7d0e3)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 5e7452758949e037fcf286cead721b559dd7d0e3)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit cca7c4fbde1ba5074937251d9fd3c8b3d86deef7)
C4/Letters.pm