Commit dd1b7e42 authored by marko's avatar marko

branches/zip: Do not invoke btr_root_fseg_validate() on the insert buffer

B-tree, because there are no file segment headers in the insert buffer B-tree
root page.  The function was introduced in r2627.
parent 002104c5
...@@ -121,10 +121,14 @@ btr_root_block_get( ...@@ -121,10 +121,14 @@ btr_root_block_get(
ut_a((ibool)!!page_is_comp(buf_block_get_frame(block)) ut_a((ibool)!!page_is_comp(buf_block_get_frame(block))
== dict_table_is_comp(index->table)); == dict_table_is_comp(index->table));
#ifdef UNIV_BTR_DEBUG #ifdef UNIV_BTR_DEBUG
if (!dict_index_is_ibuf(index)) {
const page_t* root = buf_block_get_frame(block);
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
+ buf_block_get_frame(block), space)); + root, space));
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
+ buf_block_get_frame(block), space)); + root, space));
}
#endif /* UNIV_BTR_DEBUG */ #endif /* UNIV_BTR_DEBUG */
return(block); return(block);
...@@ -1135,10 +1139,15 @@ btr_root_raise_and_insert( ...@@ -1135,10 +1139,15 @@ btr_root_raise_and_insert(
#endif /* UNIV_ZIP_DEBUG */ #endif /* UNIV_ZIP_DEBUG */
index = btr_cur_get_index(cursor); index = btr_cur_get_index(cursor);
#ifdef UNIV_BTR_DEBUG #ifdef UNIV_BTR_DEBUG
if (!dict_index_is_ibuf(index)) {
ulint space = dict_index_get_space(index);
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
+ root, dict_index_get_space(index))); + root, space));
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
+ root, dict_index_get_space(index))); + root, space));
}
ut_a(dict_index_get_page(index) == page_get_page_no(root)); ut_a(dict_index_get_page(index) == page_get_page_no(root));
#endif /* UNIV_BTR_DEBUG */ #endif /* UNIV_BTR_DEBUG */
ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index), ut_ad(mtr_memo_contains(mtr, dict_index_get_lock(index),
...@@ -2687,12 +2696,18 @@ btr_discard_only_page_on_level( ...@@ -2687,12 +2696,18 @@ btr_discard_only_page_on_level(
/* The father is the root page */ /* The father is the root page */
#ifdef UNIV_BTR_DEBUG #ifdef UNIV_BTR_DEBUG
const page_t* root = buf_block_get_frame(father_block); if (!dict_index_is_ibuf(index)) {
const ulint space = dict_index_get_space(index); const page_t* root
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF = buf_block_get_frame(father_block);
const ulint space
= dict_index_get_space(index);
ut_a(btr_root_fseg_validate(
FIL_PAGE_DATA + PAGE_BTR_SEG_LEAF
+ root, space)); + root, space));
ut_a(btr_root_fseg_validate(FIL_PAGE_DATA + PAGE_BTR_SEG_TOP ut_a(btr_root_fseg_validate(
FIL_PAGE_DATA + PAGE_BTR_SEG_TOP
+ root, space)); + root, space));
}
#endif /* UNIV_BTR_DEBUG */ #endif /* UNIV_BTR_DEBUG */
btr_page_empty(father_block, father_page_zip, mtr, index); btr_page_empty(father_block, father_page_zip, mtr, index);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment