8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:43: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); gds__msg_format(0, 12, type, sizeof(name), name, 0, 0, 0, 0, 0);
BURP_print(80, name, (void*) (IPTR) attribute, NULL, NULL, NULL); BURP_print(80, name, (void*) (IPTR) attribute, NULL, NULL, NULL);
// msg 80 don't recognize %s attribute %ld -- continuing // msg 80 don't recognize %s attribute %ld -- continuing
int l = get(tdgbl); for (int l = get(tdgbl); l; --l)
if (l) get(tdgbl);
{
do {
get(tdgbl);
} while (--l);
}
} }

View File

@ -940,7 +940,7 @@ void BLB_move(thread_db* tdbb, dsc* from_desc, dsc* to_desc, jrd_nod* field)
{ {
case nod_field: case nod_field:
// We should not materialize the blob if the destination 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-> simpleMove = tdbb->tdbb_request->
req_rpb[(IPTR)field->nod_arg[e_fld_stream]].rpb_relation == NULL; req_rpb[(IPTR)field->nod_arg[e_fld_stream]].rpb_relation == NULL;
break; break;
@ -964,7 +964,7 @@ void BLB_move(thread_db* tdbb, dsc* from_desc, dsc* to_desc, jrd_nod* field)
// and return. // and return.
if (simpleMove) 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) && if (DTYPE_IS_BLOB_OR_QUAD(from_desc->dsc_dtype) &&
DTYPE_IS_BLOB_OR_QUAD(to_desc->dsc_dtype) && DTYPE_IS_BLOB_OR_QUAD(to_desc->dsc_dtype) &&
to_desc->dsc_sub_type != isc_blob_untyped && 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) if (!code)
{
return FB_SUCCESS; return FB_SUCCESS;
}
else if ((code & ISC_MASK) != ISC_MASK) // not an ISC error message
{ if ((code & ISC_MASK) != ISC_MASK)
/* not an ISC error message */
return code; return code;
}
*fac = GET_FACILITY(code); *fac = GET_FACILITY(code);
*code_class = GET_CLASS(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 // Note: signal-safe code
gds__prefix(name, LOGFILE); gds__prefix(name, LOGFILE);
int file = open(name, O_CREAT | O_APPEND | O_WRONLY, 0660); int file = open(name, O_CREAT | O_APPEND | O_WRONLY, 0660);
if (file == -1) return; if (file == -1)
return;
write(file, text, length); write(file, text, length);
close(file); close(file);
#endif #endif
@ -2688,12 +2687,10 @@ int unlink(const SCHAR* file)
break; break;
} }
if (!status) if (!status || status == RMS$_FNF)
return 0;
else if (status != RMS$_FNF)
return -1;
else
return 0; return 0;
return -1;
} }
#endif #endif

View File

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