Bug #80833 Incorrect calculation for pages_hashed, pages_old
Submitted: 23 Mar 2016 8:49 Modified: 30 Jun 2016 17:10
Reporter: Tsubasa Tanaka (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: SYS Schema Severity:S3 (Non-critical)
Version:5.7.11 OS:Any
Assigned to: CPU Architecture:Any
Tags: innodb_buffer_stats_by_schema, innodb_buffer_stats_by_table, pages_hashed, pages_old, sys

[23 Mar 2016 8:49] Tsubasa Tanaka
Description:
sys.innodb_buffer_stats_by_table has `pages_hashed` and `pages_old` column, but they return always a value as same as `pages` column.

How to repeat:
SELECT * FROM sys.innodb_buffer_stats_by_table WHERE pages <> pages_old;

The query returns empty-set even if Buffer Pool doesn't have any old page.
[23 Mar 2016 8:52] Tsubasa Tanaka
Suggested Fix

See Pull-Request which I have sent, https://github.com/mysql/mysql-sys/pull/102
[23 Mar 2016 8:55] Tsubasa Tanaka
Does mysql/mysql-sys support the contribution by Pull-Request? (I think mysql/mysql-server does. Bot asked about OCA but mysql/mysql-sys doesn't)

May I attach it as plain patch file?
[23 Mar 2016 10:07] MySQL Verification Team
Hello Tanaka-San,

Thank you for the report and contribution.
I think contribution should have been pulled from github, alternatively you can attach the patch through Contributions tab.

Thanks,
Umesh
[23 Mar 2016 10:35] Tsubasa Tanaka
Hi Umesh-san,

Thank you for your confirmation and suggestion.
I put my patch via "Contributions" tab too as proof of I agree OCA.
[23 Mar 2016 10:36] Tsubasa Tanaka
This is same patch as https://github.com/mysql/mysql-sys/pull/102

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug80833.patch (application/octet-stream, text), 3.62 KiB.

[28 Apr 2016 14:40] OCA Admin
Contribution submitted via Github - Fix Bug#80833 
(*) Contribution by tsubasa tanaka (Github yoku0825, mysql-sys/pull/102#issuecomment-215270736): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_63848448.txt (text/plain), 4.18 KiB.

[30 Jun 2016 17:10] Paul DuBois
Posted by developer:
 
Noted in 5.7.14 changelog.

For the innodb_buffer_stats_by_schema and
innodb_buffer_stats_by_table sys schema views, the pages_hashed and
pages_old columns were incorrect. Thanks to Tsubasa Tanaka for the
patch.