@@ -688,19 +688,15 @@ ibuf_bitmap_get_map_page_func(
688
688
unsigned line,
689
689
mtr_t * mtr)
690
690
{
691
- buf_block_t * block = NULL ;
692
- dberr_t err = DB_SUCCESS;
693
-
694
- block = buf_page_get_gen (
691
+ buf_block_t * block = buf_page_get_gen (
695
692
ibuf_bitmap_page_no_calc (page_id, zip_size),
696
- zip_size, RW_X_LATCH, NULL , BUF_GET, file, line, mtr, &err);
693
+ zip_size, RW_X_LATCH, NULL , BUF_GET_POSSIBLY_FREED,
694
+ file, line, mtr);
697
695
698
- if (err != DB_SUCCESS ) {
699
- return NULL ;
696
+ if (block ) {
697
+ buf_block_dbg_add_level (block, SYNC_IBUF_BITMAP) ;
700
698
}
701
699
702
-
703
- buf_block_dbg_add_level (block, SYNC_IBUF_BITMAP);
704
700
return block;
705
701
}
706
702
@@ -741,9 +737,12 @@ ibuf_set_free_bits_low(
741
737
#endif /* UNIV_IBUF_DEBUG */
742
738
const page_id_t id (block->page .id ());
743
739
744
- ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
745
- ibuf_bitmap_get_map_page (id, block->zip_size (), mtr),
746
- id, block->physical_size (), val, mtr);
740
+ if (buf_block_t * bitmap_page = ibuf_bitmap_get_map_page (
741
+ id, block->zip_size (), mtr)) {
742
+ ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
743
+ bitmap_page, id, block->physical_size (),
744
+ val, mtr);
745
+ }
747
746
}
748
747
749
748
/* ***********************************************************************/ /* *
@@ -887,10 +886,13 @@ ibuf_update_free_bits_zip(
887
886
buf_page_make_young (&block->page );
888
887
}
889
888
890
- ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
891
- ibuf_bitmap_get_map_page (block->page .id (), block->zip_size (),
892
- mtr),
893
- block->page .id (), block->physical_size (), after, mtr);
889
+ if (buf_block_t * bitmap_page = ibuf_bitmap_get_map_page (
890
+ block->page .id (), block->zip_size (), mtr)) {
891
+
892
+ ibuf_bitmap_page_set_bits<IBUF_BITMAP_FREE>(
893
+ bitmap_page, block->page .id (),
894
+ block->physical_size (), after, mtr);
895
+ }
894
896
}
895
897
896
898
/* *********************************************************************/ /* *
@@ -3669,14 +3671,15 @@ ibuf_insert_to_index_page_low(
3669
3671
" InnoDB: is now probably corrupt. Please run CHECK TABLE on\n "
3670
3672
" InnoDB: that table.\n " , stderr);
3671
3673
3672
- ib::error () << " page " << block->page .id () << " , size "
3673
- << block->physical_size () << " , bitmap bits "
3674
- << ibuf_bitmap_page_get_bits (
3675
- ibuf_bitmap_get_map_page (block->page .id (),
3676
- block->zip_size (),
3677
- mtr)->frame ,
3678
- block->page .id (), block->zip_size (),
3679
- IBUF_BITMAP_FREE, mtr);
3674
+ if (buf_block_t *bitmap_page = ibuf_bitmap_get_map_page (
3675
+ block->page .id (), block->zip_size (), mtr)) {
3676
+
3677
+ ib::error () << " page " << block->page .id () << " , size "
3678
+ << block->physical_size () << " , bitmap bits "
3679
+ << ibuf_bitmap_page_get_bits (bitmap_page->frame ,
3680
+ block->page .id (), block->zip_size (),
3681
+ IBUF_BITMAP_FREE, mtr);
3682
+ }
3680
3683
3681
3684
ib::error () << BUG_REPORT_MSG;
3682
3685
0 commit comments