[freeside-commits] freeside/FS/FS Upgrade.pm,1.31.2.3,1.31.2.4

Ivan,,, ivan at wavetail.420.am
Sat Jun 5 13:30:37 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv28075

Modified Files:
      Tag: FREESIDE_1_9_BRANCH
	Upgrade.pm 
Log Message:
should really fix bug commiting between each table upgrade, arg, RT#8580

Index: Upgrade.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Upgrade.pm,v
retrieving revision 1.31.2.3
retrieving revision 1.31.2.4
diff -u -w -d -r1.31.2.3 -r1.31.2.4
--- Upgrade.pm	5 Jun 2010 19:47:06 -0000	1.31.2.3
+++ Upgrade.pm	5 Jun 2010 20:30:35 -0000	1.31.2.4
@@ -42,6 +42,10 @@
 
   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 @@
 
       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;
       }
       



More information about the freeside-commits mailing list