| 3447 | |
| 3448 | |
| 3449 | ISC_STATUS rem_port::execute_immediate(P_OP op, P_SQLST * exnow, PACKET* sendL) |
| 3450 | { |
| 3451 | /***************************************** |
| 3452 | * |
| 3453 | * e x e c u t e _ i m m e d i a t e |
| 3454 | * |
| 3455 | ***************************************** |
| 3456 | * |
| 3457 | * Functional description |
| 3458 | * process an execute immediate DSQL packet |
| 3459 | * |
| 3460 | *****************************************/ |
| 3461 | Rtr* transaction = NULL; |
| 3462 | LocalStatus ls; |
| 3463 | CheckStatusWrapper status_vector(&ls); |
| 3464 | |
| 3465 | Rdb* rdb = this->port_context; |
| 3466 | if (bad_db(&status_vector, rdb)) |
| 3467 | { |
| 3468 | return this->send_response(sendL, 0, 0, &status_vector, false); |
| 3469 | } |
| 3470 | |
| 3471 | // Do not call CHECK_HANDLE if this is the start of a transaction |
| 3472 | if (exnow->p_sqlst_transaction) { |
| 3473 | getHandle(transaction, exnow->p_sqlst_transaction); |
| 3474 | } |
| 3475 | ITransaction* tra = NULL; |
| 3476 | if (transaction) |
| 3477 | tra = transaction->rtr_iface; |
| 3478 | |
| 3479 | ULONG in_msg_length = 0, out_msg_length = 0; |
| 3480 | ULONG in_blr_length = 0, out_blr_length = 0; |
| 3481 | UCHAR* in_msg = NULL; |
| 3482 | UCHAR* out_msg = NULL; |
| 3483 | UCHAR* in_blr; |
| 3484 | UCHAR* out_blr; |
| 3485 | USHORT in_msg_type; |
| 3486 | |
| 3487 | if (op == op_exec_immediate2) |
| 3488 | { |
| 3489 | in_msg_type = exnow->p_sqlst_message_number; |
| 3490 | if ((SSHORT)in_msg_type == -1) |
| 3491 | { |
| 3492 | return this->send_response(sendL, (OBJCT) (transaction ? transaction->rtr_id : 0), |
| 3493 | 0, &status_vector, false); |
| 3494 | } |
| 3495 | |
| 3496 | in_blr_length = exnow->p_sqlst_blr.cstr_length; |
| 3497 | in_blr = exnow->p_sqlst_blr.cstr_address; |
| 3498 | |
| 3499 | if (this->port_statement->rsr_bind_format) |
| 3500 | { |
| 3501 | in_msg_length = this->port_statement->rsr_bind_format->fmt_length; |
| 3502 | RMessage* message = this->port_statement->rsr_message; |
| 3503 | if (!message->msg_address) |
| 3504 | { |
| 3505 | message->msg_address = message->msg_buffer; |
| 3506 | } |
no test coverage detected