aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-08-03 14:05:25 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-08-03 14:05:25 +0200
commitc262edb34d66a0bb6cb285f1f3014684040691ad (patch)
tree718b7bfbbd885391cd33fbdf456021c2f7471570
parent6891521c01a648f2ef66a5b303c9c73a1c3b8ade (diff)
Remove committed/rolled-back transaction from current
-rw-r--r--odb/transaction.cxx5
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 ();
}