diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-19 11:23:10 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-08-19 11:23:10 +0200 |
commit | 0f765b6964534e868029e1402fe44998e3cfcd26 (patch) | |
tree | 314ea28865ff3a61e57546e3bc5707fb417ee060 | |
parent | 4c8de7a0e8fa65d60b4b54d525c0b5ba43ac265a (diff) |
Release connection after commit/rollback
-rw-r--r-- | odb/mysql/transaction-impl.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/odb/mysql/transaction-impl.cxx b/odb/mysql/transaction-impl.cxx index b6dda27..4cea7d1 100644 --- a/odb/mysql/transaction-impl.cxx +++ b/odb/mysql/transaction-impl.cxx @@ -39,6 +39,10 @@ namespace odb if (mysql_real_query (h, "commit", 6) != 0) throw database_exception (h); + + // Release the connection. + // + connection_.reset (); } void transaction_impl:: @@ -51,6 +55,10 @@ namespace odb if (mysql_real_query (h, "rollback", 8) != 0) throw database_exception (h); + + // Release the connection. + // + connection_.reset (); } } } |