[patch 102/129] Merge patch for revision 1908 from InnoDB SVN:
revno: 1908
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6111
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6110
committer: marko
timestamp: Thu 2009-10-29 11:04:11 +0000
message:
branches/zip: Fix corruption of buf_pool->LRU_old and improve debug assertions.
This was reported as Issue #381.
buf_page_set_old(): Assert that blocks may only be set old if
buf_pool->LRU_old is initialized and buf_pool->LRU_old_len is nonzero.
Assert that buf_pool->LRU_old points to the block at the old/new boundary.
buf_LRU_old_adjust_len(): Invoke buf_page_set_old() after adjusting
buf_pool->LRU_old and buf_pool->LRU_old_len, in order not to violate
the added assertions.
buf_LRU_old_init(): Replace buf_page_set_old() with a direct
assignment to bpage->old, because these loops that initialize all the
blocks would temporarily violate the assertions about
buf_pool->LRU_old.
buf_LRU_remove_block(): When setting buf_pool->LRU_old = NULL, also
clear all bpage->old flags and set buf_pool->LRU_old_len = 0.
buf_LRU_add_block_to_end_low(), buf_LRU_add_block_low(): Move the
buf_page_set_old() call later in order not to violate the debug
assertions. If buf_pool->LRU_old is NULL, set old=FALSE.
buf_LRU_free_block(): Replace the UNIV_LRU_DEBUG assertion with a
dummy buf_page_set_old() call that performs more thorough checks.
buf_LRU_validate(): Do not tolerate garbage in buf_pool->LRU_old_len
even if buf_pool->LRU_old is NULL. Check that bpage->old is monotonic.
buf_relocate(): Make the UNIV_LRU_DEBUG checks stricter.
buf0buf.h: Revise the documentation of buf_page_t::old and
buf_pool_t::LRU_old_len.
modified:
ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
buf/buf0buf.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbuf%2Fbuf0buf.c
buf/buf0lru.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fbuf%2Fbuf0lru.c
include/buf0buf.h 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fbuf0buf.h
include/buf0buf.ic 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fbuf0buf.ic
diff:
=== modified file 'ChangeLog'