From d073555e513e671b197c5eb31c0b2b269f137d0f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Apr 2012 16:45:23 +0200 Subject: Add database::reset() --- common/transaction/driver.cxx | 10 ++++++++++ common/transaction/test.std | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/common/transaction/driver.cxx b/common/transaction/driver.cxx index a487a7d..64351c3 100644 --- a/common/transaction/driver.cxx +++ b/common/transaction/driver.cxx @@ -122,4 +122,14 @@ main (int argc, char* argv[]) odb_db::transaction& r (odb_db::transaction::current ()); assert (&t == &r); } + + // Transaction restart. + // + cout << "test 007" << endl; + { + transaction t (db->begin ()); + t.commit (); + t.reset (db->begin ()); + t.commit (); + } } diff --git a/common/transaction/test.std b/common/transaction/test.std index 792010c..37d3598 100644 --- a/common/transaction/test.std +++ b/common/transaction/test.std @@ -19,3 +19,8 @@ rollback transaction test 006 begin transaction rollback transaction +test 007 +begin transaction +commit transaction +begin transaction +commit transaction -- cgit v1.1