Bug #77201 host_cache doesn't refresh
Submitted: 31 May 2015 12:27 Modified: 1 Jul 2015 4:41
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S4 (Feature request)
Version:5.7.7-rc OS:Any
Assigned to: Marc ALFF CPU Architecture:Any
Tags: Contribution, host_cache

[31 May 2015 12:27] Daniël van Eeden
Description:
The host_cache doesn't check if entries get outdated. This requires a manual FLUSH HOSTS

How to repeat:
Make sure a entries gets into the host cache and then use /etc/hosts to change the hostname for that IP address. This change is not reflected in performanc_schema.host_cache until after a flush hosts.

Suggested fix:
Periodically check the host_cache for changed entries.

Alternative method: Store entries for $TTL seconds and then force a refresh.
[31 May 2015 12:32] Daniël van Eeden
See also: https://github.com/mysql/mysql-server/pull/9
[2 Jun 2015 15:53] OCA Admin
Contribution submitted via Github - Initial version of hostclean 
(*) Contribution by Daniël van Eeden (Github dveeden, mysql-server/pull/9#issuecomment-107830763): 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_36581422.txt (text/plain), 3.76 KiB.

[1 Jul 2015 4:41] MySQL Verification Team
Hello Daniël,

Thank you for the feature report and contribution.

Thanks,
Umesh