Description:
The buf_print_io() function in 5.1 and buf_print_io_instance() in 5.5 and 5.6 (http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/storage/innobase/buf/buf0bu...) are used prominently by SHOW INNODB STATUS to show data about the buffer cache. For example:
Pages made young 764892283, not young 12854192
8.99 youngs/s, 48.95 non-youngs/s
The line "8.99 youngs/s, 48.95 non-youngs/s" would appear to be 8.99 young *per second*. But that does not seem to be the case in the implementation.
In buf_stats_get_pool_info():
pool_info->page_not_made_young_rate =
(buf_pool->stat.n_pages_not_made_young
- buf_pool->old_stat.n_pages_not_made_young) / time_elapsed;
And time_elapsed is:
time_elapsed = 0.001 + difftime(current_time,
buf_pool->last_printout_time);
which appears to be based on the last_printout_time — implying that the time_elapsed will change depending on the last_printout_time, and therefore meaning that the rate printed out in the status reports depends on the last access time. Displaying the date as "/s" then is not accurate.
General MySQL documentation in source and on the web manuals does not mention the use of time_elapsed or the fact the nature of this rate will change depending on it.
How to repeat:
View output of SHOW INNODB STATUS, read code, compare with documentation and stat description.
Suggested fix:
Improve wording to reflect the actual implementation. Update documentation to mention the the use of time_elapsed. Alternatively, change the implementation to use a constant per-second rate.