aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tracer/transaction/driver.cxx6
-rw-r--r--tracer/transaction/test.std2
2 files changed, 8 insertions, 0 deletions
diff --git a/tracer/transaction/driver.cxx b/tracer/transaction/driver.cxx
index f6945d4..e1c7849 100644
--- a/tracer/transaction/driver.cxx
+++ b/tracer/transaction/driver.cxx
@@ -33,6 +33,12 @@ main ()
assert (&t.database () == &db);
assert (transaction::has_current ());
assert (&transaction::current () == &t);
+ transaction::reset_current ();
+ assert (!transaction::has_current ());
+ transaction t2 (db.begin (), false);
+ assert (!transaction::has_current ());
+ transaction::current (t2);
+ assert (&transaction::current () == &t2);
}
// Commit.
diff --git a/tracer/transaction/test.std b/tracer/transaction/test.std
index 8083774..792010c 100644
--- a/tracer/transaction/test.std
+++ b/tracer/transaction/test.std
@@ -1,5 +1,7 @@
test 001
begin transaction
+begin transaction
+rollback transaction
rollback transaction
test 002
begin transaction