From 2eeef6b03632bae035c1f4d49b8ef34ae92c9676 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 1 Apr 2010 15:25:39 +0400 Subject: [PATCH] Applying InnoDB snapshot Detailed revision comments: r6498 | marko | 2010-01-21 11:22:52 +0200 (Thu, 21 Jan 2010) | 15 lines branches/zip: buf_page_get_gen(): Obey recv_no_ibuf_operations and do not call ibuf_merge_or_delete_for_page() in crash recovery, before the redo log has been applied. This could cure some hard-to-repeat, hard-to-explain bugs related to secondary indexes. A possible recipe to repeat the bug: 1. update a secondary index leaf page on a compressed table 2. evict the page from the buffer pool while it is still dirty 3. ibuf_insert() something for the page 4. crash 5. crash recovery; ibuf merge would be done too early, before applying redo log to the sec index page or the ibuf pages --- storage/innodb_plugin/ChangeLog | 6 ++++++ storage/innodb_plugin/buf/buf0buf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index c0ad21cd132..45f99504b67 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,9 @@ +2010-01-21 The InnoDB Team + + * buf/buf0buf.c: + Do not merge buffered inserts to compressed pages before + the redo log has been applied in crash recovery. + 2010-01-13 The InnoDB Team * row/row0sel.c: diff --git a/storage/innodb_plugin/buf/buf0buf.c b/storage/innodb_plugin/buf/buf0buf.c index 549d1a31942..fd5b07330cb 100644 --- a/storage/innodb_plugin/buf/buf0buf.c +++ b/storage/innodb_plugin/buf/buf0buf.c @@ -2239,7 +2239,7 @@ wait_until_unfixed: while not holding buf_pool_mutex or block->mutex. */ success = buf_zip_decompress(block, srv_use_checksums); - if (UNIV_LIKELY(success)) { + if (UNIV_LIKELY(success && !recv_no_ibuf_operations)) { ibuf_merge_or_delete_for_page(block, space, offset, zip_size, TRUE); }