diff options
author | ivan <ivan> | 2010-06-05 20:30:34 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-06-05 20:30:34 +0000 |
commit | 7c47d95403d8ff9a93848a6ad9de9dcedca84bde (patch) | |
tree | b57013c0143ba2ba08e90db65db41bb8e1eab5f3 | |
parent | 627408df58ee7efff68e8cb08e0deba5a677d8a9 (diff) |
should really fix bug commiting between each table upgrade, arg, RT#8580
-rw-r--r-- | FS/FS/Upgrade.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index a33c510b4..8597b9d6b 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; } |