From 16c137aaf789abf582c4f0c9d3462af41bb2a45a Mon Sep 17 00:00:00 2001 From: Sears Russell Date: Wed, 5 Aug 2009 19:48:59 +0000 Subject: [PATCH] remove unnecessary checks --- src/stasis/page/slotted.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/stasis/page/slotted.c b/src/stasis/page/slotted.c index 5ff4615..72e32ec 100644 --- a/src/stasis/page/slotted.c +++ b/src/stasis/page/slotted.c @@ -336,8 +336,9 @@ static recordid slottedNext(int xid, Page *p, recordid rid) { } static recordid slottedFirst(int xid, Page *p) { +#ifdef SLOTTED_PAGE_OLD_CHECKS slottedFsck(p); - +#endif recordid rid = { p->id, -1, 0 }; return slottedNext(xid, p, rid); } @@ -350,14 +351,18 @@ static recordid slottedLast(int xid, Page *p) { static int notSupported(int xid, Page * p) { return 0; } static int slottedFreespace(int xid, Page * p) { +#ifdef SLOTTED_PAGE_OLD_CHECKS slottedFsck(p); +#endif return slottedFreespaceForSlot(p, INVALID_SLOT); } static recordid slottedPreRalloc(int xid, Page * p, int type) { assert(type != INVALID_SLOT); +#ifdef SLOTTED_PAGE_OLD_CHECKS slottedFsck(p); +#endif recordid rid; rid.page = p->id; @@ -536,8 +541,9 @@ static void slottedFree(int xid, Page * p, recordid rid) { *stasis_page_slotted_freelist_ptr(p) = rid.slot; assert(slottedGetType(xid,p,rid)==INVALID_SLOT); } - +#ifdef SLOTTED_PAGE_OLD_CHECKS slottedFsck(p); +#endif }