mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 19:23:03 +01:00
Code simplification. We don't need to track the cancellation for the non-request activities.
This commit is contained in:
parent
42f9f8f46f
commit
cf12557e36
@ -3764,6 +3764,9 @@ ISC_STATUS GDS_START_AND_SEND(ISC_STATUS* user_status,
|
|||||||
if (check_database(tdbb, request->req_attachment, user_status))
|
if (check_database(tdbb, request->req_attachment, user_status))
|
||||||
return user_status[1];
|
return user_status[1];
|
||||||
|
|
||||||
|
if (check_transaction(tdbb, request->req_transaction, user_status))
|
||||||
|
return user_status[1];
|
||||||
|
|
||||||
#ifdef REPLAY_OSRI_API_CALLS_SUBSYSTEM
|
#ifdef REPLAY_OSRI_API_CALLS_SUBSYSTEM
|
||||||
LOG_call(log_start_and_send, *req_handle, *tra_handle, msg_type,
|
LOG_call(log_start_and_send, *req_handle, *tra_handle, msg_type,
|
||||||
msg_length, msg, level);
|
msg_length, msg, level);
|
||||||
@ -3824,6 +3827,9 @@ ISC_STATUS GDS_START(ISC_STATUS * user_status,
|
|||||||
if (check_database(tdbb, request->req_attachment, user_status))
|
if (check_database(tdbb, request->req_attachment, user_status))
|
||||||
return user_status[1];
|
return user_status[1];
|
||||||
|
|
||||||
|
if (check_transaction(tdbb, request->req_transaction, user_status))
|
||||||
|
return user_status[1];
|
||||||
|
|
||||||
#ifdef REPLAY_OSRI_API_CALLS_SUBSYSTEM
|
#ifdef REPLAY_OSRI_API_CALLS_SUBSYSTEM
|
||||||
LOG_call(log_start, *req_handle, *tra_handle, level);
|
LOG_call(log_start, *req_handle, *tra_handle, level);
|
||||||
#endif
|
#endif
|
||||||
@ -5030,16 +5036,12 @@ static ISC_STATUS check_transaction(thread_db* tdbb, jrd_tra* transaction, ISC_S
|
|||||||
transaction->tra_flags &= ~TRA_cancel_request;
|
transaction->tra_flags &= ~TRA_cancel_request;
|
||||||
tdbb->tdbb_flags |= TDBB_sys_error;
|
tdbb->tdbb_flags |= TDBB_sys_error;
|
||||||
|
|
||||||
if (user_status)
|
ISC_STATUS* ptr = tdbb->tdbb_status_vector = user_status;
|
||||||
{
|
|
||||||
tdbb->tdbb_status_vector = user_status;
|
|
||||||
}
|
|
||||||
ISC_STATUS* ptr = tdbb->tdbb_status_vector;
|
|
||||||
fb_assert(ptr);
|
fb_assert(ptr);
|
||||||
*ptr++ = isc_arg_gds;
|
*ptr++ = isc_arg_gds;
|
||||||
*ptr++ = isc_cancelled;
|
*ptr++ = isc_cancelled;
|
||||||
*ptr++ = isc_arg_end;
|
*ptr++ = isc_arg_end;
|
||||||
return user_status ? error(user_status) : tdbb->tdbb_status_vector[1];
|
return error(user_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FB_SUCCESS;
|
return FB_SUCCESS;
|
||||||
@ -5249,12 +5251,6 @@ static jrd_tra* find_transaction(thread_db* tdbb, jrd_tra* transaction, ISC_STAT
|
|||||||
|
|
||||||
for (; transaction; transaction = transaction->tra_sibling)
|
for (; transaction; transaction = transaction->tra_sibling)
|
||||||
if (transaction->tra_attachment == tdbb->getAttachment()) {
|
if (transaction->tra_attachment == tdbb->getAttachment()) {
|
||||||
|
|
||||||
if (check_transaction(tdbb, transaction, 0))
|
|
||||||
{
|
|
||||||
ERR_punt();
|
|
||||||
}
|
|
||||||
|
|
||||||
tdbb->setTransaction(transaction);
|
tdbb->setTransaction(transaction);
|
||||||
return transaction;
|
return transaction;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user