diff options
Diffstat (limited to 'odb/mysql/transaction-impl.cxx')
-rw-r--r-- | odb/mysql/transaction-impl.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/odb/mysql/transaction-impl.cxx b/odb/mysql/transaction-impl.cxx index 7b47c30..b6dda27 100644 --- a/odb/mysql/transaction-impl.cxx +++ b/odb/mysql/transaction-impl.cxx @@ -32,6 +32,9 @@ namespace odb void transaction_impl:: commit () { + if (statement* a = connection_->active ()) + a->cancel (); + MYSQL* h (connection_->handle ()); if (mysql_real_query (h, "commit", 6) != 0) @@ -41,6 +44,9 @@ namespace odb void transaction_impl:: rollback () { + if (statement* a = connection_->active ()) + a->cancel (); + MYSQL* h (connection_->handle ()); if (mysql_real_query (h, "rollback", 8) != 0) |