diff options
Diffstat (limited to 'src/db.cc')
-rw-r--r-- | src/db.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/db.cc b/src/db.cc index f9d618b3b33f..75f97a1e45b9 100644 --- a/src/db.cc +++ b/src/db.cc @@ -70,6 +70,14 @@ void Transaction::abort() } +void Transaction::moveTo(Transaction & t) +{ + if (t.txn) throw Error("target txn already exists"); + t.txn = txn; + txn = 0; +} + + void Database::requireEnv() { if (!env) throw Error("database environment not open"); |