8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:03:03 +01:00
This commit is contained in:
asfernandes 2008-07-21 02:20:41 +00:00
parent 68ea705957
commit 244ac97e80
5 changed files with 8 additions and 14 deletions

View File

@ -1237,13 +1237,6 @@ void CVT_move_common(const dsc* from, dsc* to, Callbacks* cb)
UCHAR* p = to->dsc_address;
const UCHAR* q = from->dsc_address;
#ifdef DEV_BUILD
// To be activated by the debugger.
static int t = 0;
if (t)
CVT_conversion_error(from, cb->err);
#endif
/* If the datatypes and lengths are identical, just move the
stuff byte by byte. Although this may seem slower than
optimal, it would cost more to find the fast move than the

View File

@ -609,7 +609,7 @@ static DUDLEY_FLD lookup_global_field( DUDLEY_FLD field)
/* Find symbol */
name = (field->fld_source) ? field->fld_source : field->fld_name;
if (symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_global))
if ((symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_global)))
return (DUDLEY_FLD) symbol->sym_object;
expand_error(103, SafeArg() << name->sym_string); /* msg 103: global field %s isn't defined */
@ -634,9 +634,8 @@ static DUDLEY_REL lookup_relation( DUDLEY_REL relation)
/* Find symbol */
name = (relation->rel_name);
if (
(symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_relation))
&& symbol->sym_object)
if ((symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_relation)) &&
symbol->sym_object)
{
return (DUDLEY_REL) symbol->sym_object;
}
@ -663,7 +662,7 @@ static DUDLEY_TRG lookup_trigger( DUDLEY_TRG trigger)
/* Find symbol */
name = (trigger->trg_name);
if (symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_trigger))
if ((symbol = HSH_typed_lookup(name->sym_string, name->sym_length, SYM_trigger)))
return (DUDLEY_TRG) symbol->sym_object;
expand_error(105, SafeArg() << name->sym_string); /* msg 105: trigger %s isn't defined */

View File

@ -303,6 +303,7 @@ void HSH_insert( SYM symbol)
const USHORT h = hash(symbol->sym_string, symbol->sym_length);
for (SYM old = hash_table[h]; old; old = old->sym_collision)
{
if (scompare(symbol->sym_string, symbol->sym_length,
old->sym_string, old->sym_length))
{
@ -310,6 +311,7 @@ void HSH_insert( SYM symbol)
old->sym_homonym = symbol;
return;
}
}
symbol->sym_collision = hash_table[h];
hash_table[h] = symbol;

View File

@ -1368,7 +1368,7 @@ static IDX_E check_partner_index(
// unique index, because a comparison is done on both keys.
index_desc tmpIndex = *idx;
// ASF: Was incorrect to verify broken foreign keys.
// Should not use a unique key to search a non-unique index.
// Should not use an unique key to search a non-unique index.
// tmpIndex.idx_flags |= idx_unique;
tmpIndex.idx_flags = (tmpIndex.idx_flags & ~idx_unique) | (partner_idx.idx_flags & idx_unique);
temporary_key key;