diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2012-11-28 09:03:37 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2012-11-28 09:03:37 +0200 |
commit | cfebb6459d035104aad8cef596285b6b07f5e403 (patch) | |
tree | 281a646e63e7e454db3ac224bda0a471f3e42b67 /storage | |
parent | 80fa4f58094affcfb13b454955ee372a2a61ea6c (diff) | |
parent | 112a93a7c863fe591c8983d15b29c9b4c6aec53b (diff) | |
download | mariadb-git-cfebb6459d035104aad8cef596285b6b07f5e403.tar.gz |
Merge mysql-5.1 to mysql-5.5.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/buf/buf0buf.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index 9146106d0b9..ff035a74281 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -2456,14 +2456,26 @@ wait_until_unfixed: buf_page_free_descriptor(bpage); - /* Decompress the page and apply buffered operations - while not holding buf_pool->mutex or block->mutex. */ + /* Decompress the page while not holding + buf_pool->mutex or block->mutex. */ success = buf_zip_decompress(block, srv_use_checksums); ut_a(success); if (UNIV_LIKELY(!recv_no_ibuf_operations)) { - ibuf_merge_or_delete_for_page(block, space, offset, - zip_size, TRUE); + unsigned accessed; + + mutex_enter(&block->mutex); + accessed = buf_page_is_accessed(&block->page); + mutex_exit(&block->mutex); + + if (accessed) { +#ifdef UNIV_IBUF_COUNT_DEBUG + ut_a(ibuf_count_get(space, offset) == 0); +#endif /* UNIV_IBUF_COUNT_DEBUG */ + } else { + ibuf_merge_or_delete_for_page( + block, space, offset, zip_size, TRUE); + } } /* Unfix and unlatch the block. */ |