List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 27 2012 12:15pm
Subject:bzr push into mysql-trunk-wl5259 branch (marc.alff:3361 to 3362)
View as plain text  
 3362 Marc Alff	2012-01-27
      Test cleanup

    removed:
      mysql-test/suite/perfschema/r/hostcache_ipv4_no_auth_plugin.result
      mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin-master.opt
      mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin.test
    added:
      mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
      mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin-master.opt
      mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test
    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/t/hostcache_ipv4_addrinfo_again_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_format.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test
      mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test
      mysql-test/suite/perfschema/t/hostcache_peer_addr.test
      sql/hostname.cc
      sql/hostname.h
      storage/perfschema/table_host_cache.cc
 3361 Marc Alff	2012-01-26 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5259

    added:
      mysql-test/suite/sys_vars/r/stored_program_cache_basic.result
      mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
    modified:
      mysql-test/include/order_by.inc
      mysql-test/include/wait_for_ndb_to_binlog.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/bigint.result
      mysql-test/r/date_formats.result
      mysql-test/r/func_in_icp.result
      mysql-test/r/func_in_icp_mrr.result
      mysql-test/r/func_in_mrr.result
      mysql-test/r/func_in_mrr_cost.result
      mysql-test/r/func_in_none.result
      mysql-test/r/func_str.result
      mysql-test/r/func_time.result
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/innodb_mrr.result
      mysql-test/r/innodb_mrr_cost.result
      mysql-test/r/innodb_mrr_cost_icp.result
      mysql-test/r/innodb_mrr_icp.result
      mysql-test/r/innodb_mrr_none.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/temporal_literal.result
      mysql-test/r/type_date.result
      mysql-test/r/type_temporal_fractional.result
      mysql-test/r/type_temporal_upgrade.result
      mysql-test/r/type_time.result
      mysql-test/r/view.result
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
      mysql-test/suite/sys_vars/r/innodb_undo_logs_basic.result
      mysql-test/suite/sys_vars/t/innodb_undo_logs_basic.test
      mysql-test/t/bigint.test
      mysql-test/t/date_formats.test
      mysql-test/t/func_str.test
      mysql-test/t/func_time.test
      mysql-test/t/mysql_embedded.test
      mysql-test/t/temp_table.test
      mysql-test/t/temporal_literal.test
      mysql-test/t/type_date.test
      mysql-test/t/type_temporal_fractional.test
      mysql-test/t/type_temporal_upgrade.test
      mysql-test/t/type_time.test
      mysql-test/t/view.test
      sql/debug_sync.cc
      sql/item.cc
      sql/item_cmpfunc.cc
      sql/item_timefunc.cc
      sql/mysqld.cc
      sql/mysqld.h
      sql/opt_range.cc
      sql/records.cc
      sql/sp_cache.cc
      sql/sp_cache.h
      sql/sql_executor.cc
      sql/sql_parse.cc
      sql/sql_prepare.cc
      sql/sql_select.cc
      sql/sql_tmp_table.cc
      sql/sql_view.cc
      sql/sys_vars.cc
      storage/innobase/btr/btr0cur.cc
      storage/innobase/buf/buf0dblwr.cc
      storage/innobase/buf/buf0flu.cc
      storage/innobase/data/data0data.cc
      storage/innobase/dict/dict0stats.cc
      storage/innobase/fts/fts0fts.cc
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/buf0flu.h
      storage/innobase/include/data0data.h
      storage/innobase/include/data0data.ic
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_engine_table.h
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/pfs_server.cc
      storage/perfschema/table_esgs_by_account_by_event_name.cc
      storage/perfschema/table_esgs_by_account_by_event_name.h
      storage/perfschema/table_esgs_by_host_by_event_name.cc
      storage/perfschema/table_esgs_by_host_by_event_name.h
      storage/perfschema/table_esgs_by_thread_by_event_name.cc
      storage/perfschema/table_esgs_by_thread_by_event_name.h
      storage/perfschema/table_esgs_by_user_by_event_name.cc
      storage/perfschema/table_esgs_by_user_by_event_name.h
      storage/perfschema/table_esgs_global_by_event_name.cc
      storage/perfschema/table_esgs_global_by_event_name.h
      storage/perfschema/table_esms_by_account_by_event_name.cc
      storage/perfschema/table_esms_by_account_by_event_name.h
      storage/perfschema/table_esms_by_host_by_event_name.cc
      storage/perfschema/table_esms_by_host_by_event_name.h
      storage/perfschema/table_esms_by_thread_by_event_name.cc
      storage/perfschema/table_esms_by_thread_by_event_name.h
      storage/perfschema/table_esms_by_user_by_event_name.cc
      storage/perfschema/table_esms_by_user_by_event_name.h
      storage/perfschema/table_esms_global_by_event_name.cc
      storage/perfschema/table_esms_global_by_event_name.h
      storage/perfschema/table_events_stages.cc
      storage/perfschema/table_events_stages.h
      storage/perfschema/table_events_statements.cc
      storage/perfschema/table_events_statements.h
      storage/perfschema/table_events_waits.cc
      storage/perfschema/table_events_waits_summary.cc
      storage/perfschema/table_ews_by_account_by_event_name.cc
      storage/perfschema/table_ews_by_host_by_event_name.cc
      storage/perfschema/table_ews_by_thread_by_event_name.cc
      storage/perfschema/table_ews_by_user_by_event_name.cc
      storage/perfschema/table_ews_global_by_event_name.cc
      storage/perfschema/table_tiws_by_index_usage.cc
      storage/perfschema/table_tiws_by_index_usage.h
      storage/perfschema/table_tiws_by_table.cc
      storage/perfschema/table_tiws_by_table.h
      storage/perfschema/table_tlws_by_table.cc
      storage/perfschema/table_tlws_by_table.h
      strings/dtoa.c
=== modified file 'mysql-test/suite/perfschema/include/hostcache_dump.inc'
--- a/mysql-test/suite/perfschema/include/hostcache_dump.inc	2012-01-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/include/hostcache_dump.inc	2012-01-27 12:14:54 +0000
@@ -1,6 +1,5 @@
 # Helper for hostcache_*.test
 
-show global status like "%peer%";
 --vertical_results
 select 
   IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result	2012-01-27 12:14:54 +0000
@@ -16,9 +16,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -73,9 +70,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result	2012-01-27 12:14:54 +0000
@@ -21,9 +21,6 @@ Con2 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -83,9 +80,6 @@ Con3 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result	2012-01-27 12:14:54 +0000
@@ -21,9 +21,6 @@ Con2 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -83,9 +80,6 @@ Con3 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result	2012-01-27 12:14:54 +0000
@@ -22,9 +22,6 @@ Con2 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -84,9 +81,6 @@ Con3 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== added file 'mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result	2012-01-27 12:14:54 +0000
@@ -0,0 +1,309 @@
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+show global status like "%peer%";
+Variable_name	Value
+Peer_address_errors	0
+CREATE USER 'plug'@'santa.claus.ipv4.example.com'
+  IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
+CREATE USER 'plug_dest'@'santa.claus.ipv4.example.com'
+  IDENTIFIED BY 'plug_test_passwd';
+GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv4.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+uninstall plugin test_plugin_server;
+ERROR HY000: Plugin 'test_plugin_server' is not loaded
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	1
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	1
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_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: Plugin 'test_plugin_server' is not loaded
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	2
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	2
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+install plugin test_plugin_server soname 'auth_test_plugin.so';
+ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	2
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	1
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	2
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	2
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	2
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	2
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+GRANT PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
+  TO 'plug'@'santa.claus.ipv4.example.com';
+select "Con4 is alive";
+Con4 is alive
+Con4 is alive
+select user();
+user()
+plug@stripped
+select current_user();
+current_user()
+plug_dest@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	2
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	2
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	2
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+REVOKE ALL PRIVILEGES ON *.* FROM 'plug_dest'@'santa.claus.ipv4.example.com';
+REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
+  FROM 'plug'@'santa.claus.ipv4.example.com';
+DROP USER 'plug'@'santa.claus.ipv4.example.com';
+DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
+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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== added file 'mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result	2012-01-27 12:14:54 +0000
@@ -0,0 +1,1123 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select @@global.max_connections into @saved_max_connections;
+show global status like "%peer%";
+Variable_name	Value
+Peer_address_errors	0
+create user 'quota'@'santa.claus.ipv4.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_connections_per_hour 3;
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+select "Con2a is alive";
+Con2a is alive
+Con2a is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	null
+LAST_ERROR_SEEN	null
+select "Con2b is alive";
+Con2b is alive
+Con2b is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	null
+LAST_ERROR_SEEN	null
+select "Con2c is alive";
+Con2c is alive
+Con2c is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	null
+LAST_ERROR_SEEN	null
+ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	1
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_connections_per_hour 0;
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_user_connections 3;
+flush user_resources;
+select "Con7 is alive";
+Con7 is alive
+Con7 is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+select "Con3b is alive";
+Con3b is alive
+Con3b is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+select "Con3c is alive";
+Con3c is alive
+Con3c is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	0
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	1
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	2
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_user_connections 0;
+flush user_resources;
+set global max_user_connections = 3;
+select "Con4a is alive";
+Con4a is alive
+Con4a is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	2
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+select "Con4b is alive";
+Con4b is alive
+Con4b is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	2
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+select "Con4c is alive";
+Con4c is alive
+Con4c is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	2
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 42000: User quota already has more than 'max_user_connections' active connections
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	3
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 42000: User quota already has more than 'max_user_connections' active connections
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	4
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_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 max_user_connections = 0;
+set global max_connections = 3;
+select "Con4a is alive";
+Con4a is alive
+Con4a is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	4
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+select "Con5b is alive";
+Con5b is alive
+Con5b is alive
+select current_user();
+current_user()
+quota@stripped
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	4
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	0
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 08004: Too many connections
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	4
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	1
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+ERROR 08004: Too many connections
+select 
+IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
+COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
+COUNT_AUTH_PLUGIN_ERRORS,
+COUNT_HANDSHAKE_ERRORS,
+COUNT_PROXY_USER_ERRORS,
+COUNT_PROXY_USER_ACL_ERRORS,
+COUNT_AUTHENTICATION_ERRORS,
+COUNT_SSL_ERRORS,
+COUNT_MAX_USER_CONNECTION_ERRORS,
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
+COUNT_MAX_CONNECTION_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
+SUM_CONNECT_ERRORS	0
+COUNT_HOST_BLOCKED_ERRORS	0
+COUNT_NAMEINFO_TRANSIENT_ERRORS	0
+COUNT_NAMEINFO_PERMANENT_ERRORS	0
+COUNT_FORMAT_ERRORS	0
+COUNT_ADDRINFO_TRANSIENT_ERRORS	0
+COUNT_ADDRINFO_PERMANENT_ERRORS	0
+COUNT_FCRDNS_ERRORS	0
+COUNT_HOST_ACL_ERRORS	0
+COUNT_NO_AUTH_PLUGIN_ERRORS	0
+COUNT_AUTH_PLUGIN_ERRORS	0
+COUNT_HANDSHAKE_ERRORS	0
+COUNT_PROXY_USER_ERRORS	0
+COUNT_PROXY_USER_ACL_ERRORS	0
+COUNT_AUTHENTICATION_ERRORS	0
+COUNT_SSL_ERRORS	0
+COUNT_MAX_USER_CONNECTION_ERRORS	4
+COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	2
+COUNT_MAX_CONNECTION_ERRORS	2
+COUNT_USER_ACL_ERRORS	0
+COUNT_LOCAL_ERRORS	0
+COUNT_UNKNOWN_ERRORS	0
+FIRST_ERROR_SEEN	set
+LAST_ERROR_SEEN	set
+set global max_connections = @saved_max_connections;
+drop user 'quota'@'santa.claus.ipv4.example.com';
+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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result	2012-01-27 12:14:54 +0000
@@ -22,9 +22,6 @@ Con2 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -84,9 +81,6 @@ Con3 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -147,9 +141,6 @@ Con4 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -209,9 +200,6 @@ Con5 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -130,9 +124,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -187,9 +178,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result	2012-01-27 12:14:54 +0000
@@ -21,9 +21,6 @@ Con2 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -83,9 +80,6 @@ Con3 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== removed file 'mysql-test/suite/perfschema/r/hostcache_ipv4_no_auth_plugin.result'
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_no_auth_plugin.result	2012-01-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_no_auth_plugin.result	1970-01-01 00:00:00 +0000
@@ -1,324 +0,0 @@
-call mtr.add_suppression("santa.claus.ipv4.example.com");
-flush status;
-flush hosts;
-select @@global.debug;
-@@global.debug
-
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
-CREATE USER 'plug'@'santa.claus.ipv4.example.com'
-  IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
-CREATE USER 'plug_dest'@'santa.claus.ipv4.example.com'
-  IDENTIFIED BY 'plug_test_passwd';
-GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv4.example.com';
-select "Con1 is alive";
-Con1 is alive
-Con1 is alive
-select current_user();
-current_user()
-root@localhost
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
-uninstall plugin test_plugin_server;
-ERROR HY000: Plugin 'test_plugin_server' is not loaded
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
-select 
-IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
-COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
-COUNT_AUTH_PLUGIN_ERRORS,
-COUNT_HANDSHAKE_ERRORS,
-COUNT_PROXY_USER_ERRORS,
-COUNT_PROXY_USER_ACL_ERRORS,
-COUNT_AUTHENTICATION_ERRORS,
-COUNT_SSL_ERRORS,
-COUNT_MAX_USER_CONNECTION_ERRORS,
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
-COUNT_MAX_CONNECTION_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
-SUM_CONNECT_ERRORS	0
-COUNT_HOST_BLOCKED_ERRORS	0
-COUNT_NAMEINFO_TRANSIENT_ERRORS	0
-COUNT_NAMEINFO_PERMANENT_ERRORS	0
-COUNT_FORMAT_ERRORS	0
-COUNT_ADDRINFO_TRANSIENT_ERRORS	0
-COUNT_ADDRINFO_PERMANENT_ERRORS	0
-COUNT_FCRDNS_ERRORS	0
-COUNT_HOST_ACL_ERRORS	0
-COUNT_NO_AUTH_PLUGIN_ERRORS	1
-COUNT_AUTH_PLUGIN_ERRORS	0
-COUNT_HANDSHAKE_ERRORS	0
-COUNT_PROXY_USER_ERRORS	0
-COUNT_PROXY_USER_ACL_ERRORS	0
-COUNT_AUTHENTICATION_ERRORS	1
-COUNT_SSL_ERRORS	0
-COUNT_MAX_USER_CONNECTION_ERRORS	0
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
-COUNT_MAX_CONNECTION_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: Plugin 'test_plugin_server' is not loaded
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
-select 
-IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
-COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
-COUNT_AUTH_PLUGIN_ERRORS,
-COUNT_HANDSHAKE_ERRORS,
-COUNT_PROXY_USER_ERRORS,
-COUNT_PROXY_USER_ACL_ERRORS,
-COUNT_AUTHENTICATION_ERRORS,
-COUNT_SSL_ERRORS,
-COUNT_MAX_USER_CONNECTION_ERRORS,
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
-COUNT_MAX_CONNECTION_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
-SUM_CONNECT_ERRORS	0
-COUNT_HOST_BLOCKED_ERRORS	0
-COUNT_NAMEINFO_TRANSIENT_ERRORS	0
-COUNT_NAMEINFO_PERMANENT_ERRORS	0
-COUNT_FORMAT_ERRORS	0
-COUNT_ADDRINFO_TRANSIENT_ERRORS	0
-COUNT_ADDRINFO_PERMANENT_ERRORS	0
-COUNT_FCRDNS_ERRORS	0
-COUNT_HOST_ACL_ERRORS	0
-COUNT_NO_AUTH_PLUGIN_ERRORS	2
-COUNT_AUTH_PLUGIN_ERRORS	0
-COUNT_HANDSHAKE_ERRORS	0
-COUNT_PROXY_USER_ERRORS	0
-COUNT_PROXY_USER_ACL_ERRORS	0
-COUNT_AUTHENTICATION_ERRORS	2
-COUNT_SSL_ERRORS	0
-COUNT_MAX_USER_CONNECTION_ERRORS	0
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
-COUNT_MAX_CONNECTION_ERRORS	0
-COUNT_USER_ACL_ERRORS	0
-COUNT_LOCAL_ERRORS	0
-COUNT_UNKNOWN_ERRORS	0
-FIRST_ERROR_SEEN	set
-LAST_ERROR_SEEN	set
-install plugin test_plugin_server soname 'auth_test_plugin.so';
-ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
-select 
-IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
-COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
-COUNT_AUTH_PLUGIN_ERRORS,
-COUNT_HANDSHAKE_ERRORS,
-COUNT_PROXY_USER_ERRORS,
-COUNT_PROXY_USER_ACL_ERRORS,
-COUNT_AUTHENTICATION_ERRORS,
-COUNT_SSL_ERRORS,
-COUNT_MAX_USER_CONNECTION_ERRORS,
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
-COUNT_MAX_CONNECTION_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
-SUM_CONNECT_ERRORS	0
-COUNT_HOST_BLOCKED_ERRORS	0
-COUNT_NAMEINFO_TRANSIENT_ERRORS	0
-COUNT_NAMEINFO_PERMANENT_ERRORS	0
-COUNT_FORMAT_ERRORS	0
-COUNT_ADDRINFO_TRANSIENT_ERRORS	0
-COUNT_ADDRINFO_PERMANENT_ERRORS	0
-COUNT_FCRDNS_ERRORS	0
-COUNT_HOST_ACL_ERRORS	0
-COUNT_NO_AUTH_PLUGIN_ERRORS	2
-COUNT_AUTH_PLUGIN_ERRORS	0
-COUNT_HANDSHAKE_ERRORS	0
-COUNT_PROXY_USER_ERRORS	1
-COUNT_PROXY_USER_ACL_ERRORS	0
-COUNT_AUTHENTICATION_ERRORS	2
-COUNT_SSL_ERRORS	0
-COUNT_MAX_USER_CONNECTION_ERRORS	0
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
-COUNT_MAX_CONNECTION_ERRORS	0
-COUNT_USER_ACL_ERRORS	0
-COUNT_LOCAL_ERRORS	0
-COUNT_UNKNOWN_ERRORS	0
-FIRST_ERROR_SEEN	set
-LAST_ERROR_SEEN	set
-ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
-select 
-IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
-COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
-COUNT_AUTH_PLUGIN_ERRORS,
-COUNT_HANDSHAKE_ERRORS,
-COUNT_PROXY_USER_ERRORS,
-COUNT_PROXY_USER_ACL_ERRORS,
-COUNT_AUTHENTICATION_ERRORS,
-COUNT_SSL_ERRORS,
-COUNT_MAX_USER_CONNECTION_ERRORS,
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
-COUNT_MAX_CONNECTION_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
-SUM_CONNECT_ERRORS	0
-COUNT_HOST_BLOCKED_ERRORS	0
-COUNT_NAMEINFO_TRANSIENT_ERRORS	0
-COUNT_NAMEINFO_PERMANENT_ERRORS	0
-COUNT_FORMAT_ERRORS	0
-COUNT_ADDRINFO_TRANSIENT_ERRORS	0
-COUNT_ADDRINFO_PERMANENT_ERRORS	0
-COUNT_FCRDNS_ERRORS	0
-COUNT_HOST_ACL_ERRORS	0
-COUNT_NO_AUTH_PLUGIN_ERRORS	2
-COUNT_AUTH_PLUGIN_ERRORS	0
-COUNT_HANDSHAKE_ERRORS	0
-COUNT_PROXY_USER_ERRORS	2
-COUNT_PROXY_USER_ACL_ERRORS	0
-COUNT_AUTHENTICATION_ERRORS	2
-COUNT_SSL_ERRORS	0
-COUNT_MAX_USER_CONNECTION_ERRORS	0
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
-COUNT_MAX_CONNECTION_ERRORS	0
-COUNT_USER_ACL_ERRORS	0
-COUNT_LOCAL_ERRORS	0
-COUNT_UNKNOWN_ERRORS	0
-FIRST_ERROR_SEEN	set
-LAST_ERROR_SEEN	set
-GRANT PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
-  TO 'plug'@'santa.claus.ipv4.example.com';
-select "Con4 is alive";
-Con4 is alive
-Con4 is alive
-select user();
-user()
-plug@stripped
-select current_user();
-current_user()
-plug_dest@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
-select 
-IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
-COUNT_HOST_BLOCKED_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_NO_AUTH_PLUGIN_ERRORS,
-COUNT_AUTH_PLUGIN_ERRORS,
-COUNT_HANDSHAKE_ERRORS,
-COUNT_PROXY_USER_ERRORS,
-COUNT_PROXY_USER_ACL_ERRORS,
-COUNT_AUTHENTICATION_ERRORS,
-COUNT_SSL_ERRORS,
-COUNT_MAX_USER_CONNECTION_ERRORS,
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS,
-COUNT_MAX_CONNECTION_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
-SUM_CONNECT_ERRORS	0
-COUNT_HOST_BLOCKED_ERRORS	0
-COUNT_NAMEINFO_TRANSIENT_ERRORS	0
-COUNT_NAMEINFO_PERMANENT_ERRORS	0
-COUNT_FORMAT_ERRORS	0
-COUNT_ADDRINFO_TRANSIENT_ERRORS	0
-COUNT_ADDRINFO_PERMANENT_ERRORS	0
-COUNT_FCRDNS_ERRORS	0
-COUNT_HOST_ACL_ERRORS	0
-COUNT_NO_AUTH_PLUGIN_ERRORS	2
-COUNT_AUTH_PLUGIN_ERRORS	0
-COUNT_HANDSHAKE_ERRORS	0
-COUNT_PROXY_USER_ERRORS	2
-COUNT_PROXY_USER_ACL_ERRORS	0
-COUNT_AUTHENTICATION_ERRORS	2
-COUNT_SSL_ERRORS	0
-COUNT_MAX_USER_CONNECTION_ERRORS	0
-COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS	0
-COUNT_MAX_CONNECTION_ERRORS	0
-COUNT_USER_ACL_ERRORS	0
-COUNT_LOCAL_ERRORS	0
-COUNT_UNKNOWN_ERRORS	0
-FIRST_ERROR_SEEN	set
-LAST_ERROR_SEEN	set
-REVOKE ALL PRIVILEGES ON *.* FROM 'plug_dest'@'santa.claus.ipv4.example.com';
-REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
-  FROM 'plug'@'santa.claus.ipv4.example.com';
-DROP USER 'plug'@'santa.claus.ipv4.example.com';
-DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
-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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result	2012-01-27 12:14:54 +0000
@@ -21,9 +21,6 @@ Con2 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -83,9 +80,6 @@ Con3 is alive
 select current_user();
 current_user()
 root@stripped
-show global status like "%peer%";
-Variable_name	Value
-Peer_address_errors	0
 select 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result	2012-01-27 12:14:54 +0000
@@ -14,9 +14,6 @@ current_user()
 root@localhost
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -71,9 +68,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -130,9 +124,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -187,9 +178,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== 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-26 10:10:55 +0000
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result	2012-01-27 12:14:54 +0000
@@ -15,9 +15,6 @@ current_user()
 root@localhost
 set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,
@@ -72,9 +69,6 @@ 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 
 IP, HOST, HOST_VALIDATED, SUM_CONNECT_ERRORS,
 COUNT_HOST_BLOCKED_ERRORS,

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test	2012-01-17 08:31:24 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_allow.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate failures from DNS:
+# - getaddrinfo() fails with AGAIN
+# - reported in COUNT_ADDRINFO_TRANSIENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test	2012-01-17 08:31:24 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_again_deny.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate failures from DNS:
+# - getaddrinfo() fails with AGAIN
+# - reported in COUNT_ADDRINFO_TRANSIENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test	2012-01-17 08:31:24 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_allow.test	2012-01-27 12:14:54 +0000
@@ -2,31 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario: (con2)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is not in the cache
-# - the client hostname can be obtained
-# - IPs for that hostname can be obtained
-# - none of the IPs match the client IP
-# - there are grants for the client IP
-# Test results:
-# - connection is accepted
-# - user is authorized by IP
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con3)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - there are grants for the client IP
-# Test results:
-# - connection is accepted
-# - user is authorized by IP
-# - peer_addr_errors is unchanged
-# - the host_cache is unchanged
+# Simulate failures from DNS full round trip (FCRDNS):
+# - IP --> HOST --> IP returns no match
+# - reported in COUNT_FCRDNS_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test	2012-01-17 08:31:24 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_bad_deny.test	2012-01-27 12:14:54 +0000
@@ -2,29 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario: (con2)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is not in the cache
-# - the client hostname can be obtained
-# - IPs for that hostname can be obtained
-# - none of the IPs match the client IP
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con3)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache is unchanged
+# Simulate failures from DNS full round trip (FCRDNS):
+# - IP --> HOST --> IP returns no match
+# - reported in COUNT_FCRDNS_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_allow.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate success from DNS full round trip (FCRDNS):
+# - IP --> HOST --> IP returns the client IP
+# - completes host validation in HOST_VALIDATED
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_good_deny.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate success from DNS full round trip (FCRDNS):
+# - IP --> HOST --> IP returns the client IP
+# - completes host validation in HOST_VALIDATED
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_allow.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate failures from DNS:
+# - getaddrinfo() fails with AGAIN
+# - reported in COUNT_ADDRINFO_TRANSIENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test	2012-01-17 13:48:50 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_addrinfo_noname_deny.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained (NONAME)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP without hostname
-#
+# Simulate failures from DNS:
+# - getaddrinfo() fails with NONAME
+# - reported in COUNT_ADDRINFO_PERMANENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== added file 'mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin-master.opt'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin-master.opt	2012-01-27 12:14:54 +0000
@@ -0,0 +1,2 @@
+$PLUGIN_AUTH_OPT
+$PLUGIN_AUTH_LOAD

=== added file 'mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_auth_plugin.test	2012-01-27 12:14:54 +0000
@@ -0,0 +1,93 @@
+
+#
+# Tests for the performance_schema host_cache.
+#
+# Test authorization with auth plugins.
+# error reporting in:
+# - column COUNT_AUTH_PLUGIN_ERRORS
+# - column COUNT_PROXY_USER_ERRORS
+# - column COUNT_PROXY_USER_ACL_ERRORS
+
+--source include/not_embedded.inc
+--source include/have_debug.inc
+--source include/have_perfschema.inc
+--source include/have_plugin_auth.inc
+
+# [Warning] Host name 'santa.claus.ipv4.example.com' could not be resolved:
+# Temporary failure in name resolution
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+
+flush status;
+flush hosts;
+select @@global.debug;
+show global status like "%peer%";
+
+CREATE USER 'plug'@'santa.claus.ipv4.example.com'
+  IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
+CREATE USER 'plug_dest'@'santa.claus.ipv4.example.com'
+  IDENTIFIED BY 'plug_test_passwd';
+GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv4.example.com';
+
+connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
+select "Con1 is alive";
+select current_user();
+disconnect con1;
+
+--connection default
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+uninstall plugin test_plugin_server;
+
+--disable_query_log
+--error ER_PLUGIN_IS_NOT_LOADED
+connect (con2,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_PLUGIN_IS_NOT_LOADED
+connect (con3,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+eval install plugin test_plugin_server soname '$PLUGIN_AUTH';
+
+--disable_query_log
+--error ER_ACCESS_DENIED_ERROR
+connect (con2,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_ACCESS_DENIED_ERROR
+connect (con3,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+GRANT PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
+  TO 'plug'@'santa.claus.ipv4.example.com';
+
+connect (con4,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
+select "Con4 is alive";
+select user();
+select current_user();
+disconnect con4;
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+REVOKE ALL PRIVILEGES ON *.* FROM 'plug_dest'@'santa.claus.ipv4.example.com';
+REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
+  FROM 'plug'@'santa.claus.ipv4.example.com';
+DROP USER 'plug'@'santa.claus.ipv4.example.com';
+DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
+
+set global debug= default;
+

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_format.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_format.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,8 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - the client hostname looks like an IPv4 address
-# - there are grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP with hostname
-#
+# Simulate failures from host names formats:
+# - reported in COUNT_FORMAT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== added file 'mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test	2012-01-27 12:14:54 +0000
@@ -0,0 +1,217 @@
+
+#
+# Tests for the performance_schema host_cache.
+#
+# Simulate failures from per user quotas:
+# - reported in COUNT_MAX_USER_CONNECTION_ERRORS
+# - reported in COUNT_MAX_USER_CONNECTION_PER_HOUR_ERRORS
+# Simulate failures from server quotas:
+# - reported in COUNT_MAX_CONNECTION_ERRORS
+
+--source include/not_embedded.inc
+--source include/have_debug.inc
+--source include/have_perfschema.inc
+
+# [Warning] IP address '192.0.2.4' could not be resolved:
+# no reverse address mapping.
+call mtr.add_suppression("192.0.2.4");
+
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+select @@global.max_user_connections;
+select @@global.max_connections;
+select @@global.max_connections into @saved_max_connections;
+show global status like "%peer%";
+
+create user 'quota'@'santa.claus.ipv4.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_connections_per_hour 3;
+
+connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
+select "Con1 is alive";
+select current_user();
+disconnect con1;
+
+--connection default
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+
+connect (con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con2a is alive";
+select current_user();
+disconnect con2a;
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+connect (con2b,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con2b is alive";
+select current_user();
+disconnect con2b;
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+connect (con2c,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con2c is alive";
+select current_user();
+disconnect con2c;
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_USER_LIMIT_REACHED
+connect (con2d,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_USER_LIMIT_REACHED
+connect (con2e,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_connections_per_hour 0;
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_user_connections 3;
+flush user_resources;
+
+connect (con3a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con7 is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+connect (con3b,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con3b is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+connect (con3c,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con3c is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_USER_LIMIT_REACHED
+connect (con3d,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_USER_LIMIT_REACHED
+connect (con3e,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+disconnect con3a;
+disconnect con3b;
+disconnect con3c;
+
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+  with max_user_connections 0;
+flush user_resources;
+
+set global max_user_connections = 3;
+
+connect (con4a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con4a is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+connect (con4b,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con4b is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+connect (con4c,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con4c is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_TOO_MANY_USER_CONNECTIONS
+connect (con4d,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_TOO_MANY_USER_CONNECTIONS
+connect (con4e,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+disconnect con4a;
+disconnect con4b;
+disconnect con4c;
+
+set global max_user_connections = 0;
+set global max_connections = 3;
+
+connect (con5a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con4a is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+connect (con5b,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Con5b is alive";
+select current_user();
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_CON_COUNT_ERROR
+connect (con5c,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_CON_COUNT_ERROR
+connect (con5d,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+disconnect con5a;
+disconnect con5b;
+
+set global max_connections = @saved_max_connections;
+
+# revoke all privileges on test.* from 'quota'@'santa.claus.ipv4.example.com';
+drop user 'quota'@'santa.claus.ipv4.example.com';
+
+set global debug= default;
+

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_allow.test	2012-01-27 12:14:54 +0000
@@ -2,54 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario: (con2)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained (temp failure)
-# - the client IPv4 is not in the cache
-# - the client hostname can not be obtained
-# - there are grants for the client IP
-# Test results:
-# - connection is accepted
-# - user is authorized by IP
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con3)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained (temp failure)
-# - the client IPv4 is in the cache with no hostname
-# - the client hostname can not be obtained
-# - there are grants for the client IP
-# Test results:
-# - connection is accepted
-# - user is authorized by IP
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con4)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - the client hostname can be obtained, finally
-# - there are grants for the client host
-# Test results:
-# - connection is accepted
-# - user is authorized by hostname
-# - peer_addr_errors is unchanged
-# - the host_cache is updated with the resolved hostname
-#
-# Test scenario: (con5)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with resolved hostname
-# - there are grants for the client host
-# Test results:
-# - connection is accepted
-# - user is authorized by hostname
-# - peer_addr_errors is unchanged
-# - the host_cache is unchanged
-#
+# Simulate failures from DNS:
+# - getnameinfo() fails with AGAIN
+# - reported in COUNT_NAMEINFO_TRANSIENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_again_deny.test	2012-01-27 12:14:54 +0000
@@ -2,50 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario: (con2)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is not in the cache
-# - the client hostname can not be obtained (temp failure)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con3)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - the client hostname can not be obtained (temp failure)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con4)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - the client hostname can be obtained, finally
-# - there are no grants for the client host
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache is updated with the resolved hostname
-#
-# Test scenario: (con5)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with resolved hostname
-# - there are no grants for the client host
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache is unchanged
-#
+# Simulate failures from DNS:
+# - getnameinfo() fails with AGAIN
+# - reported in COUNT_NAMEINFO_TRANSIENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_allow.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can not be obtained (NONAME)
-# - there are grants for the client IP
-# Test results:
-# - connection is accepted
-# - the user is authorized by IP
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
+# Simulate failures from DNS:
+# - getnameinfo() fails with NONAME
+# - reported in COUNT_NAMEINFO_PERMANENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_nameinfo_noname_deny.test	2012-01-27 12:14:54 +0000
@@ -2,17 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can not be obtained (NONAME)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
+# Simulate failures from DNS:
+# - getnameinfo() fails with NONAME
+# - reported in COUNT_NAMEINFO_PERMANENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== removed file 'mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin-master.opt'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin-master.opt	2012-01-24 11:36:34 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin-master.opt	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-$PLUGIN_AUTH_OPT
-$PLUGIN_AUTH_LOAD

=== removed file 'mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin.test	2012-01-24 11:36:34 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_no_auth_plugin.test	1970-01-01 00:00:00 +0000
@@ -1,100 +0,0 @@
-
-#
-# Tests for the performance_schema host_cache.
-#
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
-
---source include/not_embedded.inc
---source include/have_debug.inc
---source include/have_perfschema.inc
---source include/have_plugin_auth.inc
-
-# [Warning] Host name 'santa.claus.ipv4.example.com' could not be resolved:
-# Temporary failure in name resolution
-call mtr.add_suppression("santa.claus.ipv4.example.com");
-
-flush status;
-flush hosts;
-select @@global.debug;
-show global status like "%peer%";
-
-CREATE USER 'plug'@'santa.claus.ipv4.example.com'
-  IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
-CREATE USER 'plug_dest'@'santa.claus.ipv4.example.com'
-  IDENTIFIED BY 'plug_test_passwd';
-GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv4.example.com';
-
-connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
-select "Con1 is alive";
-select current_user();
-disconnect con1;
-
---connection default
-set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
-uninstall plugin test_plugin_server;
-
---disable_query_log
---error ER_PLUGIN_IS_NOT_LOADED
-connect (con2,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
---enable_query_log
-
---connection default
---source ../include/hostcache_dump.inc
-
---disable_query_log
---error ER_PLUGIN_IS_NOT_LOADED
-connect (con3,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
---enable_query_log
-
---connection default
---source ../include/hostcache_dump.inc
-
-eval install plugin test_plugin_server soname '$PLUGIN_AUTH';
-
---disable_query_log
---error ER_ACCESS_DENIED_ERROR
-connect (con2,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
---enable_query_log
-
---connection default
---source ../include/hostcache_dump.inc
-
---disable_query_log
---error ER_ACCESS_DENIED_ERROR
-connect (con3,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
---enable_query_log
-
---connection default
---source ../include/hostcache_dump.inc
-
-GRANT PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
-  TO 'plug'@'santa.claus.ipv4.example.com';
-
-connect (con4,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin);
-select "Con4 is alive";
-select user();
-select current_user();
-disconnect con4;
-
---connection default
---source ../include/hostcache_dump.inc
-
-REVOKE ALL PRIVILEGES ON *.* FROM 'plug_dest'@'santa.claus.ipv4.example.com';
-REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
-  FROM 'plug'@'santa.claus.ipv4.example.com';
-DROP USER 'plug'@'santa.claus.ipv4.example.com';
-DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
-
-set global debug= default;
-

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test	2012-01-18 10:25:19 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_again_deny.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate failures from DNS:
+# - getaddrinfo() fails with AGAIN
+# - reported in COUNT_ADDRINFO_TRANSIENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test	2012-01-18 10:25:19 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_bad_deny.test	2012-01-27 12:14:54 +0000
@@ -2,29 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario: (con2)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is not in the cache
-# - the client hostname can be obtained
-# - IPs for that hostname can be obtained
-# - none of the IPs match the client IP
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con3)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache is unchanged
+# Simulate failures from DNS full round trip (FCRDNS):
+# - IP --> HOST --> IP returns no match
+# - reported in COUNT_FCRDNS_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test	2012-01-18 10:25:19 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_allow.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate success from DNS full round trip (FCRDNS):
+# - IP --> HOST --> IP returns the client IP
+# - completes host validation in HOST_VALIDATED
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test	2012-01-18 10:25:19 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_good_deny.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP and hostname
-#
+# Simulate success from DNS full round trip (FCRDNS):
+# - IP --> HOST --> IP returns the client IP
+# - completes host validation in HOST_VALIDATED
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test	2012-01-18 10:25:19 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_addrinfo_noname_deny.test	2012-01-27 12:14:54 +0000
@@ -2,18 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can be obtained
-# - IP for that hostname can not be obtained (NONAME)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_error is unchanged
-# - the host_cache records the failing IP without hostname
-#
+# Simulate failures from DNS:
+# - getaddrinfo() fails with NONAME
+# - reported in COUNT_ADDRINFO_PERMANENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test	2012-01-18 10:25:19 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_again_deny.test	2012-01-27 12:14:54 +0000
@@ -2,50 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario: (con2)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is not in the cache
-# - the client hostname can not be obtained (temp failure)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con3)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - the client hostname can not be obtained (temp failure)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
-# Test scenario: (con4)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with no hostname
-# - the client hostname can be obtained, finally
-# - there are no grants for the client host
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache is updated with the resolved hostname
-#
-# Test scenario: (con5)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client IPv4 is in the cache with resolved hostname
-# - there are no grants for the client host
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache is unchanged
-#
+# Simulate failures from DNS:
+# - getnameinfo() fails with AGAIN
+# - reported in COUNT_NAMEINFO_TRANSIENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test'
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test	2012-01-18 10:25:19 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_nameinfo_noname_deny.test	2012-01-27 12:14:54 +0000
@@ -2,17 +2,9 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# FIXME
-# Test scenario:
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can be obtained
-# - the client hostname can not be obtained (NONAME)
-# - there are no grants for the client IP
-# Test results:
-# - connection is refused
-# - peer_addr_errors is unchanged
-# - the host_cache records the failing IP with no hostname
-#
+# Simulate failures from DNS:
+# - getnameinfo() fails with NONAME
+# - reported in COUNT_NAMEINFO_PERMANENT_ERRORS
 
 --source include/not_embedded.inc
 --source include/have_debug.inc

=== modified file 'mysql-test/suite/perfschema/t/hostcache_peer_addr.test'
--- a/mysql-test/suite/perfschema/t/hostcache_peer_addr.test	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/t/hostcache_peer_addr.test	2012-01-27 12:14:54 +0000
@@ -2,22 +2,8 @@
 #
 # Tests for the performance_schema host_cache.
 #
-# Test scenario: (con2)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can not be obtained
-# Test results:
-# - connection is refused
-# - peer_addr_errors is incremented
-# - the host_cache is unchanged
-#
-# Test scenario: (con3)
-# - a client connects on a TCP/IPv4 socket
-# - the client IPv4 can not be obtained
-# Test results:
-# - connection is refused
-# - peer_addr_errors is incremented
-# - the host_cache is unchanged
-#
+# Simulate failures from vio_peer_addr, reported in:
+# status variable Peer_address_errors
 
 --source include/not_embedded.inc
 --source include/have_debug.inc
@@ -42,6 +28,7 @@ connect (con2,"127.0.0.1",root,,test,$MA
 --enable_query_log
 
 --connection default
+show global status like "%peer%";
 --source ../include/hostcache_dump.inc
 
 --disable_query_log
@@ -50,6 +37,7 @@ connect (con3,"127.0.0.1",root,,test,$MA
 --enable_query_log
 
 --connection default
+show global status like "%peer%";
 --source ../include/hostcache_dump.inc
 
 set global debug= default;

=== modified file 'sql/hostname.cc'
--- a/sql/hostname.cc	2012-01-26 10:10:55 +0000
+++ b/sql/hostname.cc	2012-01-27 12:14:54 +0000
@@ -67,8 +67,7 @@ Host_errors::Host_errors()
   m_max_user_connection_per_hour(0),
   m_max_connection(0),
   m_user_acl(0),
-  m_local(0),
-  m_unknown(0)
+  m_local(0)
 {}
 
 Host_errors::~Host_errors()
@@ -97,7 +96,6 @@ void Host_errors::reset()
   m_max_connection= 0;
   m_user_acl= 0;
   m_local= 0;
-  m_unknown= 0;
 }
 
 void Host_errors::aggregate(const Host_errors *errors)
@@ -123,7 +121,6 @@ void Host_errors::aggregate(const Host_e
   m_max_connection+= errors->m_max_connection;
   m_user_acl+= errors->m_user_acl;
   m_local+= errors->m_local;
-  m_unknown+= errors->m_unknown;
 }
 
 static hash_filo *hostname_cache;

=== modified file 'sql/hostname.h'
--- a/sql/hostname.h	2012-01-26 10:10:55 +0000
+++ b/sql/hostname.h	2012-01-27 12:14:54 +0000
@@ -75,8 +75,6 @@ public:
   ulong m_user_acl;
   /** Number of errors from the server itself. */
   ulong m_local;
-  /** Number of unknown errors. */
-  ulong m_unknown;
 
   bool has_error() const
   {
@@ -99,8 +97,7 @@ public:
       || (m_max_user_connection_per_hour != 0)
       || (m_max_connection != 0)
       || (m_user_acl != 0)
-      || (m_local != 0)
-      || (m_unknown != 0));
+      || (m_local != 0));
   }
 
   void sum_connect_errors()

=== modified file 'storage/perfschema/table_host_cache.cc'
--- a/storage/perfschema/table_host_cache.cc	2012-01-26 10:10:55 +0000
+++ b/storage/perfschema/table_host_cache.cc	2012-01-27 12:14:54 +0000
@@ -299,7 +299,15 @@ void table_host_cache::make_row(Host_ent
   row->m_count_max_connection_errors= entry->m_errors.m_max_connection;
   row->m_count_user_acl_errors= entry->m_errors.m_user_acl;
   row->m_count_local_errors= entry->m_errors.m_local;
-  row->m_count_unknown_errors= entry->m_errors.m_unknown;
+
+  /*
+    Reserved for future use, to help with backward compatibility.
+    When new errors are added in entry->m_errors.m_xxx,
+    report them in this column (GA releases),
+    until the table HOST_CACHE structure can be extended (next development version).
+  */
+  row->m_count_unknown_errors= 0;
+
   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;

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