8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00

Remove unused message types.

This commit is contained in:
asfernandes 2011-03-20 19:15:13 +00:00
parent d9f90b811f
commit 34fd6866bc
7 changed files with 38 additions and 49 deletions

View File

@ -616,14 +616,11 @@ public:
virtual Firebird::ITransaction* FB_CARG executeMessage(Status* status, Firebird::ITransaction* tra,
unsigned int in_msg_type,
const Firebird::MessageBuffer* inMsgBuffer,
unsigned int out_msg_type,
const Firebird::MessageBuffer* outMsgBuffer);
// virtual int fetch(Status* status, Sqlda* out); // returns 100 if EOF, 101 if fragmented
virtual int FB_CARG fetchMessage(Status* status, unsigned int msg_type,
const Firebird::MessageBuffer* msgBuffer); // returns 100 if EOF, 101 if fragmented
virtual int FB_CARG fetchMessage(Status* status, const Firebird::MessageBuffer* msgBuffer); // returns 100 if EOF, 101 if fragmented
// virtual void insert(Status* status, Sqlda* in);
virtual void FB_CARG insertMessage(Status* status, unsigned int msg_type,
const Firebird::MessageBuffer* msgBuffer);
virtual void FB_CARG insertMessage(Status* status, const Firebird::MessageBuffer* msgBuffer);
virtual void FB_CARG free(Status* status, unsigned int option);
};

View File

@ -170,13 +170,11 @@ public:
// virtual ITransaction* FB_CARG execute(Status* status, ITransaction* tra, Sqlda* in, Sqlda* out) = 0;
virtual ITransaction* FB_CARG executeMessage(Status* status, ITransaction* tra,
unsigned int inMsgType, const MessageBuffer* inMsgBuffer,
unsigned int outMsgType, const MessageBuffer* outMsgBuffer) = 0;
const MessageBuffer* outMsgBuffer) = 0;
// virtual int FB_CARG fetch(Status* status, Sqlda* out) = 0; // returns 100 if EOF, 101 if fragmented
virtual int FB_CARG fetchMessage(Status* status, unsigned int msgType,
const MessageBuffer* msgBuffer) = 0; // returns 100 if EOF, 101 if fragmented
virtual int FB_CARG fetchMessage(Status* status, const MessageBuffer* msgBuffer) = 0; // returns 100 if EOF, 101 if fragmented
// virtual void FB_CARG insert(Status* status, Sqlda* in) = 0;
virtual void FB_CARG insertMessage(Status* status, unsigned int msgType,
const MessageBuffer* msgBuffer) = 0;
virtual void FB_CARG insertMessage(Status* status, const MessageBuffer* msgBuffer) = 0;
virtual void FB_CARG free(Status* status, unsigned int option) = 0;
};
#define FB_I_STATEMENT_VERSION (FB_INTERFACE_VERSION + 7)
@ -222,7 +220,7 @@ public:
virtual ITransaction* FB_CARG execute(Status* status, ITransaction* transaction,
unsigned int length, const char* string, unsigned int dialect,
unsigned int inMsgType, const MessageBuffer* inMsgBuffer,
unsigned int outMsgType, const MessageBuffer* outMsgBuffer) = 0;
const MessageBuffer* outMsgBuffer) = 0;
virtual IEvents* FB_CARG queEvents(Status* status, EventCallback* callback,
unsigned int length, const unsigned char* events) = 0;
virtual void FB_CARG cancelOperation(Status* status, int option) = 0;

View File

@ -237,7 +237,7 @@ public:
virtual Firebird::ITransaction* FB_CARG execute(Status* status, Firebird::ITransaction* transaction,
unsigned int length, const char* string, unsigned int dialect,
unsigned int in_msg_type, const Firebird::MessageBuffer* inMsgBuffer,
unsigned int out_msg_type, const Firebird::MessageBuffer* outMsgBuffer);
const Firebird::MessageBuffer* outMsgBuffer);
virtual Firebird::IEvents* FB_CARG queEvents(Status* status, Firebird::EventCallback* callback,
unsigned int length, const unsigned char* events);
virtual void FB_CARG cancelOperation(Status* status, int option);

View File

@ -500,7 +500,7 @@ void InternalStatement::doExecute(thread_db* tdbb)
Message outMessage(m_outBlr.getCount(), m_outBlr.begin(), m_out_buffer.getCount());
MessageBuffer outMsgBuffer(&outMessage, m_out_buffer.begin());
m_request->executeMessage(&status, transaction, 0, &inMsgBuffer, 0, &outMsgBuffer);
m_request->executeMessage(&status, transaction, 0, &inMsgBuffer, &outMsgBuffer);
}
if (!status.isSuccess())
@ -519,7 +519,7 @@ void InternalStatement::doOpen(thread_db* tdbb)
Message inMessage(m_inBlr.getCount(), m_inBlr.begin(), m_in_buffer.getCount());
MessageBuffer inMsgBuffer(&inMessage, m_in_buffer.begin());
m_request->executeMessage(&status, transaction, 0, &inMsgBuffer, 0, NULL);
m_request->executeMessage(&status, transaction, 0, &inMsgBuffer, NULL);
}
if (!status.isSuccess())
@ -536,7 +536,7 @@ bool InternalStatement::doFetch(thread_db* tdbb)
Message message(m_outBlr.getCount(), m_outBlr.begin(), m_out_buffer.getCount());
MessageBuffer msgBuffer(&message, m_out_buffer.begin());
res = m_request->fetchMessage(&status, 0, &msgBuffer);
res = m_request->fetchMessage(&status, &msgBuffer);
}
if (!status.isSuccess())

View File

@ -4140,8 +4140,7 @@ Firebird::IStatement* Attachment::allocateStatement(Status* user_status)
Firebird::ITransaction* dsql_req::executeMessage(Status* user_status, Firebird::ITransaction* apiTra,
unsigned int in_msg_type, const MessageBuffer* inMsgBuffer,
unsigned int /*out_msg_type*/, const MessageBuffer* outMsgBuffer)
unsigned int in_msg_type, const MessageBuffer* inMsgBuffer, const MessageBuffer* outMsgBuffer)
{
jrd_tra* tra = reinterpret_cast<jrd_tra*>(apiTra);
@ -4173,7 +4172,7 @@ Firebird::ITransaction* dsql_req::executeMessage(Status* user_status, Firebird::
unsigned char* out_msg = outMsgBuffer ? outMsgBuffer->buffer : NULL;
DSQL_execute(tdbb, &tra, this, in_blr_length, in_blr, in_msg_type, in_msg_length, in_msg,
out_blr_length, out_blr, /*out_msg_type,*/ out_msg_length, out_msg);
out_blr_length, out_blr, out_msg_length, out_msg);
}
catch (const Exception& ex)
{
@ -4196,7 +4195,7 @@ Firebird::ITransaction* dsql_req::executeMessage(Status* user_status, Firebird::
Firebird::ITransaction* Attachment::execute(Status* user_status, Firebird::ITransaction* apiTra,
unsigned int length, const char* string, unsigned int dialect,
unsigned int /*in_msg_type*/, const MessageBuffer* inMsgBuffer,
unsigned int /*out_msg_type*/, const MessageBuffer* outMsgBuffer)
const MessageBuffer* outMsgBuffer)
{
jrd_tra* tra = reinterpret_cast<jrd_tra*>(apiTra);
@ -4251,8 +4250,7 @@ Firebird::ITransaction* Attachment::execute(Status* user_status, Firebird::ITran
}
int dsql_req::fetchMessage(Status* user_status, unsigned int /*msg_type*/,
const MessageBuffer* msgBuffer)
int dsql_req::fetchMessage(Status* user_status, const MessageBuffer* msgBuffer)
{
int return_code = 0;
@ -4323,8 +4321,7 @@ void dsql_req::free(Status* user_status, unsigned int option)
}
void dsql_req::insertMessage(Status* user_status, unsigned int /*msg_type*/,
const MessageBuffer* msgBuffer)
void dsql_req::insertMessage(Status* user_status, const MessageBuffer* msgBuffer)
{
try
{
@ -4342,7 +4339,7 @@ void dsql_req::insertMessage(Status* user_status, unsigned int /*msg_type*/,
unsigned msg_length = bufMessage ? bufMessage->bufferLength : 0;
unsigned char* msg = msgBuffer ? msgBuffer->buffer : NULL;
DSQL_insert(tdbb, this, blr_length, blr, /*msg_type,*/ msg_length, msg);
DSQL_insert(tdbb, this, blr_length, blr, msg_length, msg);
}
catch (const Exception& ex)
{

View File

@ -256,13 +256,11 @@ public:
// virtual Firebird::ITransaction* execute(Status* status, Firebird::ITransaction* tra, Sqlda* in, Sqlda* out);
virtual Firebird::ITransaction* FB_CARG executeMessage(Status* status, Firebird::ITransaction* tra,
unsigned int in_msg_type, const MessageBuffer* inMsgBuffer,
unsigned int out_msg_type, const MessageBuffer* outMsgBuffer);
const MessageBuffer* outMsgBuffer);
// virtual int fetch(Status* status, Sqlda* out); // returns 100 if EOF, 101 if fragmented
virtual int FB_CARG fetchMessage(Status* status, unsigned int msg_type,
const MessageBuffer* msgBuffer); // returns 100 if EOF, 101 if fragmented
virtual int FB_CARG fetchMessage(Status* status, const MessageBuffer* msgBuffer); // returns 100 if EOF, 101 if fragmented
// virtual void insert(Status* status, Sqlda* in);
virtual void FB_CARG insertMessage(Status* status, unsigned int msg_type,
const MessageBuffer* msgBuffer);
virtual void FB_CARG insertMessage(Status* status, const MessageBuffer* msgBuffer);
virtual void FB_CARG free(Status* status, unsigned int option);
public:
@ -374,7 +372,7 @@ public:
virtual Firebird::ITransaction* FB_CARG execute(Status* status, Firebird::ITransaction* transaction,
unsigned int length, const char* string, unsigned int dialect,
unsigned int in_msg_type, const MessageBuffer* inMsgBuffer,
unsigned int out_msg_type, const MessageBuffer* outMsgBuffer);
const MessageBuffer* outMsgBuffer);
virtual Firebird::IEvents* FB_CARG queEvents(Status* status, Firebird::EventCallback* callback,
unsigned int length, const unsigned char* events);
virtual void FB_CARG cancelOperation(Status* status, int option);
@ -547,7 +545,7 @@ static void disconnect(rem_port*);
static void enqueue_receive(rem_port*, t_rmtque_fn, Rdb*, void*, Rrq::rrq_repeat*);
static void dequeue_receive(rem_port*);
static THREAD_ENTRY_DECLARE event_thread(THREAD_ENTRY_PARAM);
static int fetch_blob(Status*, Rsr*, USHORT, const UCHAR*, USHORT, USHORT, UCHAR*);
static int fetch_blob(Status*, Rsr*, USHORT, const UCHAR*, USHORT, UCHAR*);
static Rvnt* find_event(rem_port*, SLONG);
static bool get_new_dpb(ClumpletWriter&, const ParametersSet&);
static void handle_error(ISC_STATUS);
@ -1484,7 +1482,7 @@ Firebird::IStatement* Attachment::allocateStatement(Status* status)
Firebird::ITransaction* Statement::executeMessage(Status* status, Firebird::ITransaction* apiTra,
unsigned int in_msg_type, const MessageBuffer* inMsgBuffer,
unsigned int out_msg_type, const MessageBuffer* outMsgBuffer)
const MessageBuffer* outMsgBuffer)
{
/**************************************
*
@ -1619,7 +1617,7 @@ Firebird::ITransaction* Statement::executeMessage(Status* status, Firebird::ITra
sqldata->p_sqldata_messages = (statement->rsr_bind_format) ? 1 : 0;
sqldata->p_sqldata_out_blr.cstr_length = out_blr_length;
sqldata->p_sqldata_out_blr.cstr_address = const_cast<UCHAR*>(out_blr);
sqldata->p_sqldata_out_message_number = out_msg_type;
sqldata->p_sqldata_out_message_number = 0; // out_msg_type
if (out_msg_length || !statement->rsr_flags.test(Rsr::DEFER_EXECUTE))
{
@ -1678,7 +1676,7 @@ Firebird::ITransaction* Statement::executeMessage(Status* status, Firebird::ITra
Firebird::ITransaction* Attachment::execute(Status* status, Firebird::ITransaction* apiTra,
unsigned int length, const char* string, unsigned int dialect,
unsigned int in_msg_type, const MessageBuffer* inMsgBuffer,
unsigned int out_msg_type, const MessageBuffer* outMsgBuffer)
const MessageBuffer* outMsgBuffer)
{
/**************************************
*
@ -1815,7 +1813,7 @@ Firebird::ITransaction* Attachment::execute(Status* status, Firebird::ITransacti
ex_now->p_sqlst_messages = (in_msg_length && statement->rsr_bind_format) ? 1 : 0;
ex_now->p_sqlst_out_blr.cstr_length = out_blr_length;
ex_now->p_sqlst_out_blr.cstr_address = const_cast<unsigned char*>(out_blr);
ex_now->p_sqlst_out_message_number = out_msg_type;
ex_now->p_sqlst_out_message_number = 0; // out_msg_type
send_packet(port, packet);
@ -1861,7 +1859,7 @@ Firebird::ITransaction* Attachment::execute(Status* status, Firebird::ITransacti
}
int Statement::fetchMessage(Status* status, unsigned int msg_type, const MessageBuffer* msgBuffer)
int Statement::fetchMessage(Status* status, const MessageBuffer* msgBuffer)
{
/**************************************
*
@ -1956,7 +1954,7 @@ int Statement::fetchMessage(Status* status, unsigned int msg_type, const Message
}
if (statement->rsr_flags.test(Rsr::BLOB)) {
return fetch_blob(status, statement, blr_length, blr, msg_type, msg_length, msg);
return fetch_blob(status, statement, blr_length, blr, msg_length, msg);
}
@ -2004,7 +2002,7 @@ int Statement::fetchMessage(Status* status, unsigned int msg_type, const Message
sqldata->p_sqldata_statement = statement->rsr_id;
sqldata->p_sqldata_blr.cstr_length = blr_length;
sqldata->p_sqldata_blr.cstr_address = const_cast<unsigned char*>(blr);
sqldata->p_sqldata_message_number = msg_type;
sqldata->p_sqldata_message_number = 0; // msg_type
if (sqldata->p_sqldata_messages = statement->rsr_select_format ? 1 : 0)
{
if (!(port->port_flags &PORT_rpc))
@ -2210,7 +2208,7 @@ void Statement::free(Status* status, unsigned int option)
}
void Statement::insertMessage(Status* status, unsigned int msg_type, const MessageBuffer* msgBuffer)
void Statement::insertMessage(Status* status, const MessageBuffer* msgBuffer)
{
/**************************************
*
@ -5346,7 +5344,6 @@ static int fetch_blob(Status* status,
Rsr* statement,
USHORT blr_length,
const UCHAR* blr,
USHORT msg_type,
USHORT /*msg_length*/,
UCHAR* msg)
{
@ -5369,7 +5366,7 @@ static int fetch_blob(Status* status,
sqldata->p_sqldata_statement = statement->rsr_id;
sqldata->p_sqldata_blr.cstr_length = blr_length;
sqldata->p_sqldata_blr.cstr_address = const_cast<UCHAR*>(blr);
sqldata->p_sqldata_message_number = msg_type;
sqldata->p_sqldata_message_number = 0; // msg_type
sqldata->p_sqldata_messages = (statement->rsr_select_format) ? 1 : 0;
send_packet(port, packet);

View File

@ -2752,7 +2752,7 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS* user_status,
const SCHAR* in_msg,
USHORT out_blr_length,
SCHAR* out_blr,
USHORT out_msg_type,
USHORT /*out_msg_type*/,
USHORT out_msg_length,
SCHAR* out_msg)
{
@ -2793,7 +2793,7 @@ ISC_STATUS API_ROUTINE isc_dsql_execute2_m(ISC_STATUS* user_status,
MessageBuffer outMsgBuffer(&outMessage, reinterpret_cast<unsigned char*>(out_msg));
tra = statement->providerInterface->executeMessage(&status, tra, in_msg_type, &inMsgBuffer,
out_msg_type, &outMsgBuffer);
&outMsgBuffer);
if (status.isSuccess())
{
@ -3107,7 +3107,7 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed3_m(ISC_STATUS* user_status,
const SCHAR* in_msg,
USHORT out_blr_length,
SCHAR* out_blr,
USHORT out_msg_type,
USHORT /*out_msg_type*/,
USHORT out_msg_length,
SCHAR* out_msg)
{
@ -3153,7 +3153,7 @@ ISC_STATUS API_ROUTINE isc_dsql_exec_immed3_m(ISC_STATUS* user_status,
MessageBuffer outMsgBuffer(&outMessage, reinterpret_cast<unsigned char*>(out_msg));
tra = attachment->providerInterface->execute(&status, tra, length, string, dialect,
in_msg_type, &inMsgBuffer, out_msg_type, &outMsgBuffer);
in_msg_type, &inMsgBuffer, &outMsgBuffer);
if (status.isSuccess())
{
@ -3240,7 +3240,7 @@ ISC_STATUS API_ROUTINE isc_dsql_fetch_m(ISC_STATUS* user_status,
FB_API_HANDLE* stmt_handle,
USHORT blr_length,
SCHAR* blr,
USHORT msg_type,
USHORT /*msg_type*/,
USHORT msg_length,
SCHAR* msg)
{
@ -3263,7 +3263,7 @@ ISC_STATUS API_ROUTINE isc_dsql_fetch_m(ISC_STATUS* user_status,
Message message(blr_length, reinterpret_cast<unsigned char*>(blr), msg_length);
MessageBuffer msgBuffer(&message, reinterpret_cast<unsigned char*>(msg));
int s = statement->providerInterface->fetchMessage(&status, msg_type, &msgBuffer);
int s = statement->providerInterface->fetchMessage(&status, &msgBuffer);
if (s == 100 || s == 101)
{
@ -3382,7 +3382,7 @@ ISC_STATUS API_ROUTINE isc_dsql_insert_m(ISC_STATUS* user_status,
FB_API_HANDLE* stmt_handle,
USHORT blr_length,
const SCHAR* blr,
USHORT msg_type,
USHORT /*msg_type*/,
USHORT msg_length,
const SCHAR* msg)
{
@ -3409,7 +3409,7 @@ ISC_STATUS API_ROUTINE isc_dsql_insert_m(ISC_STATUS* user_status,
Message message(blr_length, reinterpret_cast<const unsigned char*>(blr), msg_length);
MessageBuffer msgBuffer(&message, reinterpret_cast<const unsigned char*>(msg));
statement->providerInterface->insertMessage(&status, msg_type, &msgBuffer);
statement->providerInterface->insertMessage(&status, &msgBuffer);
}
catch (const Exception& e)
{