summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2010-06-05 20:30:34 +0000
committerivan <ivan>2010-06-05 20:30:34 +0000
commit7c47d95403d8ff9a93848a6ad9de9dcedca84bde (patch)
treeb57013c0143ba2ba08e90db65db41bb8e1eab5f3
parent627408df58ee7efff68e8cb08e0deba5a677d8a9 (diff)
should really fix bug commiting between each table upgrade, arg, RT#8580
-rw-r--r--FS/FS/Upgrade.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm
index a33c510..8597b9d 100644
--- a/FS/FS/Upgrade.pm
+++ b/FS/FS/Upgrade.pm
@@ -42,6 +42,10 @@ sub upgrade {
my $data = upgrade_data(%opt);
+ my $oldAutoCommit = $FS::UID::AutoCommit;
+ local $FS::UID::AutoCommit = 0;
+ local $FS::UID::AutoCommit = 0;
+
foreach my $table ( keys %$data ) {
my $class = "FS::$table";
@@ -53,13 +57,10 @@ sub upgrade {
my $start = time;
- my $oldAutoCommit = $FS::UID::AutoCommit;
- local $FS::UID::AutoCommit = 0;
- local $FS::UID::AutoCommit = 0;
-
$class->_upgrade_data(%opt);
if ( $oldAutoCommit ) {
+ warn " committing";
dbh->commit or die dbh->errstr;
}