From 7392db256c1587ff8fe87d95c5ae5c10f854f79e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 24 Aug 2011 13:42:04 +0200 Subject: Add support for transaction multiplexing Also delay getting a connection until after we do all the sanity checks (e.g., that there is no active transaction). Otherwise we are running risk of getting blocked rather than throwing an exception. --- odb/sqlite/connection.cxx | 9 --------- 1 file changed, 9 deletions(-) (limited to 'odb/sqlite/connection.cxx') diff --git a/odb/sqlite/connection.cxx b/odb/sqlite/connection.cxx index ffb70a7..1e9ff6f 100644 --- a/odb/sqlite/connection.cxx +++ b/odb/sqlite/connection.cxx @@ -82,9 +82,6 @@ namespace odb transaction_impl* connection:: begin () { - if (transaction::has_current ()) - throw already_in_transaction (); - return new transaction_impl ( connection_ptr (inc_ref (this)), transaction_impl::deferred); } @@ -92,9 +89,6 @@ namespace odb transaction_impl* connection:: begin_immediate () { - if (transaction::has_current ()) - throw already_in_transaction (); - return new transaction_impl ( connection_ptr (inc_ref (this)), transaction_impl::immediate); } @@ -102,9 +96,6 @@ namespace odb transaction_impl* connection:: begin_exclusive () { - if (transaction::has_current ()) - throw already_in_transaction (); - return new transaction_impl ( connection_ptr (inc_ref (this)), transaction_impl::exclusive); } -- cgit v1.1