diff options
author | Inaam Rana <inaam.rana@oracle.com> | 2011-11-18 11:20:17 -0500 |
---|---|---|
committer | Inaam Rana <inaam.rana@oracle.com> | 2011-11-18 11:20:17 -0500 |
commit | eb4d3ef264e93e27397df6bcaf18ad6a546e918c (patch) | |
tree | ac8a02cc928936255beeb859540ec4228f95fd72 /storage | |
parent | a07f5da12491b74bdb40a50b60227d243c0d059f (diff) | |
download | mariadb-git-eb4d3ef264e93e27397df6bcaf18ad6a546e918c.tar.gz |
merge bug#13390506 from mysql-5.1
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/buf/buf0buf.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index 1fcc2107f18..50f90b0918a 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -1219,6 +1219,24 @@ buf_pool_free_instance( { buf_chunk_t* chunk; buf_chunk_t* chunks; + buf_page_t* bpage; + + bpage = UT_LIST_GET_LAST(buf_pool->LRU); + while (bpage != NULL) { + buf_page_t* prev_bpage = UT_LIST_GET_PREV(LRU, bpage); + enum buf_page_state state = buf_page_get_state(bpage); + + ut_ad(buf_page_in_file(bpage)); + ut_ad(bpage->in_LRU_list); + + if (state != BUF_BLOCK_FILE_PAGE) { + /* We must not have any dirty block. */ + ut_ad(state == BUF_BLOCK_ZIP_PAGE); + buf_page_free_descriptor(bpage); + } + + bpage = prev_bpage; + } chunks = buf_pool->chunks; chunk = chunks + buf_pool->n_chunks; |