diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-02 10:04:55 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-03 11:05:18 +0200 |
commit | bf2cc46798ae62b4c941898b33699732867d3425 (patch) | |
tree | 98824972400bbf3561ca7dcaf67c7c5dc8bebdfc | |
parent | 6f89946892b976458f38335e7699dad83c86b933 (diff) | |
download | mariadb-git-bf2cc46798ae62b4c941898b33699732867d3425.tar.gz |
MDEV-21133: Remove buf_frame_copy()
-rw-r--r-- | storage/innobase/btr/btr0btr.cc | 3 | ||||
-rw-r--r-- | storage/innobase/include/buf0buf.h | 10 | ||||
-rw-r--r-- | storage/innobase/include/buf0buf.ic | 17 | ||||
-rw-r--r-- | storage/innobase/page/page0zip.cc | 3 |
4 files changed, 4 insertions, 29 deletions
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc index 8738d5ecbdf..a5dbca03ad1 100644 --- a/storage/innobase/btr/btr0btr.cc +++ b/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); diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h index 997b471f52b..a8a37dfd0a2 100644 --- a/storage/innobase/include/buf0buf.h +++ b/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 diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index 15869e9ed0c..59672dc3295 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/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 diff --git a/storage/innobase/page/page0zip.cc b/storage/innobase/page/page0zip.cc index 37cf73f6831..9de8eadca1b 100644 --- a/storage/innobase/page/page0zip.cc +++ b/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 */ |