Commit c2a92918 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-17491 post-fix: GCC 7 -Wclass-memaccess

commit 3a37644a added a non-POD
member buf_page_info_t::id, and thus GCC 7 or later would complain
about a memset() call. Let my_malloc fill the memory for us.
parent d72594d4
...@@ -4612,15 +4612,13 @@ static int i_s_innodb_fill_buffer_lru(THD *thd, TABLE_LIST *tables, Item *) ...@@ -4612,15 +4612,13 @@ static int i_s_innodb_fill_buffer_lru(THD *thd, TABLE_LIST *tables, Item *)
/* Print error message if malloc fail */ /* Print error message if malloc fail */
info_buffer = (buf_page_info_t*) my_malloc(PSI_INSTRUMENT_ME, info_buffer = (buf_page_info_t*) my_malloc(PSI_INSTRUMENT_ME,
lru_len * sizeof *info_buffer, MYF(MY_WME)); lru_len * sizeof *info_buffer, MYF(MY_WME | MY_ZEROFILL));;
if (!info_buffer) { if (!info_buffer) {
status = 1; status = 1;
goto exit; goto exit;
} }
memset(info_buffer, 0, lru_len * sizeof *info_buffer);
/* Walk through Pool's LRU list and print the buffer page /* Walk through Pool's LRU list and print the buffer page
information */ information */
bpage = UT_LIST_GET_LAST(buf_pool.LRU); bpage = UT_LIST_GET_LAST(buf_pool.LRU);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment