List:MySQL++« Previous MessageNext Message »
From:Alex Burton Date:August 31 2006 6:56am
Subject:Bug in mysqlpp::transaction
View as plain text  
Hi all,

I have found a bug.

mysqlpp::transaction's destructor can throw exceptions.

destructors should never throw.

If I am using the transaction object and then mysql "goes away" resulting in one of my
queries failing during the transaction, throwing an exception to indicate the failure.

The transaction is destroyed during stack unwind, and as intended rolls back the

The roll back fails for the same reason as the query failed that is causing the roll back.

So then we get a second exception whilst unwinding the stack for the first exception.

The necessary fix is to wrap the contents of ~transaction in a try {} catch (...)

Bug in const ColData Row::at(size_type i) constAlex Burton21 Jul
  • Re: Bug in const ColData Row::at(size_type i) constWarren Young21 Jul
    • Bug in mysqlpp::transactionAlex Burton31 Aug
      • Re: Bug in mysqlpp::transactionWarren Young12 Jan