aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-07-11 15:15:21 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-07-11 15:15:21 +0200
commit6d670f2256f915ac5c116e6d70192ce990bbfd82 (patch)
tree617fb878c3dac62bbe83e9f361a711a9354d8c62
parent3c549ec489afe54037bd2d486502f10971a75cb5 (diff)
Free prepared statement cache before closing connection
-rw-r--r--odb/mysql/connection.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/odb/mysql/connection.cxx b/odb/mysql/connection.cxx
index cfdd26c..3f4a664 100644
--- a/odb/mysql/connection.cxx
+++ b/odb/mysql/connection.cxx
@@ -62,6 +62,10 @@ namespace odb
connection::
~connection ()
{
+ // Deallocate prepared statements before we close the connection.
+ //
+ statement_cache_.reset ();
+
if (stmt_handles_.size () > 0)
free_stmt_handles ();