From: Alexander P. <ale...@us...> - 2008-03-05 12:30:56
|
Build Version : T2.5.0.18690 Firebird 2.5 Unstable (writeBuildNum.sh,v 1.18850 2008/03/05 12:29:34 alexpeshkof ) Update of /cvsroot/firebird/firebird2/src/jrd In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv29209 Modified Files: why.cpp Log Message: 1. Fixed transaction flags after reconnect - must be in limbo. 2. Added check for limbo state to fb_disconnect_transaction() - needed for public entrypoint. Index: why.cpp =================================================================== RCS file: /cvsroot/firebird/firebird2/src/jrd/why.cpp,v retrieving revision 1.169 retrieving revision 1.170 diff -b -U3 -r1.169 -r1.170 --- why.cpp 5 Mar 2008 08:41:31 -0000 1.169 +++ why.cpp 5 Mar 2008 12:29:18 -0000 1.170 @@ -198,7 +198,6 @@ // flags const UCHAR HANDLE_TRANSACTION_limbo = 0x01; const UCHAR HANDLE_STATEMENT_prepared = 0x02; - const UCHAR HANDLE_shutdown = 0x04; // Database shutdown // forwards class Attachment; @@ -3844,6 +3843,11 @@ { Transaction* transaction = translate<Transaction>(user_handle); + if (!(transaction->flags & HANDLE_TRANSACTION_limbo)) + { + Firebird::status_exception::raise(isc_no_recon, isc_arg_end); + } + while (transaction) { Transaction* sub = transaction; @@ -4216,7 +4220,8 @@ return status[1]; } - new Transaction(handle, tra_handle, dbb); + Transaction* transaction = new Transaction(handle, tra_handle, dbb); + transaction->flags |= HANDLE_TRANSACTION_limbo; } catch (const Firebird::Exception& e) { |