diff options
Diffstat (limited to 'src/btree/bt_discard.c')
-rw-r--r-- | src/btree/bt_discard.c | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/src/btree/bt_discard.c b/src/btree/bt_discard.c index 4674efe8c44..509333551c4 100644 --- a/src/btree/bt_discard.c +++ b/src/btree/bt_discard.c @@ -204,6 +204,23 @@ __free_page_modify(WT_SESSION_IMPL *session, WT_PAGE *page) WT_PAGE_COL_FIX ? 1 : page->pg_var_entries, update_ignore); break; + case WT_PAGE_ROW_LEAF: + /* + * Free the insert array. + * + * Row-store tables have one additional slot in the insert array + * (the insert array has an extra slot to hold keys that sort + * before keys found on the original page). + */ + if (mod->mod_row_insert != NULL) + __free_skip_array(session, mod->mod_row_insert, + page->pg_row_entries + 1, update_ignore); + + /* Free the update array. */ + if (mod->mod_row_update != NULL) + __free_update(session, mod->mod_row_update, + page->pg_row_entries, update_ignore); + break; } /* Free the overflow on-page, reuse and transaction-cache skiplists. */ @@ -324,10 +341,6 @@ __free_page_row_leaf(WT_SESSION_IMPL *session, WT_PAGE *page) WT_ROW *rip; uint32_t i; void *copy; - bool update_ignore; - - /* In some failed-split cases, we can't discard updates. */ - update_ignore = F_ISSET_ATOMIC(page, WT_PAGE_UPDATE_IGNORE); /* * Free the in-memory index array. @@ -342,22 +355,6 @@ __free_page_row_leaf(WT_SESSION_IMPL *session, WT_PAGE *page) page, copy, &ikey, NULL, NULL, NULL); __wt_free(session, ikey); } - - /* - * Free the insert array. - * - * Row-store tables have one additional slot in the insert array (the - * insert array has an extra slot to hold keys that sort before keys - * found on the original page). - */ - if (page->pg_row_ins != NULL) - __free_skip_array(session, - page->pg_row_ins, page->pg_row_entries + 1, update_ignore); - - /* Free the update array. */ - if (page->pg_row_upd != NULL) - __free_update(session, - page->pg_row_upd, page->pg_row_entries, update_ignore); } /* |