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

Method execute_statement

src/remote/server/server.cpp:3865–4022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3863
3864
3865ISC_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;

Callers 1

process_packetFunction · 0.80

Calls 15

haveRecvDataMethod · 0.95
send_responseMethod · 0.95
send_partialMethod · 0.95
GdsClass · 0.85
NumClass · 0.85
checkIfaceMethod · 0.80
release_transactionFunction · 0.70
make_transactionFunction · 0.70
checkFunction · 0.50
clearMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected