1N/A * See the file LICENSE for redistribution information. 1N/A * Copyright (c) 1996, 1997, 1998 1N/A * Sleepycat Software. All rights reserved. 1N/A#
endif /* not lint */ 1N/A * PUBLIC: int __db_addrem_recover 1N/A * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *)); 1N/A * This log message is generated whenever we add or remove a duplicate 1N/A * to/from a duplicate page. On recover, we just do the opposite. 1N/A * We are undoing and the page doesn't exist. That 1N/A * is equivalent to having a pagelsn of 0, so we 1N/A * would not have to undo anything. In this case, 1N/A * don't bother creating a page. 1N/A /* Need to redo an add, or undo a delete. */ 1N/A /* Need to undo an add, or redo a delete. */ 1N/A * PUBLIC: int __db_split_recover __P((DB_LOG *, DBT *, DB_LSN *, int, void *)); 1N/A * We are undoing and the page doesn't exist. That 1N/A * is equivalent to having a pagelsn of 0, so we 1N/A * would not have to undo anything. In this case, 1N/A * don't bother creating a page. 1N/A * There are two types of log messages here, one for the old page 1N/A * and one for the new pages created. The original image in the 1N/A * SPLITOLD record is used for undo. The image in the SPLITNEW 1N/A * is used for redo. We should never have a case where there is 1N/A * a redo operation and the SPLITOLD record is on disk, but not 1N/A * the SPLITNEW record. Therefore, we only redo NEW messages 1N/A * and only undo OLD messages. 1N/A /* Need to redo the split described. */ 1N/A /* Put back the old image. */ 1N/A * PUBLIC: int __db_big_recover __P((DB_LOG *, DBT *, DB_LSN *, int, void *)); 1N/A * We are undoing and the page doesn't exist. That 1N/A * is equivalent to having a pagelsn of 0, so we 1N/A * would not have to undo anything. In this case, 1N/A * don't bother creating a page. 1N/A * There are three pages we need to check. The one on which we are 1N/A * adding data, the previous one whose next_pointer may have 1N/A * been updated, and the next one whose prev_pointer may have 1N/A /* We are either redo-ing an add, or undoing a delete. */ 1N/A * We are either undo-ing an add or redo-ing a delete. 1N/A * The page is about to be reclaimed in either case, so 1N/A * there really isn't anything to do here. 1N/A /* Now check the previous page. */ 1N/A * We are undoing and the page doesn't exist. 1N/A * That is equivalent to having a pagelsn of 0, 1N/A * so we would not have to undo anything. In 1N/A * this case, don't bother creating a page. 1N/A /* Redo add, undo delete. */ 1N/A /* Redo delete, undo add. */ 1N/A /* Now check the next page. Can only be set on a delete. */ 1N/A * We are undoing and the page doesn't exist. 1N/A * That is equivalent to having a pagelsn of 0, 1N/A * so we would not have to undo anything. In 1N/A * this case, don't bother creating a page. 1N/A * __db_ovref_recover -- 1N/A * Recovery function for __db_ovref(). 1N/A * PUBLIC: int __db_ovref_recover __P((DB_LOG *, DBT *, DB_LSN *, int, void *)); 1N/A /* Need to redo update described. */ 1N/A /* Need to undo update described. */ 1N/A * __db_relink_recover -- 1N/A * Recovery function for relink. 1N/A * PUBLIC: int __db_relink_recover 1N/A * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *)); 1N/A * There are up to three pages we need to check -- the page, and the 1N/A * previous and next pages, if they existed. For a page add operation, 1N/A * the current page is the result of a split and is being recovered 1N/A * elsewhere, so all we need do is recover the next page. 1N/A /* Redo the relink. */ 1N/A /* Undo the relink. */ 1N/A /* Redo the remove or undo the add. */ 1N/A /* Undo the remove or redo the add. */ 1N/A /* Redo the relink. */ 1N/A /* Undo the relink. */ 1N/A * PUBLIC: int __db_addpage_recover 1N/A * PUBLIC: __P((DB_LOG *, DBT *, DB_LSN *, int, void *)); 1N/A * We need to check two pages: the old one and the new one onto 1N/A * which we're going to add duplicates. Do the old one first. 1N/A * We are undoing and the page doesn't exist. That 1N/A * is equivalent to having a pagelsn of 0, so we 1N/A * would not have to undo anything. In this case, 1N/A * don't bother creating a page. 1N/A * __db_debug_recover -- 1N/A * Recovery function for debug. 1N/A * PUBLIC: int __db_debug_recover __P((DB_LOG *, DBT *, DB_LSN *, int, void *));