diff options
author | ivan <ivan> | 2010-06-05 20:30:35 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-06-05 20:30:35 +0000 |
commit | 666acf3d83d90a8a6f96bea5673fe0e2f751d150 (patch) | |
tree | d32c1ac07b4fd965e1ad2f286d85a236bfe193c6 | |
parent | 783b2f8e1733160b6718b3767c1baafb79b1e6c7 (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 d3f624bea..894399296 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; } |