diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-14 05:51:31 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-09-14 05:51:31 +0000 |
commit | 0c897b2d198337f330de6253c6bcba35bedaeb2c (patch) | |
tree | 8b1f9981b42bd9377ec8e574b75cfa6f1b18c84c /LedgerSMB | |
parent | c3424f9e3869dce59cfeeea95e0de3856640b440 (diff) |
Made db updates use transactions.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@89 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/User.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index a5e0547a..d0ccfc61 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -613,7 +613,7 @@ sub dbupdate { $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 @@ sub dbupdate { # apply upgrade $self->process_query($form, $dbh, "sql/$upgradescript"); - + $dbh->commit; $version = $maxdb; } |