mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:03:02 +01:00
A number of little corrections.
This commit is contained in:
parent
baba77ade5
commit
47d00c34e0
@ -1796,6 +1796,8 @@ void CMP_get_desc(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node, DSC * de
|
||||
}
|
||||
else
|
||||
{
|
||||
const USHORT extra_bytes =
|
||||
(desc->dsc_dtype == dtype_varying) ? sizeof(USHORT) : 0;
|
||||
if (offset_node->nod_type == nod_literal &&
|
||||
desc1.dsc_dtype == dtype_long)
|
||||
{
|
||||
@ -1807,7 +1809,7 @@ void CMP_get_desc(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node, DSC * de
|
||||
offset -= MOV_get_long(&desc3, 0);
|
||||
}
|
||||
// error() is a local routine in par.c, so we use plain ERR_post
|
||||
if (offset < 0 || offset > MAX_COLUMN_SIZE - sizeof(USHORT))
|
||||
if (offset < 0 || offset > MAX_COLUMN_SIZE - extra_bytes)
|
||||
{
|
||||
ERR_post(isc_bad_substring_param,
|
||||
isc_arg_string, "offset", 0);
|
||||
@ -1818,7 +1820,7 @@ void CMP_get_desc(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node, DSC * de
|
||||
{
|
||||
const SLONG lenght = MOV_get_long(&desc2, 0);
|
||||
// error() is a local routine in par.c, so we use plain ERR_post
|
||||
if (lenght < 0 || lenght > MAX_COLUMN_SIZE - sizeof(USHORT))
|
||||
if (lenght < 0 || lenght > MAX_COLUMN_SIZE - extra_bytes)
|
||||
{
|
||||
ERR_post(isc_bad_substring_param,
|
||||
isc_arg_string, "length", 0);
|
||||
@ -2074,7 +2076,7 @@ jrd_req* CMP_make_request(thread_db* tdbb, CompilerScratch* csb)
|
||||
char buffer[256];
|
||||
sprintf(buffer,
|
||||
"Called from CMP_make_request():\n\t Incrementing use count of %s\n",
|
||||
procedure->prc_name->str_data);
|
||||
procedure->prc_name->c_str());
|
||||
JRD_print_procedure_info(tdbb, buffer);
|
||||
}
|
||||
#endif
|
||||
@ -2274,7 +2276,7 @@ void CMP_decrement_prc_use_count(thread_db* tdbb, jrd_prc* procedure)
|
||||
char buffer[256];
|
||||
sprintf(buffer,
|
||||
"Called from CMP_decrement():\n\t Decrementing use count of %s\n",
|
||||
procedure->prc_name->str_data);
|
||||
procedure->prc_name->c_str());
|
||||
JRD_print_procedure_info(tdbb, buffer);
|
||||
}
|
||||
#endif
|
||||
|
@ -37,7 +37,7 @@
|
||||
* 2004.01.16 Vlad Horsun: added support for default parameters
|
||||
*/
|
||||
/*
|
||||
$Id: met.epp,v 1.137 2004-08-30 18:10:41 alexpeshkoff Exp $
|
||||
$Id: met.epp,v 1.138 2004-09-13 21:06:40 dimitr Exp $
|
||||
*/
|
||||
// This MUST be at the top of the file
|
||||
#ifdef DARWIN
|
||||
@ -2639,6 +2639,7 @@ jrd_prc* MET_procedure(thread_db* tdbb, int id, bool noscan, USHORT flags)
|
||||
if (procedure->prc_name.empty())
|
||||
{
|
||||
procedure->prc_name = P.RDB$PROCEDURE_NAME;
|
||||
procedure->prc_name.resize(name_length(P.RDB$PROCEDURE_NAME));
|
||||
}
|
||||
procedure->prc_id = P.RDB$PROCEDURE_ID;
|
||||
if (!P.RDB$SECURITY_CLASS.NULL)
|
||||
|
@ -2467,13 +2467,13 @@ static bool dump_rsb(const jrd_req* request,
|
||||
|
||||
if (procedure->prc_request->req_fors.getCount() == 0) {
|
||||
const Firebird::string& n = procedure->prc_name;
|
||||
*buffer_length -= 6 + n.length();
|
||||
*buffer_length -= 6 + n.length();
|
||||
if (*buffer_length < 0) {
|
||||
return false;
|
||||
}
|
||||
*buffer++ = isc_info_rsb_begin;
|
||||
*buffer++ = isc_info_rsb_relation;
|
||||
*buffer++ = (SCHAR) n.length();
|
||||
*buffer++ = (SCHAR) n.length();
|
||||
memcpy(buffer, n.c_str(), n.length());
|
||||
buffer += n.length();
|
||||
*buffer++ = isc_info_rsb_type;
|
||||
|
@ -780,7 +780,7 @@ void TRA_post_resources(thread_db* tdbb, jrd_tra* transaction, ResourceList& res
|
||||
char buffer[256];
|
||||
sprintf(buffer,
|
||||
"Called from TRA_post_resources():\n\t Incrementing use count of %s\n",
|
||||
rsc->rsc_prc->prc_name->str_data);
|
||||
rsc->rsc_prc->prc_name->c_str());
|
||||
JRD_print_procedure_info(tdbb, buffer);
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user