Browse Source

MDEV-21133: Remove buf_frame_copy()

pull/1424/head
Marko Mäkelä 6 years ago
parent
commit
bf2cc46798
  1. 3
      storage/innobase/btr/btr0btr.cc
  2. 10
      storage/innobase/include/buf0buf.h
  3. 17
      storage/innobase/include/buf0buf.ic
  4. 3
      storage/innobase/page/page0zip.cc

3
storage/innobase/btr/btr0btr.cc

@ -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);

10
storage/innobase/include/buf0buf.h

@ -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

17
storage/innobase/include/buf0buf.ic

@ -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

3
storage/innobase/page/page0zip.cc

@ -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 */

Loading…
Cancel
Save