Commit d927bc67 authored by Sergey Vojtovich's avatar Sergey Vojtovich

Applying InnoDB plugin snashot

Detailed revision comments:

r6107 | marko | 2009-10-28 16:10:34 +0200 (Wed, 28 Oct 2009) | 5 lines
branches/zip: buf_page_set_old(): Improve UNIV_LRU_DEBUG diagnostics
in order to catch the buf_pool->LRU_old corruption reported in Issue #381.

buf_LRU_old_init(): Set the property from the tail towards the front
of the buf_pool->LRU list, in order not to trip the debug check.
parent 74d505db
......@@ -1009,13 +1009,11 @@ buf_LRU_old_init(void)
the adjust function to move the LRU_old pointer to the right
position */
bpage = UT_LIST_GET_FIRST(buf_pool->LRU);
while (bpage != NULL) {
for (bpage = UT_LIST_GET_LAST(buf_pool->LRU); bpage != NULL;
bpage = UT_LIST_GET_PREV(LRU, bpage)) {
ut_ad(bpage->in_LRU_list);
ut_ad(buf_page_in_file(bpage));
buf_page_set_old(bpage, TRUE);
bpage = UT_LIST_GET_NEXT(LRU, bpage);
}
buf_pool->LRU_old = UT_LIST_GET_FIRST(buf_pool->LRU);
......
......@@ -466,10 +466,14 @@ buf_page_set_old(
ut_ad(bpage->in_LRU_list);
#ifdef UNIV_LRU_DEBUG
if (UT_LIST_GET_PREV(LRU, bpage) && UT_LIST_GET_NEXT(LRU, bpage)
&& UT_LIST_GET_PREV(LRU, bpage)->old
== UT_LIST_GET_NEXT(LRU, bpage)->old) {
ut_a(UT_LIST_GET_PREV(LRU, bpage)->old == old);
if (UT_LIST_GET_PREV(LRU, bpage) && UT_LIST_GET_NEXT(LRU, bpage)) {
const buf_page_t* prev = UT_LIST_GET_PREV(LRU, bpage);
const buf_page_t* next = UT_LIST_GET_NEXT(LRU, bpage);
if (prev->old == next->old) {
ut_a(prev->old == old);
} else {
ut_a(!prev->old);
}
}
#endif /* UNIV_LRU_DEBUG */
......
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