From 9615a2bcb063c5abdbec9a1b8be38f150443c4e7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 14 Aug 2006 17:14:08 +0000 Subject: [PATCH] Fixed a bug regarding ISAMB tree splitting. Code fixed in similar way as for version 1.80 of isamb.c. --- isamb/isamb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/isamb/isamb.c b/isamb/isamb.c index 016177c..18d120d 100644 --- a/isamb/isamb.c +++ b/isamb/isamb.c @@ -1,4 +1,4 @@ -/* $Id: isamb.c,v 1.47.2.5 2006-08-14 10:39:07 adam Exp $ +/* $Id: isamb.c,v 1.47.2.6 2006-08-14 17:14:08 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004 Index Data Aps @@ -565,6 +565,8 @@ int insert_int (ISAMB b, struct ISAMB_block *p, void *lookahead_item, if (p->size <= b->file[p->cat].head.block_max) { memcpy (startp, dst_buf, dst - dst_buf); + + close_block(b, sub_p2); } else { @@ -573,6 +575,9 @@ int insert_int (ISAMB b, struct ISAMB_block *p, void *lookahead_item, src = dst_buf; endp = dst; + p->dirty = 1; + close_block(b, sub_p2); + half = src + b->file[p->cat].head.block_size/2; decode_ptr (&src, &pos); while (src <= half) @@ -595,7 +600,6 @@ int insert_int (ISAMB b, struct ISAMB_block *p, void *lookahead_item, p->size = p_new_size; } p->dirty = 1; - close_block (b, sub_p2); } close_block (b, sub_p1); return more; -- 1.7.10.4