mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 21:23:03 +01:00
Let's better use UCHAR for binary streams.
This commit is contained in:
parent
f08ca3a71c
commit
8888ecb544
@ -390,7 +390,7 @@ void DDL_execute(dsql_req* request)
|
||||
MET_dsql_cache_release(tdbb, sym_type, string->str_data);
|
||||
|
||||
JRD_ddl(tdbb, request->req_dbb->dbb_attachment, request->req_transaction,
|
||||
request->req_blr_data.getCount(), (const SCHAR*) request->req_blr_data.begin());
|
||||
request->req_blr_data.getCount(), request->req_blr_data.begin());
|
||||
}
|
||||
|
||||
|
||||
|
@ -543,7 +543,7 @@ ISC_STATUS DSQL_fetch(thread_db* tdbb,
|
||||
}
|
||||
|
||||
JRD_receive(tdbb, request->req_request, message->msg_number, message->msg_length,
|
||||
reinterpret_cast<SCHAR*>(message->msg_buffer), 0);
|
||||
message->msg_buffer, 0);
|
||||
|
||||
const dsql_par* const eof = request->req_eof;
|
||||
if (eof)
|
||||
@ -947,7 +947,7 @@ static void close_cursor(dsql_req* request)
|
||||
if (request->req_type == REQ_GET_SEGMENT ||
|
||||
request->req_type == REQ_PUT_SEGMENT)
|
||||
{
|
||||
ISC_STATUS* old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS* const old_status = tdbb->tdbb_status_vector;
|
||||
|
||||
tdbb->tdbb_status_vector = status_vector;
|
||||
try
|
||||
@ -1397,7 +1397,7 @@ static void execute_request(thread_db* tdbb,
|
||||
}
|
||||
|
||||
JRD_receive(tdbb, request->req_request, message->msg_number, message->msg_length,
|
||||
reinterpret_cast<SCHAR*>(message->msg_buffer), 0);
|
||||
message->msg_buffer, 0);
|
||||
|
||||
if (out_msg_length)
|
||||
map_in_out(NULL, message, 0, out_blr, out_msg_length, out_msg);
|
||||
@ -1420,13 +1420,13 @@ static void execute_request(thread_db* tdbb,
|
||||
|
||||
for (counter = 0; counter < 2 && !status; counter++)
|
||||
{
|
||||
ISC_STATUS* old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS* const old_status = tdbb->tdbb_status_vector;
|
||||
|
||||
try
|
||||
{
|
||||
tdbb->tdbb_status_vector = local_status;
|
||||
JRD_receive(tdbb, request->req_request, message->msg_number,
|
||||
message->msg_length, reinterpret_cast<SCHAR*>(message_buffer), 0);
|
||||
message->msg_length, message_buffer, 0);
|
||||
status = FB_SUCCESS;
|
||||
}
|
||||
catch (Firebird::Exception&)
|
||||
@ -2166,7 +2166,7 @@ static dsql_dbb* init(Attachment* attachment)
|
||||
|
||||
SCHAR buffer[BUFFER_TINY];
|
||||
|
||||
ISC_STATUS* old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS* const old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS_ARRAY status_vector = {0};
|
||||
|
||||
tdbb->tdbb_status_vector = status_vector;
|
||||
@ -2859,7 +2859,7 @@ static void release_request(thread_db* tdbb, dsql_req* request, bool drop)
|
||||
|
||||
if (request->req_request)
|
||||
{
|
||||
ISC_STATUS* old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS* const old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS_ARRAY status_vector = {0};
|
||||
|
||||
tdbb->tdbb_status_vector = status_vector;
|
||||
|
@ -2014,7 +2014,7 @@ ISC_STATUS GDS_DDL(ISC_STATUS* user_status,
|
||||
|
||||
jrd_tra* transaction = find_transaction(tdbb, isc_segstr_wrong_db);
|
||||
|
||||
JRD_ddl(tdbb, attachment, transaction, ddl_length, ddl);
|
||||
JRD_ddl(tdbb, attachment, transaction, ddl_length, reinterpret_cast<const UCHAR*>(ddl));
|
||||
}
|
||||
catch (const Firebird::Exception& ex) {
|
||||
Firebird::stuff_exception(user_status, ex);
|
||||
@ -2626,7 +2626,8 @@ ISC_STATUS GDS_RECEIVE(ISC_STATUS * user_status,
|
||||
check_database(tdbb);
|
||||
check_transaction(tdbb, request->req_transaction);
|
||||
|
||||
JRD_receive(tdbb, request, msg_type, msg_length, msg, level
|
||||
JRD_receive(tdbb, request, msg_type, msg_length,
|
||||
reinterpret_cast<UCHAR*>(msg), level
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
, direction, offset
|
||||
#endif
|
||||
@ -6128,7 +6129,7 @@ void thread_db::setRequest(jrd_req* val)
|
||||
|
||||
|
||||
void JRD_ddl(thread_db* tdbb, Jrd::Attachment* attachment, jrd_tra* transaction,
|
||||
USHORT ddl_length, const SCHAR* ddl)
|
||||
USHORT ddl_length, const UCHAR* ddl)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -6140,7 +6141,7 @@ void JRD_ddl(thread_db* tdbb, Jrd::Attachment* attachment, jrd_tra* transaction,
|
||||
*
|
||||
**************************************/
|
||||
|
||||
DYN_ddl(attachment, transaction, ddl_length, reinterpret_cast<const UCHAR*>(ddl));
|
||||
DYN_ddl(attachment, transaction, ddl_length, ddl);
|
||||
|
||||
// Perform an auto commit for autocommit transactions.
|
||||
// This is slightly tricky. If the commit retain works,
|
||||
@ -6159,7 +6160,7 @@ void JRD_ddl(thread_db* tdbb, Jrd::Attachment* attachment, jrd_tra* transaction,
|
||||
}
|
||||
catch (const Firebird::Exception&)
|
||||
{
|
||||
ISC_STATUS* old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS* const old_status = tdbb->tdbb_status_vector;
|
||||
ISC_STATUS_ARRAY temp_status = {0};
|
||||
tdbb->tdbb_status_vector = temp_status;
|
||||
|
||||
@ -6180,7 +6181,7 @@ void JRD_ddl(thread_db* tdbb, Jrd::Attachment* attachment, jrd_tra* transaction,
|
||||
|
||||
|
||||
void JRD_receive(thread_db* tdbb, jrd_req* request, USHORT msg_type, USHORT msg_length,
|
||||
SCHAR* msg, SSHORT level
|
||||
UCHAR* msg, SSHORT level
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
, USHORT direction, ULONG offset
|
||||
#endif
|
||||
@ -6203,8 +6204,7 @@ void JRD_receive(thread_db* tdbb, jrd_req* request, USHORT msg_type, USHORT msg_
|
||||
EXE_seek(tdbb, request, direction, offset);
|
||||
#endif
|
||||
|
||||
EXE_receive(tdbb, request, msg_type, msg_length,
|
||||
reinterpret_cast<UCHAR*>(msg), true);
|
||||
EXE_receive(tdbb, request, msg_type, msg_length, msg, true);
|
||||
|
||||
check_autocommit(request, tdbb);
|
||||
|
||||
|
@ -216,9 +216,9 @@ void JRD_print_procedure_info(Jrd::thread_db*, const char*);
|
||||
|
||||
|
||||
void JRD_ddl(Jrd::thread_db* tdbb, Jrd::Attachment* attachment, Jrd::jrd_tra* transaction,
|
||||
USHORT ddl_length, const SCHAR* ddl);
|
||||
USHORT ddl_length, const UCHAR* ddl);
|
||||
void JRD_receive(Jrd::thread_db* tdbb, Jrd::jrd_req* request, USHORT msg_type, USHORT msg_length,
|
||||
SCHAR* msg, SSHORT level
|
||||
UCHAR* msg, SSHORT level
|
||||
#ifdef SCROLLABLE_CURSORS
|
||||
, USHORT direction, ULONG offset
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user