| 3391 | |
| 3392 | |
| 3393 | ISC_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 | |
| 3449 | ISC_STATUS rem_port::execute_immediate(P_OP op, P_SQLST * exnow, PACKET* sendL) |
no test coverage detected