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

MDEV-31309 Innodb_buffer_pool_read_requests is not updated correctly

srv_export_innodb_status(): Update
export_vars.innodb_buffer_pool_read_requests as it was done
before commit a55b951e (MDEV-26827).
If innodb_status_variables[] pointed to a sharded variable, it would
only access the first shard.
parent df524dc0
......@@ -946,7 +946,8 @@ static SHOW_VAR innodb_status_variables[]= {
{"buffer_pool_read_ahead", &buf_pool.stat.n_ra_pages_read, SHOW_SIZE_T},
{"buffer_pool_read_ahead_evicted",
&buf_pool.stat.n_ra_pages_evicted, SHOW_SIZE_T},
{"buffer_pool_read_requests", &buf_pool.stat.n_page_gets, SHOW_SIZE_T},
{"buffer_pool_read_requests",
&export_vars.innodb_buffer_pool_read_requests, SHOW_SIZE_T},
{"buffer_pool_reads", &buf_pool.stat.n_pages_read, SHOW_SIZE_T},
{"buffer_pool_wait_free", &buf_pool.stat.LRU_waits, SHOW_SIZE_T},
{"buffer_pool_write_requests",
......
......@@ -674,6 +674,8 @@ struct export_var_t{
#ifdef UNIV_DEBUG
ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */
#endif /* UNIV_DEBUG */
/** buf_pool.stat.n_page_gets (a sharded counter) */
ulint innodb_buffer_pool_read_requests;
ulint innodb_buffer_pool_write_requests;/*!< srv_stats.buf_pool_write_requests */
ulint innodb_checkpoint_age;
ulint innodb_checkpoint_max_age;
......
......@@ -1011,6 +1011,9 @@ srv_export_innodb_status(void)
export_vars.innodb_data_written = srv_stats.data_written
+ (dblwr << srv_page_size_shift);
export_vars.innodb_buffer_pool_read_requests
= buf_pool.stat.n_page_gets;
export_vars.innodb_buffer_pool_write_requests =
srv_stats.buf_pool_write_requests;
......
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