| 402 | } |
| 403 | |
| 404 | void IscTransaction::doRollback(FbStatusVector* status, thread_db* tdbb, bool retain) |
| 405 | { |
| 406 | EngineCallbackGuard guard(tdbb, *this, FB_FUNCTION); |
| 407 | if (retain) |
| 408 | m_iscProvider.isc_rollback_retaining(status, &m_handle); |
| 409 | else |
| 410 | m_iscProvider.isc_rollback_transaction(status, &m_handle); |
| 411 | |
| 412 | if ((status->getState() & IStatus::STATE_ERRORS) && |
| 413 | (status->getErrors()[1] == isc_cancelled)) |
| 414 | { |
| 415 | FbLocalStatus temp; |
| 416 | FB_API_HANDLE db = m_iscConnection.getAPIHandle(); |
| 417 | m_iscProvider.fb_cancel_operation(&temp, &db, fb_cancel_disable); |
| 418 | |
| 419 | status->init(); |
| 420 | if (retain) |
| 421 | m_iscProvider.isc_rollback_retaining(status, &m_handle); |
| 422 | else |
| 423 | m_iscProvider.isc_rollback_transaction(status, &m_handle); |
| 424 | |
| 425 | m_iscProvider.fb_cancel_operation(&temp, &db, fb_cancel_enable); |
| 426 | } |
| 427 | |
| 428 | if ((status->getState() & IStatus::STATE_ERRORS) && |
| 429 | isConnectionBrokenError(status) && !retain) |
| 430 | { |
| 431 | m_handle = 0; |
| 432 | fb_utils::init_status(status); |
| 433 | } |
| 434 | |
| 435 | fb_assert(retain && m_handle || !retain && !m_handle || |
| 436 | (status->getState() & IStatus::STATE_ERRORS) && m_handle); |
| 437 | } |
| 438 | |
| 439 | |
| 440 | // IscStatement |
nothing calls this directly
no test coverage detected