summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-14 04:00:21 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-14 04:00:21 +0000
commitf832ee70ab801487548a610e37690c6bc354b219 (patch)
tree9dc247d2961a788218f8b73f76a827d98723aef4
parent2cde5d39dc9a85960462b28fb1af906f393ec552 (diff)
Adding transaction handling to db script processing.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@575 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/User.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm
index 4bdb0519..834c9ee4 100755
--- a/LedgerSMB/User.pm
+++ b/LedgerSMB/User.pm
@@ -450,9 +450,11 @@ sub process_query {
open(PSQL, "| psql") or $form->error(__FILE__.':'.__LINE__.": psql : $! \n");
print PSQL "\\o spool/log \n";
+ print PSQL "BEGIN;\n";
while (<FH>){
print PSQL $_;
}
+ print PSQL "COMMIT;\n";
close FH;
}