# The PerlCleanupHandler is supposed to initiate a rollback after the script has finished if AutoCommit is off. # Note: the PerlCleanupHandler runs after the response has been sent to the client sub cleanup { my $prefix = "$$ Apache::DBI "; print STDERR "$prefix PerlCleanupHandler \n" if $Apache::DBI::DEBUG > 1; my $dbh = $Connected{$Idx}; if ($Rollback{$Idx} and $dbh and $dbh->{Active} and !$dbh->{AutoCommit} and eval {$dbh->rollback}) { print STDERR "$prefix PerlCleanupHandler rollback for $Idx \n" if $Apache::DBI::DEBUG > 1; } delete $Rollback{$Idx}; 1; }