| 3863 | |
| 3864 | |
| 3865 | ISC_STATUS rem_port::execute_statement(P_OP op, P_SQLDATA* sqldata, PACKET* sendL) |
| 3866 | { |
| 3867 | /***************************************** |
| 3868 | * |
| 3869 | * e x e c u t e _ s t a t e m e n t |
| 3870 | * |
| 3871 | ***************************************** |
| 3872 | * |
| 3873 | * Functional description |
| 3874 | * Execute a non-SELECT dynamic SQL statement. |
| 3875 | * |
| 3876 | *****************************************/ |
| 3877 | Rtr* transaction = NULL; |
| 3878 | |
| 3879 | // Do not call CHECK_HANDLE if this is the start of a transaction |
| 3880 | if (sqldata->p_sqldata_transaction) |
| 3881 | { |
| 3882 | getHandle(transaction, sqldata->p_sqldata_transaction); |
| 3883 | } |
| 3884 | |
| 3885 | LocalStatus ls; |
| 3886 | CheckStatusWrapper status_vector(&ls); |
| 3887 | Rsr* statement; |
| 3888 | getHandle(statement, sqldata->p_sqldata_statement); |
| 3889 | |
| 3890 | const USHORT out_msg_type = (op == op_execute2) ? sqldata->p_sqldata_out_message_number : 0; |
| 3891 | const bool defer = this->haveRecvData(); |
| 3892 | |
| 3893 | if ((SSHORT) out_msg_type == -1) |
| 3894 | { |
| 3895 | return this->send_response(sendL, (OBJCT) (transaction ? transaction->rtr_id : 0), |
| 3896 | 0, &status_vector, defer); |
| 3897 | } |
| 3898 | |
| 3899 | statement->checkIface(); |
| 3900 | |
| 3901 | ULONG in_msg_length = 0, out_msg_length = 0; |
| 3902 | UCHAR* in_msg = NULL; |
| 3903 | UCHAR* out_msg = NULL; |
| 3904 | ULONG out_blr_length = 0; |
| 3905 | UCHAR* out_blr = NULL; |
| 3906 | |
| 3907 | if (statement->rsr_format) |
| 3908 | { |
| 3909 | fb_assert(statement->rsr_format == statement->rsr_bind_format); |
| 3910 | |
| 3911 | in_msg_length = statement->rsr_format->fmt_length; |
| 3912 | in_msg = statement->rsr_message->msg_address; |
| 3913 | } |
| 3914 | |
| 3915 | if (op == op_execute2) |
| 3916 | { |
| 3917 | out_blr_length = sqldata->p_sqldata_out_blr.cstr_length; |
| 3918 | out_blr = sqldata->p_sqldata_out_blr.cstr_address; |
| 3919 | |
| 3920 | if (this->port_statement->rsr_select_format) |
| 3921 | { |
| 3922 | out_msg_length = this->port_statement->rsr_select_format->fmt_length; |
no test coverage detected