Skip to content
Permalink
Browse files
MDEV-21133: Remove buf_frame_copy()
  • Loading branch information
dr-m committed Dec 3, 2019
1 parent 6f89946 commit bf2cc46
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 29 deletions.
@@ -1461,7 +1461,8 @@ btr_page_reorganize_low(
|| dict_index_is_spatial(index));

/* Copy the old page to temporary space */
buf_frame_copy(temp_page, page);
memcpy_aligned<UNIV_PAGE_SIZE_MIN>(temp_block->frame, block->frame,
srv_page_size);

if (!recovery) {
btr_search_drop_page_hash_index(block);
@@ -323,16 +323,6 @@ buf_block_free(
/*===========*/
buf_block_t* block); /*!< in, own: block to be freed */

/*********************************************************************//**
Copies contents of a buffer frame to a given buffer.
@return buf */
UNIV_INLINE
byte*
buf_frame_copy(
/*===========*/
byte* buf, /*!< in: buffer to copy to */
const buf_frame_t* frame); /*!< in: buffer frame */

/**************************************************************//**
NOTE! The following macros should be used instead of buf_page_get_gen,
to improve debugging. Only values RW_S_LATCH and RW_X_LATCH are allowed
@@ -847,23 +847,6 @@ buf_block_free(
buf_pool_mutex_exit(buf_pool);
}

/*********************************************************************//**
Copies contents of a buffer frame to a given buffer.
@return buf */
UNIV_INLINE
byte*
buf_frame_copy(
/*===========*/
byte* buf, /*!< in: buffer to copy to */
const buf_frame_t* frame) /*!< in: buffer frame */
{
ut_ad(buf && frame);

memcpy(buf, frame, srv_page_size);

return(buf);
}

/********************************************************************//**
Increments the modify clock of a frame by 1. The caller must (1) own the
buf_pool mutex and block bufferfix count has to be zero, (2) or own an x-lock
@@ -4725,7 +4725,8 @@ page_zip_reorganize(
temp_page = temp_block->frame;

/* Copy the old page to temporary space */
buf_frame_copy(temp_page, page);
memcpy_aligned<UNIV_PAGE_SIZE_MIN>(temp_block->frame, block->frame,
srv_page_size);

/* Recreate the page: note that global data on page (possible
segment headers, next page-field, etc.) is preserved intact */

0 comments on commit bf2cc46

Please sign in to comment.