aboutsummaryrefslogtreecommitdiff
path: root/odb/mysql/statement.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:10:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-08-30 16:10:02 +0200
commit3f64781802deb7f910a37e3998cfc358b65e24e9 (patch)
treea233fb0387c35149cc5d72965db730b531822580 /odb/mysql/statement.cxx
parent19109c06566ecc1b2a42820145c784d12ad26b27 (diff)
Implement uniform handle management across all databases
Also use the auto_handle template instead of the raw handle in connection, statement, and result classes. This removes a lot of brittle "exception safety guarantee" code that we had in those classes.
Diffstat (limited to 'odb/mysql/statement.cxx')
-rw-r--r--odb/mysql/statement.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/odb/mysql/statement.cxx b/odb/mysql/statement.cxx
index bc29ff5..3a76c4d 100644
--- a/odb/mysql/statement.cxx
+++ b/odb/mysql/statement.cxx
@@ -29,6 +29,10 @@ namespace odb
statement::
~statement ()
{
+ // Let the connection handle the release of the statement (it
+ // may delay the actual freeing if it will mess up the currently
+ // active statement).
+ //
conn_.free_stmt_handle (stmt_);
}