Apache::Session

The error

DBI::db=HASH(0x8f41154)->disconnect invalidates 2 active statement handles \
(either destroy statement handles or call finish on them before disconnecting) at \
/usr/local/lib/perl5/site_perl/5.8.8/Apache/Session/Lock/MySQL.pm line 90, <DATA> line 1.


My patch

--- /usr/local/lib/perl5/site_perl/5.8.8/Apache/Session/Lock/MySQL.pm.bak       Mon Jun 25 15:22:05 2007
+++ /usr/local/lib/perl5/site_perl/5.8.8/Apache/Session/Lock/MySQL.pm   Mon Jun 25 15:25:02 2007
@@ -52,6 +52,7 @@

     my $sth = $self->{dbh}->prepare_cached(q{SELECT GET_LOCK(?, 3600)}, {}, 1);
     $sth->execute($self->{lockid});
+    $sth->finish();

     $self->{lock} = 1;
 }
@@ -68,6 +69,7 @@

         my $sth = $self->{dbh}->prepare_cached(q{SELECT RELEASE_LOCK(?)}, {}, 1);
         $sth->execute($self->{lockid});
+        $sth->finish();

         $self->{lock} = 0;
     }


I would have submitted this patch to the CPAN team / person - but the site is down :-(

http://rt.cpan.org/Public/Dist/Display.html?Name=Apache-Session(external link)