diff options
author | mkanat%bugzilla.org <> | 2007-03-15 10:29:45 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-03-15 10:29:45 +0100 |
commit | 496ad3d1ff432cd04ee3a1a6c90d38e61450d606 (patch) | |
tree | ebc6ab41906ff0404b631ca09b0d4323219f1eda /Bugzilla.pm | |
parent | edd47c05d21853caa46e9f95ca7e1504f215216f (diff) | |
download | bugzilla-496ad3d1ff432cd04ee3a1a6c90d38e61450d606.tar.gz bugzilla-496ad3d1ff432cd04ee3a1a6c90d38e61450d606.tar.xz |
Bug 374004: Enable transaction code and use it in some installation places
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index f278adb2e..473d959fc 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -412,14 +412,15 @@ sub request_cache { # Private methods -# Per process cleanup +# Per-process cleanup sub _cleanup { - - # When we support transactions, need to ->rollback here my $main = request_cache()->{dbh_main}; my $shadow = request_cache()->{dbh_shadow}; - $main->disconnect if $main; - $shadow->disconnect if $shadow && Bugzilla->params->{"shadowdb"}; + foreach my $dbh ($main, $shadow) { + next if !$dbh; + $dbh->bz_rollback_transaction() if $dbh->bz_in_transaction; + $dbh->disconnect; + } undef $_request_cache; } |