Commit 17842af3 authored by marko's avatar marko

branches/zip: Allow the code to compile with debugging enabled. This

was broken in r1066.
parent 8e77f38e
...@@ -2405,7 +2405,8 @@ buf_validate(void) ...@@ -2405,7 +2405,8 @@ buf_validate(void)
#endif #endif
if (block->io_fix == BUF_IO_WRITE) { if (block->io_fix == BUF_IO_WRITE) {
switch (block->flush_type) { switch (buf_page_get_flush_type(
&block->page)) {
case BUF_FLUSH_LRU: case BUF_FLUSH_LRU:
n_lru_flush++; n_lru_flush++;
ut_a(rw_lock_is_locked( ut_a(rw_lock_is_locked(
...@@ -2430,7 +2431,7 @@ buf_validate(void) ...@@ -2430,7 +2431,7 @@ buf_validate(void)
n_lru++; n_lru++;
if (block->oldest_modification > 0) { if (block->page.oldest_modification > 0) {
n_flush++; n_flush++;
} }
......
...@@ -191,7 +191,7 @@ buf_flush_write_complete( ...@@ -191,7 +191,7 @@ buf_flush_write_complete(
UT_LIST_REMOVE(flush_list, buf_pool->flush_list, &(block->page)); 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); flush_type = buf_page_get_flush_type(&block->page);
buf_pool->n_flush[flush_type]--; buf_pool->n_flush[flush_type]--;
......
...@@ -1002,8 +1002,8 @@ MEMORY: is not in free list, LRU list, or flush list, nor page ...@@ -1002,8 +1002,8 @@ MEMORY: is not in free list, LRU list, or flush list, nor page
hash table hash table
FILE_PAGE: space and offset are defined, is in page hash table FILE_PAGE: space and offset are defined, is in page hash table
if io_fix == BUF_IO_WRITE, if io_fix == BUF_IO_WRITE,
pool: no_flush[block->flush_type] is in reset state, pool: no_flush[flush_type] is in reset state,
pool: n_flush[block->flush_type] > 0 pool: n_flush[flush_type] > 0
(1) if buf_fix_count == 0, then (1) if buf_fix_count == 0, then
is in LRU list, not in free list is in LRU list, not in free list
......
...@@ -179,6 +179,7 @@ buf_page_get_flush_type( ...@@ -179,6 +179,7 @@ buf_page_get_flush_type(
case BUF_FLUSH_LIST: case BUF_FLUSH_LIST:
return(flush_type); return(flush_type);
case BUF_FLUSH_N_TYPES: case BUF_FLUSH_N_TYPES:
break;
} }
ut_error; ut_error;
#endif /* UNIV_DEBUG */ #endif /* UNIV_DEBUG */
......
...@@ -47,7 +47,7 @@ buf_flush_note_modification( ...@@ -47,7 +47,7 @@ buf_flush_note_modification(
ut_ad(mtr->start_lsn != 0); ut_ad(mtr->start_lsn != 0);
ut_ad(mtr->modifications); 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; block->page.newest_modification = mtr->end_lsn;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment