+ next = mblock->next;
+ if (mblock->state == IS_MBSTATE_DIRTY && mblock->num_records == 0)
+ {
+ if (last)
+ {
+ last->next = mblock->next;
+ last->state = IS_MBSTATE_DIRTY;
+ next = mblock->next;
+ }
+ else
+ {
+ next = tab->data->next;
+ 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 */
+ tab->data = next;
+ }
+ }
+ if (mblock->diskpos >= 0)
+ is_freestore_free(tab->is, tab->pos_type, mblock->diskpos);
+ xrelease_mblock(mblock);
+ }
+ else if (mblock->state == IS_MBSTATE_DIRTY && mblock->num_records >