summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2012-11-28 09:00:24 +0200
committerMarko Mäkelä <marko.makela@oracle.com>2012-11-28 09:00:24 +0200
commit112a93a7c863fe591c8983d15b29c9b4c6aec53b (patch)
tree7beb74615ffbd2e3c6d07415b35e8032cb9371b6 /storage
parent0e01efc036af4c1fea14fe424cfd6e169ba917b7 (diff)
downloadmariadb-git-112a93a7c863fe591c8983d15b29c9b4c6aec53b.tar.gz
Bug#14329288 IS THE CALL TO IBUF_MERGE_OR_DELETE_FOR_PAGE FROM
BUF_PAGE_GET_GEN REDUNDANT? buf_page_get_gen(): When decompressing a compressed page that had already been accessed in the buffer pool, do not attempt to merge buffered changes. rb:1602 approved by Inaam Rana
Diffstat (limited to 'storage')
-rw-r--r--storage/innodb_plugin/ChangeLog6
-rw-r--r--storage/innodb_plugin/buf/buf0buf.c20
2 files changed, 22 insertions, 4 deletions
diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog
index 5387555d24f..72f75f39b1d 100644
--- a/storage/innodb_plugin/ChangeLog
+++ b/storage/innodb_plugin/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-28 The InnoDB Team
+
+ * buf/buf0buf.c:
+ Fix Bug#14329288 IS THE CALL TO IBUF_MERGE_OR_DELETE_FOR_PAGE FROM
+ BUF_PAGE_GET_GEN REDUNDANT?
+
2012-11-15 The InnoDB Team
* include/data0type.ic, include/rem0rec.h,
diff --git a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0buf.c
index 755fa947c8f..1222f016c4a 100644
--- a/storage/innodb_plugin/buf/buf0buf.c
+++ b/storage/innodb_plugin/buf/buf0buf.c
@@ -1786,14 +1786,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. */