summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-08-03 16:51:41 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-08-03 17:14:38 +0530
commit8e1ef2ec2624ab5befb905a1e9bbdaa479833c35 (patch)
tree21b57145f751ea2b60baf79cf909affb567387db
parentdc716da4571465af3adadcd2c471f11fef3a2191 (diff)
downloadmariadb-git-bb-10.2-MDEV-23380.tar.gz
MDEV-23380 InnoDB reads a page from disk despite parsing MLOG_INIT_FILE_PAGE2 recordbb-10.2-MDEV-23380
This problem is caused by 6697135c6d03935118c3dfa1c97faea7fa76afa6 (MDEV-21572). During recovery, InnoDB prefetches the siblings of change buffer index leaf page. It does asynchronous page read and recovery scenario wasn't handled in buf_read_page_background(). It leads to the refusal of startup of the server. Solution: ========= InnoDB shouldn't allow the change buffer index page siblings to be prefetched.
-rw-r--r--storage/innobase/btr/btr0cur.cc5
-rw-r--r--storage/innobase/include/dict0mem.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index d433f9cadc8..b98f1fe8fa6 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -3145,7 +3145,7 @@ fail:
/* prefetch siblings of the leaf for the pessimistic
operation, if the page is leaf. */
- if (page_is_leaf(page)) {
+ if (page_is_leaf(page) && !index->is_ibuf()) {
btr_cur_prefetch_siblings(block);
}
fail_err:
@@ -4035,6 +4035,7 @@ btr_cur_optimistic_update(
if (rec_offs_any_extern(*offsets)) {
any_extern:
+ ut_ad(!index->is_ibuf());
/* Externally stored fields are treated in pessimistic
update */
@@ -4214,7 +4215,7 @@ func_exit:
}
}
- if (err != DB_SUCCESS) {
+ if (err != DB_SUCCESS && !index->is_ibuf()) {
/* prefetch siblings of the leaf for the pessimistic
operation. */
btr_cur_prefetch_siblings(block);
diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
index 0d4ee9d23ec..804176e2d5b 100644
--- a/storage/innobase/include/dict0mem.h
+++ b/storage/innobase/include/dict0mem.h
@@ -1034,6 +1034,9 @@ struct dict_index_t{
}
}
+ /** @return whether this is the change buffer */
+ bool is_ibuf() const { return UNIV_UNLIKELY(type & DICT_IBUF); }
+
#ifdef BTR_CUR_HASH_ADAPT
/** @return a clone of this */
dict_index_t* clone() const;