MDEV-21212 fixup: GCC -Wclass-memaccess

This commit is contained in:
Marko Mäkelä 2021-03-12 14:09:39 +02:00
commit 3dfda08702
2 changed files with 4 additions and 1 deletions

View file

@ -3897,8 +3897,8 @@ void buf_pool_invalidate()
buf_pool.freed_page_clock = 0; buf_pool.freed_page_clock = 0;
buf_pool.LRU_old = NULL; buf_pool.LRU_old = NULL;
buf_pool.LRU_old_len = 0; buf_pool.LRU_old_len = 0;
buf_pool.stat.init();
memset(&buf_pool.stat, 0x00, sizeof(buf_pool.stat));
buf_refresh_io_stats(); buf_refresh_io_stats();
mysql_mutex_unlock(&buf_pool.mutex); mysql_mutex_unlock(&buf_pool.mutex);
} }

View file

@ -1220,6 +1220,9 @@ struct buf_buddy_free_t {
/** @brief The buffer pool statistics structure. */ /** @brief The buffer pool statistics structure. */
struct buf_pool_stat_t{ struct buf_pool_stat_t{
/** Initialize the counters */
void init() { memset((void*) this, 0, sizeof *this); }
ib_counter_t<ulint> n_page_gets; ib_counter_t<ulint> n_page_gets;
/*!< number of page gets performed; /*!< number of page gets performed;
also successful searches through also successful searches through