diff options
Diffstat (limited to 'storage/innobase/include/btr0cur.ic')
-rw-r--r-- | storage/innobase/include/btr0cur.ic | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/storage/innobase/include/btr0cur.ic b/storage/innobase/include/btr0cur.ic index bf8a6efb68d..5d2ae768416 100644 --- a/storage/innobase/include/btr0cur.ic +++ b/storage/innobase/include/btr0cur.ic @@ -53,7 +53,8 @@ btr_cur_get_page( btr_cur_t* cursor) /* in: tree cursor */ { page_t* page = buf_frame_align(page_cur_get_rec(&(cursor->page_cur))); - ut_ad(!!page_is_comp(page) == cursor->index->table->comp); + ut_ad(!!page_is_comp(page) + == dict_table_is_comp(cursor->index->table)); return(page); } @@ -75,7 +76,7 @@ UNIV_INLINE void btr_cur_position( /*=============*/ - dict_index_t* index, /* in: index */ + dict_index_t* index, /* in: index */ rec_t* rec, /* in: record in tree */ btr_cur_t* cursor) /* in: cursor */ { @@ -96,7 +97,7 @@ btr_cur_compress_recommendation( mtr_t* mtr) /* in: mtr */ { page_t* page; - + ut_ad(mtr_memo_contains(mtr, buf_block_align( btr_cur_get_page(cursor)), MTR_MEMO_PAGE_X_FIX)); @@ -104,27 +105,27 @@ btr_cur_compress_recommendation( page = btr_cur_get_page(cursor); if ((page_get_data_size(page) < BTR_CUR_PAGE_COMPRESS_LIMIT) - || ((btr_page_get_next(page, mtr) == FIL_NULL) - && (btr_page_get_prev(page, mtr) == FIL_NULL))) { + || ((btr_page_get_next(page, mtr) == FIL_NULL) + && (btr_page_get_prev(page, mtr) == FIL_NULL))) { /* The page fillfactor has dropped below a predefined minimum value OR the level in the B-tree contains just one page: we recommend compression if this is not the root page. */ - + if (dict_tree_get_page((cursor->index)->tree) - == buf_frame_get_page_no(page)) { + == buf_frame_get_page_no(page)) { - /* It is the root page */ + /* It is the root page */ - return(FALSE); + return(FALSE); } return(TRUE); } return(FALSE); -} +} /************************************************************************* Checks if the record on which the cursor is placed can be deleted without @@ -140,7 +141,7 @@ btr_cur_can_delete_without_compress( mtr_t* mtr) /* in: mtr */ { page_t* page; - + ut_ad(mtr_memo_contains(mtr, buf_block_align( btr_cur_get_page(cursor)), MTR_MEMO_PAGE_X_FIX)); @@ -148,21 +149,21 @@ btr_cur_can_delete_without_compress( page = btr_cur_get_page(cursor); if ((page_get_data_size(page) - rec_size < BTR_CUR_PAGE_COMPRESS_LIMIT) - || ((btr_page_get_next(page, mtr) == FIL_NULL) - && (btr_page_get_prev(page, mtr) == FIL_NULL)) - || (page_get_n_recs(page) < 2)) { + || ((btr_page_get_next(page, mtr) == FIL_NULL) + && (btr_page_get_prev(page, mtr) == FIL_NULL)) + || (page_get_n_recs(page) < 2)) { /* The page fillfactor will drop below a predefined minimum value, OR the level in the B-tree contains just one page, OR the page will become empty: we recommend compression if this is not the root page. */ - + if (dict_tree_get_page((cursor->index)->tree) - == buf_frame_get_page_no(page)) { + == buf_frame_get_page_no(page)) { - /* It is the root page */ + /* It is the root page */ - return(TRUE); + return(TRUE); } return(FALSE); |