From 8d5413ee983dc1dab241b0072eff723015810d7e Mon Sep 17 00:00:00 2001 From: asfernandes Date: Sun, 22 Jan 2012 01:10:58 +0000 Subject: [PATCH] Misc. --- src/jrd/btr.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/jrd/btr.cpp b/src/jrd/btr.cpp index ebd8a552a0..35d66565ca 100644 --- a/src/jrd/btr.cpp +++ b/src/jrd/btr.cpp @@ -1117,6 +1117,10 @@ idx_e BTR_key(thread_db* tdbb, jrd_rel* relation, Record* record, index_desc* id try { + const USHORT keyType = fuzzy ? + INTL_KEY_PARTIAL : + ((idx->idx_flags & idx_unique) ? INTL_KEY_UNIQUE : INTL_KEY_SORT); + // Special case single segment indices if (idx->idx_count == 1) @@ -1157,10 +1161,6 @@ idx_e BTR_key(thread_db* tdbb, jrd_rel* relation, Record* record, index_desc* id if (!isNull) key->key_flags &= ~key_all_nulls; - const USHORT keyType = fuzzy ? - INTL_KEY_PARTIAL : - ((idx->idx_flags & idx_unique) ? INTL_KEY_UNIQUE : INTL_KEY_SORT); - compress(tdbb, desc_ptr, key, tail->idx_itype, isNull, (idx->idx_flags & idx_descending), keyType); } @@ -1199,10 +1199,6 @@ idx_e BTR_key(thread_db* tdbb, jrd_rel* relation, Record* record, index_desc* id key->key_flags &= ~key_all_nulls; } - const USHORT keyType = fuzzy ? - INTL_KEY_PARTIAL : - ((idx->idx_flags & idx_unique) ? INTL_KEY_UNIQUE : INTL_KEY_SORT); - compress(tdbb, desc_ptr, &temp, tail->idx_itype, isNull, (idx->idx_flags & idx_descending), keyType);