X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=isamc%2Fmerge.c;h=c2b853a10489a48c14b6069bdb65bee1b7f6552e;hb=16153aaaa1fcb0881ff7e3056bd9c991fcf57c29;hp=12334c67877ce884ba0b428fc398a3bb67d60300;hpb=7107ed62f445c83a9c79b375158442f6b03f3ce6;p=idzebra-moved-to-github.git diff --git a/isamc/merge.c b/isamc/merge.c index 12334c6..c2b853a 100644 --- a/isamc/merge.c +++ b/isamc/merge.c @@ -4,10 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: merge.c,v $ - * Revision 1.2 1996-11-01 13:36:46 adam + * Revision 1.3 1996-11-04 14:08:59 adam + * Optimized free block usage. + * + * Revision 1.2 1996/11/01 13:36:46 adam * New element, max_blocks_mem, that control how many blocks of max size * to store in memory during isc_merge. - * Function isc_merge now ignoreds delete/update of identical keys and + * Function isc_merge now ignores delete/update of identical keys and * the proper blocks are then non-dirty and not written in flush_blocks. * * Revision 1.1 1996/11/01 08:59:15 adam @@ -173,7 +176,7 @@ ISAMC_P isc_merge (ISAMC is, ISAMC_P ipos, ISAMC_I data) i_item_ptr = i_item; i_more = (*data->read_item)(data->clientData, &i_item_ptr, &i_mode); - /* it next input item the same as current except + /* is next input item the same as current except for the delete flag? */ cmp = (*is->method->compare_item)(i_item, f_item); if (!cmp && i_mode) @@ -246,7 +249,7 @@ ISAMC_P isc_merge (ISAMC is, ISAMC_P ipos, ISAMC_I data) &r_out_ptr, &r_item); new_offset = r_out_ptr - r_buf; - if (border >= r_offset && border < new_offset) + if (border < new_offset && border >= r_offset) { if (is->method->debug > 2) logf (LOG_LOG, "isc: border %d %d", ptr, border);