From 17842af30003f0ef90f218d1c2a57b2d54772710 Mon Sep 17 00:00:00 2001 From: marko Date: Tue, 28 Nov 2006 11:08:33 +0000 Subject: [PATCH] branches/zip: Allow the code to compile with debugging enabled. This was broken in r1066. --- buf/buf0buf.c | 5 +++-- buf/buf0flu.c | 2 +- include/buf0buf.h | 4 ++-- include/buf0buf.ic | 1 + include/buf0flu.ic | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/buf/buf0buf.c b/buf/buf0buf.c index 73ffa7caad6..c961b1c936b 100644 --- a/buf/buf0buf.c +++ b/buf/buf0buf.c @@ -2405,7 +2405,8 @@ buf_validate(void) #endif if (block->io_fix == BUF_IO_WRITE) { - switch (block->flush_type) { + switch (buf_page_get_flush_type( + &block->page)) { case BUF_FLUSH_LRU: n_lru_flush++; ut_a(rw_lock_is_locked( @@ -2430,7 +2431,7 @@ buf_validate(void) n_lru++; - if (block->oldest_modification > 0) { + if (block->page.oldest_modification > 0) { n_flush++; } diff --git a/buf/buf0flu.c b/buf/buf0flu.c index dbf1bb09f3d..5a2f952161f 100644 --- a/buf/buf0flu.c +++ b/buf/buf0flu.c @@ -191,7 +191,7 @@ buf_flush_write_complete( UT_LIST_REMOVE(flush_list, buf_pool->flush_list, &(block->page)); - ut_d(UT_LIST_VALIDATE(flush_list, buf_block_t, buf_pool->flush_list)); + ut_d(UT_LIST_VALIDATE(flush_list, buf_page_t, buf_pool->flush_list)); flush_type = buf_page_get_flush_type(&block->page); buf_pool->n_flush[flush_type]--; diff --git a/include/buf0buf.h b/include/buf0buf.h index ab859481920..81e48e71fde 100644 --- a/include/buf0buf.h +++ b/include/buf0buf.h @@ -1002,8 +1002,8 @@ MEMORY: is not in free list, LRU list, or flush list, nor page hash table FILE_PAGE: space and offset are defined, is in page hash table if io_fix == BUF_IO_WRITE, - pool: no_flush[block->flush_type] is in reset state, - pool: n_flush[block->flush_type] > 0 + pool: no_flush[flush_type] is in reset state, + pool: n_flush[flush_type] > 0 (1) if buf_fix_count == 0, then is in LRU list, not in free list diff --git a/include/buf0buf.ic b/include/buf0buf.ic index dfc8bb37a3a..7b3ceb6314b 100644 --- a/include/buf0buf.ic +++ b/include/buf0buf.ic @@ -179,6 +179,7 @@ buf_page_get_flush_type( case BUF_FLUSH_LIST: return(flush_type); case BUF_FLUSH_N_TYPES: + break; } ut_error; #endif /* UNIV_DEBUG */ diff --git a/include/buf0flu.ic b/include/buf0flu.ic index bef713806b5..248e9e8b823 100644 --- a/include/buf0flu.ic +++ b/include/buf0flu.ic @@ -47,7 +47,7 @@ buf_flush_note_modification( ut_ad(mtr->start_lsn != 0); ut_ad(mtr->modifications); - ut_ad(block->newest_modification <= mtr->end_lsn); + ut_ad(block->page.newest_modification <= mtr->end_lsn); block->page.newest_modification = mtr->end_lsn;