diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-31 16:05:35 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-31 16:05:35 +0000 |
commit | 06d3d7355d1b0ec05e61d2e7fe67f8d7153c1ff9 (patch) | |
tree | 424a162babe37ef113f8f908715e095f180d001f /src/normalise.cc | |
parent | 177a7782aee4c4789ad5377b5993bfa0b692282e (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.cc | 4 |
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(); } |