diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-03 14:05:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-03 14:05:25 +0200 |
commit | c262edb34d66a0bb6cb285f1f3014684040691ad (patch) | |
tree | 718b7bfbbd885391cd33fbdf456021c2f7471570 | |
parent | 6891521c01a648f2ef66a5b303c9c73a1c3b8ade (diff) |
Remove committed/rolled-back transaction from current
-rw-r--r-- | odb/transaction.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/odb/transaction.cxx b/odb/transaction.cxx index de5d1f6..df155ad 100644 --- a/odb/transaction.cxx +++ b/odb/transaction.cxx @@ -36,7 +36,6 @@ namespace odb } } - current_transaction = 0; delete impl_; } @@ -61,8 +60,9 @@ namespace odb if (finilized_) throw transaction_already_finilized (); - impl_->commit (); finilized_ = true; + current_transaction = 0; + impl_->commit (); } void transaction:: @@ -72,6 +72,7 @@ namespace odb throw transaction_already_finilized (); finilized_ = true; + current_transaction = 0; impl_->rollback (); } |