From fac5d2ff37391c14ba1bd92343e43f0b9d46a2bd Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Thu, 11 Feb 2010 20:35:38 +0000 Subject: [PATCH] fix default LSN handling for pages with headers --- src/stasis/page.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/stasis/page.c b/src/stasis/page.c index 953cac6..2a2e169 100644 --- a/src/stasis/page.c +++ b/src/stasis/page.c @@ -285,6 +285,11 @@ void stasis_record_compact_slotids(int xid, Page * p) { void stasis_page_loaded(Page * p, pagetype_t type){ p->pageType = (type == UNKNOWN_TYPE_PAGE) ? *stasis_page_type_ptr(p) : type; assert(page_impls[p->pageType].page_type == p->pageType); + if(page_impls[type].has_header) { + p->LSN = *stasis_page_lsn_cptr(p); + } else { + p->LSN = 0; // TODO is this the right thing to do? + } if (page_impls[p->pageType].pageLoaded) page_impls[p->pageType].pageLoaded(p); } void stasis_page_flushed(Page * p){