8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 19:23:03 +01:00
This commit is contained in:
robocop 2007-02-09 08:34:16 +00:00
parent 45b8dd9cc7
commit d009be834f
4 changed files with 14 additions and 27 deletions

View File

@ -757,13 +757,8 @@ static void bad_attribute(int attribute, USHORT type)
gds__msg_format(0, 12, type, sizeof(name), name, 0, 0, 0, 0, 0);
BURP_print(80, name, (void*) (IPTR) attribute, NULL, NULL, NULL);
// msg 80 don't recognize %s attribute %ld -- continuing
int l = get(tdgbl);
if (l)
{
do {
get(tdgbl);
} while (--l);
}
for (int l = get(tdgbl); l; --l)
get(tdgbl);
}

View File

@ -940,7 +940,7 @@ void BLB_move(thread_db* tdbb, dsc* from_desc, dsc* to_desc, jrd_nod* field)
{
case nod_field:
// We should not materialize the blob if the destination field
// stream (nod_union, for example) don't have a relation.
// stream (nod_union, for example) doesn't have a relation.
simpleMove = tdbb->tdbb_request->
req_rpb[(IPTR)field->nod_arg[e_fld_stream]].rpb_relation == NULL;
break;
@ -964,7 +964,7 @@ void BLB_move(thread_db* tdbb, dsc* from_desc, dsc* to_desc, jrd_nod* field)
// and return.
if (simpleMove)
{
// But if the sub_type or charset is diferrent, create a new blob.
// But if the sub_type or charset is different, create a new blob.
if (DTYPE_IS_BLOB_OR_QUAD(from_desc->dsc_dtype) &&
DTYPE_IS_BLOB_OR_QUAD(to_desc->dsc_dtype) &&
to_desc->dsc_sub_type != isc_blob_untyped &&

View File

@ -420,14 +420,11 @@ ISC_STATUS API_ROUTINE gds__decode(ISC_STATUS code, USHORT* fac, USHORT*
**************************************/
if (!code)
{
return FB_SUCCESS;
}
else if ((code & ISC_MASK) != ISC_MASK)
{
/* not an ISC error message */
// not an ISC error message
if ((code & ISC_MASK) != ISC_MASK)
return code;
}
*fac = GET_FACILITY(code);
*code_class = GET_CLASS(code);
@ -1104,7 +1101,9 @@ void API_ROUTINE gds__trace_raw(const char* text, unsigned int length)
// Note: signal-safe code
gds__prefix(name, LOGFILE);
int file = open(name, O_CREAT | O_APPEND | O_WRONLY, 0660);
if (file == -1) return;
if (file == -1)
return;
write(file, text, length);
close(file);
#endif
@ -2688,12 +2687,10 @@ int unlink(const SCHAR* file)
break;
}
if (!status)
return 0;
else if (status != RMS$_FNF)
return -1;
else
if (!status || status == RMS$_FNF)
return 0;
return -1;
}
#endif

View File

@ -5070,12 +5070,7 @@ static void verb_post(
if (same_tx) {
data->rec_flags |= REC_same_tx;
}
UCHAR* p = data->rec_data;
const UCHAR* q = old_data->rec_data;
for (const UCHAR* const end = q + old_data->rec_length; q < end; q++)
{
*p++ = *q;
}
memcpy(data->rec_data, old_data->rec_data, old_data->rec_length);
if (!action->vct_undo) {
action->vct_undo = new UndoItemTree(tdbb->getDefaultPool());
}