branches/zip: buf_flush_remove(): buf_page_get_mutex(bpage) must have been

acquired by the caller.

buf_LRU_invalidate_tablespace(): Do not leak buf_pool->zip_mutex when
rescanning the LRU list.
This commit is contained in:
marko 2007-01-16 14:37:40 +00:00
parent 8a6e7d8c91
commit fb8b8e6d5c
2 changed files with 3 additions and 3 deletions

View file

@ -227,6 +227,7 @@ buf_flush_remove(
{
#ifdef UNIV_SYNC_DEBUG
ut_a(mutex_own(&buf_pool->mutex));
ut_a(mutex_own(buf_page_get_mutex(bpage)));
#endif /* UNIV_SYNC_DEBUG */
ut_ad(bpage->in_flush_list);
@ -243,9 +244,7 @@ buf_flush_remove(
ut_error;
return;
case BUF_BLOCK_ZIP_DIRTY:
mutex_enter(&buf_pool->zip_mutex);
buf_page_set_state(bpage, BUF_BLOCK_ZIP_PAGE);
mutex_exit(&buf_pool->zip_mutex);
UT_LIST_REMOVE(list, buf_pool->flush_list, bpage);
buf_LRU_insert_zip_clean(bpage);
break;

View file

@ -105,6 +105,7 @@ scan_again:
ut_a(buf_page_in_file(bpage));
mutex_enter(block_mutex);
next_zip:
prev_bpage = UT_LIST_GET_PREV(LRU, bpage);
if (buf_page_get_space(bpage) == id) {
@ -162,7 +163,7 @@ scan_again:
prev_bpage. Rescan the LRU list. */
bpage = UT_LIST_GET_LAST(buf_pool->LRU);
continue;
goto next_zip;
}
}
next_page: