From ce69b47672cab339994828e0ff5e28b058a517f0 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/mysql/transaction-impl.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'odb/mysql/transaction-impl.hxx') diff --git a/odb/mysql/transaction-impl.hxx b/odb/mysql/transaction-impl.hxx index a8aa491..db87147 100644 --- a/odb/mysql/transaction-impl.hxx +++ b/odb/mysql/transaction-impl.hxx @@ -23,19 +23,20 @@ namespace odb { class LIBODB_MYSQL_EXPORT transaction_impl: public odb::transaction_impl { - protected: - friend class connection; - friend class transaction; - + public: typedef mysql::database database_type; typedef mysql::connection connection_type; + transaction_impl (database_type&); transaction_impl (connection_ptr); virtual ~transaction_impl (); virtual void + start (); + + virtual void commit (); virtual void -- cgit v1.1