MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / end_transaction

Method end_transaction

src/remote/server/server.cpp:3393–3446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3391
3392
3393ISC_STATUS rem_port::end_transaction(P_OP operation, P_RLSE * release, PACKET* sendL)
3394{
3395/**************************************
3396 *
3397 * e n d _ t r a n s a c t i o n
3398 *
3399 **************************************
3400 *
3401 * Functional description
3402 * End a transaction.
3403 *
3404 **************************************/
3405 Rtr* transaction;
3406 LocalStatus ls;
3407 CheckStatusWrapper status_vector(&ls);
3408
3409 getHandle(transaction, release->p_rlse_object);
3410
3411 switch (operation)
3412 {
3413 case op_commit:
3414 transaction->rtr_iface->commit(&status_vector);
3415 break;
3416
3417 case op_rollback:
3418 transaction->rtr_iface->rollback(&status_vector);
3419 break;
3420
3421 case op_rollback_retaining:
3422 transaction->rtr_iface->rollbackRetaining(&status_vector);
3423 break;
3424
3425 case op_commit_retaining:
3426 transaction->rtr_iface->commitRetaining(&status_vector);
3427 break;
3428
3429 case op_prepare:
3430 transaction->rtr_iface->prepare(&status_vector, 0, NULL);
3431 if (!(status_vector.getState() & IStatus::STATE_ERRORS))
3432 transaction->rtr_limbo = true;
3433 break;
3434 }
3435
3436 if (!(status_vector.getState() & IStatus::STATE_ERRORS))
3437 {
3438 if (operation == op_commit || operation == op_rollback)
3439 {
3440 REMOTE_cleanup_transaction(transaction);
3441 release_transaction(transaction);
3442 }
3443 }
3444
3445 return this->send_response(sendL, 0, 0, &status_vector, false);
3446}
3447
3448
3449ISC_STATUS rem_port::execute_immediate(P_OP op, P_SQLST * exnow, PACKET* sendL)

Callers 1

process_packetFunction · 0.80

Calls 9

send_responseMethod · 0.95
release_transactionFunction · 0.70
commitMethod · 0.45
rollbackMethod · 0.45
rollbackRetainingMethod · 0.45
commitRetainingMethod · 0.45
prepareMethod · 0.45
getStateMethod · 0.45

Tested by

no test coverage detected