8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 18:03:04 +01:00

Fix #7108 - Firebird does not find an record when adding a foreign key.

This commit is contained in:
Adriano dos Santos Fernandes 2022-01-20 22:59:23 -03:00
parent 48b414ac02
commit eec74b78b6

View File

@ -1241,7 +1241,8 @@ idx_e BTR_key(thread_db* tdbb, jrd_rel* relation, Record* record, index_desc* id
//
isNull = !EVL_field(relation, record, tail->idx_field, desc_ptr);
if (!isNull && desc_ptr->dsc_dtype == dtype_text)
if (!isNull && desc_ptr->dsc_dtype == dtype_text &&
tail->idx_field < record->getFormat()->fmt_desc.getCount())
{
// That's necessary for NO-PAD collations.
INTL_adjust_text_descriptor(tdbb, desc_ptr);