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

Fixed the sorting.

This commit is contained in:
dimitr 2010-01-06 14:16:21 +00:00
parent d07e341172
commit 59ee638622

View File

@ -3293,7 +3293,8 @@ static SortedStream* gen_sort(thread_db* tdbb,
#ifndef WORDS_BIGENDIAN
map_length = ROUNDUP(map_length, sizeof(SLONG));
#endif
sort_key->skd_offset = map_item->flagOffset = (USHORT) map_length++;
const USHORT flag_offset = (USHORT) map_length++;
sort_key->skd_offset = flag_offset;
sort_key->skd_dtype = SKD_text;
sort_key->skd_length = 1;
// Handle nulls placement
@ -3330,6 +3331,7 @@ static SortedStream* gen_sort(thread_db* tdbb,
++sort_key;
map_item->clear();
map_item->node = node;
map_item->flagOffset = flag_offset;
map_item->desc = *desc;
map_item->desc.dsc_address = (UCHAR*)(IPTR) map_length;
map_length += desc->dsc_length;