8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 17:23:04 +01:00

Corrections. Thanks to Claudio

This commit is contained in:
hvlad 2008-11-18 09:29:56 +00:00
parent f07a2620df
commit f1baf56cc4

View File

@ -371,9 +371,6 @@ void Connection::releaseStatement(Jrd::thread_db *tdbb, Statement *stmt)
void Connection::clearTransactions(Jrd::thread_db *tdbb) void Connection::clearTransactions(Jrd::thread_db *tdbb)
{ {
Transaction **tran_ptr = m_transactions.begin();
Transaction **end = m_transactions.end();
while (m_transactions.getCount()) while (m_transactions.getCount())
{ {
Transaction *tran = m_transactions[0]; Transaction *tran = m_transactions[0];
@ -406,10 +403,15 @@ void Connection::detach(thread_db *tdbb)
const bool was_deleting = m_deleting; const bool was_deleting = m_deleting;
m_deleting = true; m_deleting = true;
try {
clearStatements(tdbb); clearStatements(tdbb);
clearTransactions(tdbb); clearTransactions(tdbb);
m_deleting = was_deleting; m_deleting = was_deleting;
}
catch(...) {
m_deleting = was_deleting;
throw;
}
doDetach(tdbb); doDetach(tdbb);
} }