diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-28 09:56:46 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-12-28 09:56:46 +0200 |
commit | 0e11d96a84f1545f238fa92a7e44c2a7398ac304 (patch) | |
tree | 02d522b1eef59005108ad7be7cf9ee3826571526 /storage/innobase/include/buf0buf.ic | |
parent | aa4e8dfdf9fb7b4cd516957c5171fa27bdd8d65f (diff) | |
download | mariadb-git-0e11d96a84f1545f238fa92a7e44c2a7398ac304.tar.gz |
MDEV-17441: Pointer indirection for buf_block_t::debug_latch
This is a follow-up to commit 9581c4a8f5d6c87a6d34c6d3b826c32bf7f15143
which added a memcpy() call to rtr_copy_buf(), to copy
rw_lock_t debug_latch. This could emit a warning.
A cleaner approach is to make buf_block_t::debug_latch a pointer,
so that we can avoid copying it. An even cleaner approach would be to
redesign the InnoDB SPATIAL INDEX code so that the function
rtr_copy_buf() is not needed at all.
Diffstat (limited to 'storage/innobase/include/buf0buf.ic')
-rw-r--r-- | storage/innobase/include/buf0buf.ic | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index 21f6ed0c71f..0908a7cf574 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -985,7 +985,7 @@ buf_block_buf_fix_inc_func( threaded. */ if (!fsp_is_system_temporary(block->page.id.space())) { ibool ret; - ret = rw_lock_s_lock_nowait(&block->debug_latch, file, line); + ret = rw_lock_s_lock_nowait(block->debug_latch, file, line); ut_a(ret); } #endif /* UNIV_DEBUG */ @@ -1033,7 +1033,7 @@ buf_block_buf_fix_dec( Debug latch is not of much help if access to block is single threaded. */ if (!fsp_is_system_temporary(block->page.id.space())) { - rw_lock_s_unlock(&block->debug_latch); + rw_lock_s_unlock(block->debug_latch); } #endif /* UNIV_DEBUG */ } @@ -1276,7 +1276,7 @@ buf_page_release_zip( is single threaded. */ buf_block_t* block = reinterpret_cast<buf_block_t*>(bpage); if (!fsp_is_system_temporary(block->page.id.space())) { - rw_lock_s_unlock(&block->debug_latch); + rw_lock_s_unlock(block->debug_latch); } } #endif /* UNIV_DEBUG */ @@ -1312,7 +1312,7 @@ buf_page_release_latch( temporary. Debug latch is not of much help if access to block is single threaded. */ if (!fsp_is_system_temporary(block->page.id.space())) { - rw_lock_s_unlock(&block->debug_latch); + rw_lock_s_unlock(block->debug_latch); } #endif /* UNIV_DEBUG */ |