aboutsummaryrefslogtreecommitdiff
path: root/src/normalise.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-31 16:05:35 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-31 16:05:35 +0000
commit06d3d7355d1b0ec05e61d2e7fe67f8d7153c1ff9 (patch)
tree424a162babe37ef113f8f908715e095f180d001f /src/normalise.cc
parent177a7782aee4c4789ad5377b5993bfa0b692282e (diff)
* Enclose most operations that update the database in transactions.
* Open all database tables (Db objects) at initialisation time, not every time they are used. This is necessary because tables have to outlive all transactions that refer to them.
Diffstat (limited to 'src/normalise.cc')
-rw-r--r--src/normalise.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/normalise.cc b/src/normalise.cc
index 5a8cb9a0d..e8fc6fc55 100644
--- a/src/normalise.cc
+++ b/src/normalise.cc
@@ -9,7 +9,9 @@
void registerSuccessor(const FSId & id1, const FSId & id2)
{
- nixDB.setString(noTxn, dbSuccessors, id1, id2);
+ Transaction txn(nixDB);
+ nixDB.setString(txn, dbSuccessors, id1, id2);
+ txn.commit();
}