From c262edb34d66a0bb6cb285f1f3014684040691ad Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 3 Aug 2010 14:05:25 +0200 Subject: Remove committed/rolled-back transaction from current --- odb/transaction.cxx | 5 +++-- 1 file 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 (); } -- cgit v1.1