Bug #69770 P_S.HOSTS table shows NULL hosts for unauthenticated client connections
Submitted: 17 Jul 2013 22:57 Modified: 26 Sep 2013 19:15
Reporter: Todd Farmer (OCA) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.6.12 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[17 Jul 2013 22:57] Todd Farmer
Following up on Bug#69761, it was discovered that the HOSTS table shows not only hosts from which clients connected, but also internal threads (those with NULL hosts).  Further testing indicates that the entries with NULL host values also represent client connections for which do not complete the auth process (examples include both incomplete auth exchange and auth failure due to bad password).  It's not clear why client connections which fail to authenticate properly show as NULL hosts; the host has been established and could (should) be recorded as such.

How to repeat:
1. SELECT * FROM performance_schema.hosts;
2. try to connect a second client with bad credentials
3. SELECT * FROM performance_schema.hosts;
4. Note that the row for host = NULL has incremented, while no other row has.

Suggested fix:
Record the correct non-NULL value for HOST when it is known, regardless of connection state.
[26 Sep 2013 19:15] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

The Performance Schema also counts threads for internal threads and
user sessions that failed to authenticate. These are counted in rows
with USER and HOST column values of NULL.