StatementImpl::StatementImpl is not exception safe
IBPP is a C++ client class library for FirebirdSQL
Status: Inactive
Brought to you by:
epocman
.....
AttachDatabaseImpl(database);
if (transaction != 0) AttachTransactionImpl
(transaction);
if (! sql.empty()) Prepare(sql);
.....
If Prepare throws, the database and transaction are
not detached. Proposing:
.....
AttachDatabaseImpl(database);
if (transaction != 0) AttachTransactionImpl
(transaction);
try
{
if (! sql.empty()) Prepare(sql);
} catch(...) {
DetachTransactionImpl();
DetachDatabaseImpl();
throw;
}
.....
Logged In: YES
user_id=12177
This will be reviewed later. Are there real world known deficiencies if the internal link between the database object and the statement object and the transaction object are
not detached? I don't think so, but will review this more carefully later.
Logged In: YES
user_id=12177
Just changed the title of the report. It is a matter of exception safety / exception correct behaviour. Nothing related to threads.