Skip to content

Commit

Permalink
MDEV-21212 fixup: GCC -Wclass-memaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed Mar 12, 2021
1 parent 8d4e3ec commit 3dfda08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion storage/innobase/buf/buf0buf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3897,8 +3897,8 @@ void buf_pool_invalidate()
buf_pool.freed_page_clock = 0;
buf_pool.LRU_old = NULL;
buf_pool.LRU_old_len = 0;
buf_pool.stat.init();

memset(&buf_pool.stat, 0x00, sizeof(buf_pool.stat));
buf_refresh_io_stats();
mysql_mutex_unlock(&buf_pool.mutex);
}
Expand Down
3 changes: 3 additions & 0 deletions storage/innobase/include/buf0buf.h
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,9 @@ struct buf_buddy_free_t {

/** @brief The buffer pool statistics structure. */
struct buf_pool_stat_t{
/** Initialize the counters */
void init() { memset((void*) this, 0, sizeof *this); }

ib_counter_t<ulint> n_page_gets;
/*!< number of page gets performed;
also successful searches through
Expand Down

0 comments on commit 3dfda08

Please sign in to comment.