Commit 2bab95ca authored by Galen Charlton's avatar Galen Charlton

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/ -t -library CPL
prepare_cached(SELECT * FROM issues WHERE     itemnumber = ?) statement handle DBI::st=HASH(0x54a7828) still Active at C4/ 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 will
    trigger the generation of a notice.
[2] Run -t and note the warning message.
[3] Apply the patch.
[4] Run -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's avatarGalen Charlton <>
Signed-off-by: Srdjan Jankovic's avatarSrdjan <>
Signed-off-by: joubu's avatarJonathan Druart <>
Signed-off-by: Galen Charlton's avatarGalen Charlton <>
parent b77af932
......@@ -550,6 +550,7 @@ sub _substitute_tables {
$sth->execute( $ref ? @$param : $param );
$values = $sth->fetchrow_hashref;
_parseletter ( $letter, $table, $values );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment