[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [89] trunk/LedgerSMB/User.pm



Revision: 89
          http://svn.sourceforge.net/ledger-smb/?rev=89&view=rev
Author:   einhverfr
Date:     2006-09-13 22:51:31 -0700 (Wed, 13 Sep 2006)

Log Message:
-----------
Made db updates use transactions.

Modified Paths:
--------------
    trunk/LedgerSMB/User.pm

Modified: trunk/LedgerSMB/User.pm
===================================================================
--- trunk/LedgerSMB/User.pm	2006-09-14 05:39:17 UTC (rev 88)
+++ trunk/LedgerSMB/User.pm	2006-09-14 05:51:31 UTC (rev 89)
@@ -613,7 +613,7 @@
     $db =~ s/^db//;
     &dbconnect_vars($form, $db);
     
-    my $dbh = DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd}) or $form->dberror;
+    my $dbh = DBI->connect($form->{dbconnect}, $form->{dbuser}, $form->{dbpasswd}, {AutoCommit => 0}) or $form->dberror;
 
     # check version
     $query = qq|SELECT version FROM defaults|;
@@ -644,7 +644,7 @@
 
       # apply upgrade
       $self->process_query($form, $dbh, "sql/$upgradescript");
-
+      $dbh->commit;
       $version = $maxdb;
  
     }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.