List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 20 2012 11:58am
Subject:bzr push into mysql-trunk-wl5259 branch (marc.alff:3356 to 3357)
View as plain text  
 3357 Marc Alff	2012-01-20
      Added time columns

    modified:
      mysql-test/suite/perfschema/include/hostcache_dump.inc
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_peer_addr.result
      scripts/mysql_system_tables.sql
      sql/hostname.cc
      sql/hostname.h
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_engine_table.h
      storage/perfschema/table_host_cache.cc
      storage/perfschema/table_host_cache.h
 3356 Marc Alff	2012-01-20
      Fixed windows XP build breaks

    modified:
      sql/hostname.cc
      sql/sql_connect.cc
=== modified file 'mysql-test/suite/perfschema/include/hostcache_dump.inc'
--- a/mysql-test/suite/perfschema/include/hostcache_dump.inc	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/include/hostcache_dump.inc	2012-01-20 11:57:26 +0000
@@ -2,6 +2,22 @@
 
 show global status like "%peer%";
 --vertical_results
-select * from performance_schema.host_cache;
+select 
+  IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+  COUNT_NAMEINFO_TRANSIENT_ERRORS,
+  COUNT_NAMEINFO_PERMANENT_ERRORS,
+  COUNT_FORMAT_ERRORS,
+  COUNT_ADDRINFO_TRANSIENT_ERRORS,
+  COUNT_ADDRINFO_PERMANENT_ERRORS,
+  COUNT_FCRDNS_ERRORS,
+  COUNT_HOST_ACL_ERRORS,
+  COUNT_HANDSHAKE_ERRORS,
+  COUNT_AUTHENTICATION_ERRORS,
+  COUNT_USER_ACL_ERRORS,
+  COUNT_LOCAL_ERRORS,
+  COUNT_UNKNOWN_ERRORS,
+  if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+  if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+  from performance_schema.host_cache;
 --horizontal_results
 

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result	2012-01-20 11:57:26 +0000
@@ -19,7 +19,23 @@ ERROR HY000: Host '192.0.2.4' is not all
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -36,11 +52,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -57,6 +91,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
 drop user 'root'@'santa.claus.ipv4.example.com';
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '192.0.2.4' is not all
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result	2012-01-20 11:57:26 +0000
@@ -24,7 +24,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -41,6 +57,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 select "Con3 is alive";
 Con3 is alive
 Con3 is alive
@@ -50,7 +68,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -67,6 +101,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 revoke select on test.* from 'root'@'192.0.2.4';
 drop user 'root'@'192.0.2.4';
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '192.0.2.4' is not all
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result	2012-01-20 11:57:26 +0000
@@ -24,7 +24,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -41,6 +57,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	null
+LAST_ERROR_SEEN	null
 select "Con3 is alive";
 Con3 is alive
 Con3 is alive
@@ -50,7 +68,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -67,6 +101,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	null
+LAST_ERROR_SEEN	null
 revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
 drop user 'root'@'santa.claus.ipv4.example.com';
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host 'santa.claus.ipv4.exam
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result	2012-01-20 11:57:26 +0000
@@ -25,7 +25,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -42,6 +58,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 select "Con3 is alive";
 Con3 is alive
 Con3 is alive
@@ -51,7 +69,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -68,6 +102,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
 revoke select on test.* from 'root'@'192.0.2.4';
 drop user 'root'@'santa.claus.ipv4.example.com';

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '192.0.2.4' is not all
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_format.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '192.0.2.4' is not all
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result	2012-01-20 11:57:26 +0000
@@ -25,7 +25,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -42,6 +58,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 select "Con3 is alive";
 Con3 is alive
 Con3 is alive
@@ -51,7 +69,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -68,6 +102,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
 select "Con4 is alive";
 Con4 is alive
@@ -78,7 +114,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -95,6 +147,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 select "Con5 is alive";
 Con5 is alive
 Con5 is alive
@@ -104,7 +158,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -121,6 +191,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 revoke select on test.* from 'root'@'192.0.2.4';
 revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
 drop user 'root'@'192.0.2.4';

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '192.0.2.4' is not all
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	NO
@@ -56,12 +90,30 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
 ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -78,11 +130,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	santa.claus.ipv4.example.com
 HOST_VALIDATED	YES
@@ -99,4 +169,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result	2012-01-20 11:57:26 +0000
@@ -24,7 +24,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -41,6 +57,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 select "Con3 is alive";
 Con3 is alive
 Con3 is alive
@@ -50,7 +68,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -67,6 +101,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 revoke select on test.* from 'root'@'192.0.2.4';
 drop user 'root'@'192.0.2.4';
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '192.0.2.4' is not all
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	192.0.2.4
 HOST	NULL
 HOST_VALIDATED	YES
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '2001:db8::6:6' is not
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	NO
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	NO
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '2001:db8::6:6' is not
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	YES
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	YES
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result	2012-01-17 08:31:24 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result	2012-01-20 11:57:26 +0000
@@ -24,7 +24,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	santa.claus.ipv6.example.com
 HOST_VALIDATED	YES
@@ -41,6 +57,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	null
+LAST_ERROR_SEEN	null
 select "Con3 is alive";
 Con3 is alive
 Con3 is alive
@@ -50,7 +68,23 @@ root@stripped
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	santa.claus.ipv6.example.com
 HOST_VALIDATED	YES
@@ -67,6 +101,8 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	null
+LAST_ERROR_SEEN	null
 revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
 drop user 'root'@'santa.claus.ipv6.example.com';
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result	2012-01-20 11:57:26 +0000
@@ -17,7 +17,23 @@ ERROR HY000: Host 'santa.claus.ipv6.exam
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	santa.claus.ipv6.example.com
 HOST_VALIDATED	YES
@@ -34,11 +50,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	santa.claus.ipv6.example.com
 HOST_VALIDATED	YES
@@ -55,4 +89,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '2001:db8::6:6' is not
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	YES
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	YES
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '2001:db8::6:6' is not
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	NO
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	NO
@@ -56,12 +90,30 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
 ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	santa.claus.ipv6.example.com
 HOST_VALIDATED	YES
@@ -78,11 +130,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	santa.claus.ipv6.example.com
 HOST_VALIDATED	YES
@@ -99,4 +169,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result	2012-01-20 11:57:26 +0000
@@ -18,7 +18,23 @@ ERROR HY000: Host '2001:db8::6:6' is not
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	YES
@@ -35,11 +51,29 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	0
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 IP	2001:db8::6:6
 HOST	NULL
 HOST_VALIDATED	YES
@@ -56,4 +90,6 @@ COUNT_AUTHENTICATION_ERRORS	0
 COUNT_USER_ACL_ERRORS	0
 COUNT_LOCAL_ERRORS	0
 COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
 set global debug= default;

=== modified file 'mysql-test/suite/perfschema/r/hostcache_peer_addr.result'
--- a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result	2012-01-20 11:57:26 +0000
@@ -17,12 +17,44 @@ ERROR HY000: Can't get hostname for your
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	1
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 ERROR HY000: Can't get hostname for your address
 show global status like "%peer%";
 Variable_name	Value
 Peer_address_errors	2
-select * from performance_schema.host_cache;
+select 
+IP, HOST, HOST_VALIDATED, SUM_BLOCKING_ERRORS,
+COUNT_NAMEINFO_TRANSIENT_ERRORS,
+COUNT_NAMEINFO_PERMANENT_ERRORS,
+COUNT_FORMAT_ERRORS,
+COUNT_ADDRINFO_TRANSIENT_ERRORS,
+COUNT_ADDRINFO_PERMANENT_ERRORS,
+COUNT_FCRDNS_ERRORS,
+COUNT_HOST_ACL_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_USER_ACL_ERRORS,
+COUNT_LOCAL_ERRORS,
+COUNT_UNKNOWN_ERRORS,
+if (FIRST_ERROR_SEEN is not null, "set", "null") as FIRST_ERROR_SEEN,
+if (LAST_ERROR_SEEN is not null, "set", "null") as LAST_ERROR_SEEN
+from performance_schema.host_cache;
 set global debug= default;
 flush status;
 show global status like "%peer%";

=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2012-01-17 14:44:32 +0000
+++ b/scripts/mysql_system_tables.sql	2012-01-20 11:57:26 +0000
@@ -623,7 +623,11 @@ SET @cmd="CREATE TABLE performance_schem
   "COUNT_AUTHENTICATION_ERRORS BIGINT not null,"
   "COUNT_USER_ACL_ERRORS BIGINT not null,"
   "COUNT_LOCAL_ERRORS BIGINT not null,"
-  "COUNT_UNKNOWN_ERRORS BIGINT not null"
+  "COUNT_UNKNOWN_ERRORS BIGINT not null,"
+  "FIRST_SEEN TIMESTAMP(6) default 0,"
+  "LAST_SEEN TIMESTAMP(6) default 0,"
+  "FIRST_ERROR_SEEN TIMESTAMP(6) null default 0,"
+  "LAST_ERROR_SEEN TIMESTAMP(6) null default 0"
   ")ENGINE=PERFORMANCE_SCHEMA;";
 
 SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0');

=== modified file 'sql/hostname.cc'
--- a/sql/hostname.cc	2012-01-20 08:32:13 +0000
+++ b/sql/hostname.cc	2012-01-20 11:57:26 +0000
@@ -168,7 +168,8 @@ static inline Host_entry *hostname_cache
 }
 
 static void add_hostname_impl(const char *ip_key, const char *hostname,
-                              bool validated, Host_errors *errors)
+                              bool validated, Host_errors *errors,
+                              ulonglong now)
 {
   Host_entry *entry;
   bool need_add= false;
@@ -186,6 +187,14 @@ static void add_hostname_impl(const char
     entry->m_errors.reset();
     entry->m_hostname_length= 0;
     entry->m_host_validated= false;
+    entry->m_first_seen= now;
+    entry->m_last_seen= now;
+    entry->m_first_error_seen= 0;
+    entry->m_last_error_seen= 0;
+  }
+  else
+  {
+    entry->m_last_seen= now;
   }
 
   if (validated)
@@ -232,6 +241,9 @@ static void add_hostname_impl(const char
                (const char *) ip_key));
   }
 
+  if (errors->has_error())
+    entry->set_error_timestamps(now);
+
   entry->m_errors.aggregate(errors);
 
   if (need_add)
@@ -246,9 +258,11 @@ static void add_hostname(const char *ip_
   if (specialflag & SPECIAL_NO_HOST_CACHE)
     return;
 
+  ulonglong now= my_micro_time();
+
   mysql_mutex_lock(&hostname_cache->lock);
 
-  add_hostname_impl(ip_key, hostname, validated, errors);
+  add_hostname_impl(ip_key, hostname, validated, errors, now);
 
   mysql_mutex_unlock(&hostname_cache->lock);
 
@@ -260,6 +274,7 @@ void inc_host_errors(const char *ip_stri
   if (!ip_string)
     return;
 
+  ulonglong now= my_micro_time();
   char ip_key[HOST_ENTRY_KEY_SIZE];
   prepare_hostname_cache_key(ip_string, ip_key);
 
@@ -268,7 +283,10 @@ void inc_host_errors(const char *ip_stri
   Host_entry *entry= hostname_cache_search(ip_key);
 
   if (entry)
+  {
     entry->m_errors.aggregate(errors);
+    entry->set_error_timestamps(now);
+  }
 
   mysql_mutex_unlock(&hostname_cache->lock);
 }

=== modified file 'sql/hostname.h'
--- a/sql/hostname.h	2012-01-17 13:48:50 +0000
+++ b/sql/hostname.h	2012-01-20 11:57:26 +0000
@@ -58,6 +58,22 @@ public:
   uint m_local_errors;
   /** Number of unknown errors. */
   uint m_unknown_errors;
+
+  bool has_error() const
+  {
+    return ((m_nameinfo_transient_errors != 0)
+      || (m_nameinfo_permanent_errors != 0)
+      || (m_format_errors != 0)
+      || (m_addrinfo_transient_errors != 0)
+      || (m_addrinfo_permanent_errors != 0)
+      || (m_FCrDNS_errors != 0)
+      || (m_host_acl_errors != 0)
+      || (m_handshake_errors != 0)
+      || (m_authentication_errors != 0)
+      || (m_user_acl_errors != 0)
+      || (m_local_errors != 0)
+      || (m_unknown_errors != 0));
+  }
 };
 
 /** Size of IP address string in the hash cache. */
@@ -97,8 +113,19 @@ public:
   uint m_hostname_length;
   /** The hostname is validated and used for authorization. */
   bool m_host_validated;
+  ulonglong m_first_seen;
+  ulonglong m_last_seen;
+  ulonglong m_first_error_seen;
+  ulonglong m_last_error_seen;
   /** Error statistics. */
   Host_errors m_errors;
+
+  void set_error_timestamps(ulonglong now)
+  {
+    if (m_first_error_seen == 0)
+      m_first_error_seen= now;
+    m_last_error_seen= now;
+  }
 };
 
 /** The size of the host_cache. */

=== modified file 'storage/perfschema/pfs_engine_table.cc'
--- a/storage/perfschema/pfs_engine_table.cc	2012-01-10 21:02:53 +0000
+++ b/storage/perfschema/pfs_engine_table.cc	2012-01-20 11:57:26 +0000
@@ -493,6 +493,16 @@ void PFS_engine_table::set_field_enum(Fi
   f2->store_type(value);
 }
 
+void PFS_engine_table::set_field_timestamp(Field *f, ulonglong value)
+{
+  struct timeval tm;
+  tm.tv_sec= (long) value / 1000000;
+  tm.tv_usec= (long) value % 1000000;
+  DBUG_ASSERT(f->real_type() == MYSQL_TYPE_TIMESTAMP2);
+  Field_timestampf *f2= (Field_timestampf*) f;
+  f2->store_timestamp(& tm);
+}
+
 ulonglong PFS_engine_table::get_field_enum(Field *f)
 {
   DBUG_ASSERT(f->real_type() == MYSQL_TYPE_ENUM);

=== modified file 'storage/perfschema/pfs_engine_table.h'
--- a/storage/perfschema/pfs_engine_table.h	2011-06-30 15:50:45 +0000
+++ b/storage/perfschema/pfs_engine_table.h	2012-01-20 11:57:26 +0000
@@ -112,6 +112,12 @@ public:
   */
   static void set_field_enum(Field *f, ulonglong value);
   /**
+    Helper, assign a value to a timestamp field.
+    @param f the field to set
+    @param value the value to assign
+  */
+  static void set_field_timestamp(Field *f, ulonglong value);
+  /**
     Helper, read a value from an enum field.
     @param f the field to read
     @return the field value

=== modified file 'storage/perfschema/table_host_cache.cc'
--- a/storage/perfschema/table_host_cache.cc	2012-01-17 14:44:32 +0000
+++ b/storage/perfschema/table_host_cache.cc	2012-01-20 11:57:26 +0000
@@ -106,12 +106,32 @@ static const TABLE_FIELD_TYPE field_type
     { C_STRING_WITH_LEN("COUNT_UNKNOWN_ERRORS") },
     { C_STRING_WITH_LEN("bigint(20)") },
     { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("FIRST_SEEN") },
+    { C_STRING_WITH_LEN("timestamp") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("LAST_SEEN") },
+    { C_STRING_WITH_LEN("timestamp") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("FIRST_ERROR_SEEN") },
+    { C_STRING_WITH_LEN("timestamp") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("LAST_ERROR_SEEN") },
+    { C_STRING_WITH_LEN("timestamp") },
+    { NULL, 0}
   }
 };
 
 TABLE_FIELD_DEF
 table_host_cache::m_field_def=
-{ 16, field_types };
+{ 20, field_types };
 
 PFS_engine_table_share
 table_host_cache::m_share=
@@ -226,6 +246,10 @@ void table_host_cache::make_row(Host_ent
   row->m_count_user_acl_errors= entry->m_errors.m_user_acl_errors;
   row->m_count_local_errors= entry->m_errors.m_local_errors;
   row->m_count_unknown_errors= entry->m_errors.m_unknown_errors;
+  row->m_first_seen= entry->m_first_seen;
+  row->m_last_seen= entry->m_last_seen;
+  row->m_first_error_seen= entry->m_first_error_seen;
+  row->m_last_error_seen= entry->m_last_error_seen;
 }
 
 void table_host_cache::reset_position(void)
@@ -333,6 +357,24 @@ int table_host_cache::read_row_values(TA
       case 15: /* COUNT_UNKNOWN_ERRORS */
         set_field_ulonglong(f, m_row->m_count_unknown_errors);
         break;
+      case 16: /* FIRST_SEEN */
+        set_field_timestamp(f, m_row->m_first_seen);
+        break;
+      case 17: /* LAST_SEEN */
+        set_field_timestamp(f, m_row->m_last_seen);
+        break;
+      case 18: /* FIRST_ERROR_SEEN */
+        if (m_row->m_first_error_seen != 0)
+          set_field_timestamp(f, m_row->m_first_error_seen);
+        else
+          f->set_null();
+        break;
+      case 19: /* LAST_ERROR_SEEN */
+        if (m_row->m_last_error_seen != 0)
+          set_field_timestamp(f, m_row->m_last_error_seen);
+        else
+          f->set_null();
+        break;
       default:
         DBUG_ASSERT(false);
       }

=== modified file 'storage/perfschema/table_host_cache.h'
--- a/storage/perfschema/table_host_cache.h	2012-01-17 14:44:32 +0000
+++ b/storage/perfschema/table_host_cache.h	2012-01-20 11:57:26 +0000
@@ -68,6 +68,14 @@ struct row_host_cache
   ulonglong m_count_local_errors;
   /** Column COUNT_UNKNOWN_ERRORS. */
   ulonglong m_count_unknown_errors;
+  /** Column FIRST_SEEN. */
+  ulonglong m_first_seen;
+  /** Column LAST_SEEN. */
+  ulonglong m_last_seen;
+  /** Column FIRST_ERROR_SEEN. */
+  ulonglong m_first_error_seen;
+  /** Column LAST_ERROR_SEEN. */
+  ulonglong m_last_error_seen;
 };
 
 /** Table PERFORMANCE_SCHEMA.HOST_CACHE. */

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5259 branch (marc.alff:3356 to 3357) Marc Alff21 Jan