From 91aae178424c6ec726466ae16fa2a405291786a9 Mon Sep 17 00:00:00 2001 From: marko Date: Mon, 11 Dec 2006 15:48:37 +0000 Subject: [PATCH] branches/zip: Make the code compile with all debugging enabled buf_buddy_relocate(): Replace ut_align_down() with ut_align_offset() in assertions. buf0buddy.h: Include buf0buf.h and sync0sync.h. --- buf/buf0buddy.c | 4 ++-- include/buf0buddy.ic | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/buf/buf0buddy.c b/buf/buf0buddy.c index 63cf980471f..4006dd6805b 100644 --- a/buf/buf0buddy.c +++ b/buf/buf0buddy.c @@ -268,8 +268,8 @@ buf_buddy_relocate( #ifdef UNIV_SYNC_DEBUG ut_a(mutex_own(&buf_pool->mutex)); #endif /* UNIV_SYNC_DEBUG */ - ut_ad(src == ut_align_down(src, size)); - ut_ad(dst == ut_align_down(dst, size)); + ut_ad(!ut_align_offset(src, size)); + ut_ad(!ut_align_offset(dst, size)); ut_ad((((ulint) src) ^ ((ulint) dst)) == size); /* We assume that all memory from buf_buddy_alloc() diff --git a/include/buf0buddy.ic b/include/buf0buddy.ic index 97e19dabfc4..1b73f633863 100644 --- a/include/buf0buddy.ic +++ b/include/buf0buddy.ic @@ -11,8 +11,12 @@ Created December 2006 by Marko Makela # define UNIV_INLINE #endif +#include "buf0buf.h" #include "buf0buddy.h" #include "ut0ut.h" +#ifdef UNIV_SYNC_DEBUG +# include "sync0sync.h" +#endif /* UNIV_SYNC_DEBUG */ /************************************************************************** Allocate a block. */