diff options
Diffstat (limited to 'storage/innobase/include')
-rw-r--r-- | storage/innobase/include/fsp0fsp.h | 66 | ||||
-rw-r--r-- | storage/innobase/include/mtr0mtr.h | 4 |
2 files changed, 42 insertions, 28 deletions
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h index 8debdb00013..a50be6f8998 100644 --- a/storage/innobase/include/fsp0fsp.h +++ b/storage/innobase/include/fsp0fsp.h @@ -407,42 +407,52 @@ fsp_header_inc_size( ulint space_id, /*!< in: space id */ ulint size_inc, /*!< in: size increment in pages */ mtr_t* mtr); /*!< in/out: mini-transaction */ -/**********************************************************************//** -Creates a new segment. + +/** Creates a new segment. +@param[in] space space id +@param[in] byte_offset byte offset of the created segment header + on the page +@param[in,out] mtr mini-transaction +@param[in,out] block block where segment header is placed; + If it is null then new page will be + allocated and it will belong to + the created segment @return the block where the segment header is placed, x-latched, NULL if could not create segment because of lack of space */ buf_block_t* fseg_create( -/*========*/ - ulint space_id,/*!< in: space id */ - ulint page, /*!< in: page where the segment header is placed: if - this is != 0, the page must belong to another segment, - if this is 0, a new page will be allocated and it - will belong to the created segment */ - ulint byte_offset, /*!< in: byte offset of the created segment header - on the page */ - mtr_t* mtr); /*!< in/out: mini-transaction */ -/**********************************************************************//** -Creates a new segment. + ulint space, + ulint byte_offset, + mtr_t* mtr, + buf_block_t* block=NULL); + +/** Creates a new segment. +@param[in] space_id space_id +@param[in] byte_offset byte offset of the created segment + header on the page +@param[in] has_done_reservation TRUE if the caller has already + done the reservation for the pages + with fsp_reserve_free_externts + (at least 2 extents: one for + the inode and the other for the + segment) then there is no need to do + the check for this individual + operation +@param[in,out] mtr mini-transaction +@param[in] block block where the segment header is + placed. If it is null then new page + will be allocated and it will belong + to the created segment @return the block where the segment header is placed, x-latched, NULL if could not create segment because of lack of space */ buf_block_t* fseg_create_general( -/*================*/ - ulint space_id,/*!< in: space id */ - ulint page, /*!< in: page where the segment header is placed: if - this is != 0, the page must belong to another segment, - if this is 0, a new page will be allocated and it - will belong to the created segment */ - ulint byte_offset, /*!< in: byte offset of the created segment header - on the page */ - ibool has_done_reservation, /*!< in: TRUE if the caller has already - done the reservation for the pages with - fsp_reserve_free_extents (at least 2 extents: one for - the inode and the other for the segment) then there is - no need to do the check for this individual - operation */ - mtr_t* mtr); /*!< in/out: mini-transaction */ + ulint space_id, + ulint byte_offset, + ibool has_done_reservation, + mtr_t* mtr, + buf_block_t* block); + /**********************************************************************//** Calculates the number of pages reserved by a segment, and how many pages are currently used. diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index e91590d48d1..5270cd671db 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -434,6 +434,10 @@ struct mtr_t { static inline bool is_block_dirtied(const buf_block_t* block) MY_ATTRIBUTE((warn_unused_result)); + /** Get the buffer fix count for the block added by this mtr. + @param[in] block block to be checked + @return number of buffer count added by this mtr */ + int32_t get_fix_count(buf_block_t *block); private: /** Look up the system tablespace. */ void lookup_sys_space(); |