From b9732ff4230548163453f28181a96ed268e4de1f Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Tue, 19 Mar 1996 19:22:44 +0000 Subject: [PATCH] Fixed update-bug --- isam/physical.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/isam/physical.c b/isam/physical.c index 6779a89..d8883f1 100644 --- a/isam/physical.c +++ b/isam/physical.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: physical.c,v $ - * Revision 1.9 1996-02-06 10:19:57 quinn + * Revision 1.10 1996-03-19 19:22:44 quinn + * Fixed update-bug + * + * Revision 1.9 1996/02/06 10:19:57 quinn * Attempt at fixing bug. Not all blocks were read before they were unlinked * prior to a remap operation. * @@ -298,8 +301,26 @@ void is_p_align(is_mtable *tab) else { tab->data = tab->data->next; - tab->data->state = IS_MBSTATE_DIRTY; next = tab->data; + if (next) + { + if (next->state < IS_MBSTATE_CLEAN) + { + if (is_p_read_full(tab, next) < 0) + { + logf(LOG_FATAL, "Error during re-alignment"); + abort(); + } + if (next->nextpos && !next->next) + { + next->next = xmalloc_mblock(); + next->next->diskpos = next->nextpos; + next->next->state = IS_MBSTATE_UNREAD; + next->next->data = 0; + } + } + next->state = IS_MBSTATE_DIRTY; /* force re-process */ + } } if (mblock->diskpos >= 0) is_freestore_free(tab->is, tab->pos_type, mblock->diskpos); -- 1.7.10.4