summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-05-07 16:12:16 +0200
committerSergei Golubchik <sergii@pisem.net>2014-05-07 16:12:16 +0200
commit5ffe939a6c00f072d885fc324354ccf3ebaa2657 (patch)
tree4c19c0e2ddf54e10029b6e03a745bc863a37daa0 /mysql-test/suite/perfschema
parenta30477b32293d2914fe9147630266d8238d8ec2e (diff)
parent04bce7b569f44f3aca3cb21953d41c2a4a02efe6 (diff)
downloadmariadb-git-5ffe939a6c00f072d885fc324354ccf3ebaa2657.tar.gz
perfschema 5.6.17
Diffstat (limited to 'mysql-test/suite/perfschema')
-rw-r--r--mysql-test/suite/perfschema/include/disable_instruments.inc23
-rw-r--r--mysql-test/suite/perfschema/include/enable_instruments.inc23
-rw-r--r--mysql-test/suite/perfschema/include/event_aggregate_setup.inc4
-rw-r--r--mysql-test/suite/perfschema/include/rpl_statements_truncate.inc15
-rw-r--r--mysql-test/suite/perfschema/include/sizing_auto.inc4
-rw-r--r--mysql-test/suite/perfschema/r/binlog_edge_row.result4
-rw-r--r--mysql-test/suite/perfschema/r/func_file_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/func_mutex.result1
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result212
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result212
-rw-r--r--mysql-test/suite/perfschema/r/myisam_file_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result40
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result2
-rw-r--r--mysql-test/suite/perfschema/r/rpl_statements.result241
-rw-r--r--mysql-test/suite/perfschema/r/setup_instruments_defaults.result40
-rw-r--r--mysql-test/suite/perfschema/r/sizing_default.result208
-rw-r--r--mysql-test/suite/perfschema/r/sizing_high.result60
-rw-r--r--mysql-test/suite/perfschema/r/sizing_low.result60
-rw-r--r--mysql-test/suite/perfschema/r/sizing_med.result60
-rw-r--r--mysql-test/suite/perfschema/r/sizing_off.result4
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_off.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result2
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result2
-rw-r--r--mysql-test/suite/perfschema/t/disabled.def2
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_u.test1
-rw-r--r--mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test1
-rw-r--r--mysql-test/suite/perfschema/t/func_file_io.test1
-rw-r--r--mysql-test/suite/perfschema/t/func_mutex.test1
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test73
-rw-r--r--mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test73
-rw-r--r--mysql-test/suite/perfschema/t/myisam_file_io.test1
-rw-r--r--mysql-test/suite/perfschema/t/nesting.test5
-rw-r--r--mysql-test/suite/perfschema/t/ortho_iter.test4
-rw-r--r--mysql-test/suite/perfschema/t/rpl_statements.test339
-rw-r--r--mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt28
-rw-r--r--mysql-test/suite/perfschema/t/setup_instruments_defaults.test61
-rw-r--r--mysql-test/suite/perfschema/t/sizing_default.cnf11
-rw-r--r--mysql-test/suite/perfschema/t/sizing_default.test22
111 files changed, 1663 insertions, 321 deletions
diff --git a/mysql-test/suite/perfschema/include/disable_instruments.inc b/mysql-test/suite/perfschema/include/disable_instruments.inc
new file mode 100644
index 00000000000..b0a4ddec450
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/disable_instruments.inc
@@ -0,0 +1,23 @@
+# Tests for the performance schema
+
+# ==========================================
+# HELPER include/disable_instruments
+# ==========================================
+#
+# ==== Usage ====
+#
+# 1. Define the instrument to be disabled/enabled:
+#
+# let $pfs_instrument=<instrument>
+#
+# Where <instrument> is the instrument name with or without wildcards, e.g.
+#
+# let $pfs_instrument='%statement/sql%'
+#
+--disable_query_log ONCE
+
+eval update performance_schema.setup_instruments
+ set enabled='no', timed='no'
+ where name like $pfs_instrument;
+
+
diff --git a/mysql-test/suite/perfschema/include/enable_instruments.inc b/mysql-test/suite/perfschema/include/enable_instruments.inc
new file mode 100644
index 00000000000..94d63aee941
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/enable_instruments.inc
@@ -0,0 +1,23 @@
+# Tests for the performance schema
+
+# ==========================================
+# HELPER include/enable_instruments
+# ==========================================
+#
+# ==== Usage ====
+#
+# 1. Define the instrument to be enabled/disabled:
+#
+# let $pfs_instrument=<instrument>
+#
+# Where <instrument> is the instrument name with or without wildcards, e.g.
+#
+# let $pfs_instrument='%statement/sql%'
+#
+--disable_query_log ONCE
+
+eval update performance_schema.setup_instruments
+ set enabled='yes', timed='yes'
+ where name like $pfs_instrument;
+
+
diff --git a/mysql-test/suite/perfschema/include/event_aggregate_setup.inc b/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
index a0103649c09..769ba5f8607 100644
--- a/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
+++ b/mysql-test/suite/perfschema/include/event_aggregate_setup.inc
@@ -123,8 +123,8 @@ update performance_schema.setup_instruments set enabled='YES', timed='YES'
update performance_schema.setup_instruments set enabled='YES', timed='YES'
where name in ('statement/sql/select',
'statement/sql/insert',
- 'statement/com/',
- 'statement/com/Query',
+ 'statement/abstract/new_packet',
+ 'statement/abstract/Query',
'statement/com/Quit',
'statement/com/error');
diff --git a/mysql-test/suite/perfschema/include/rpl_statements_truncate.inc b/mysql-test/suite/perfschema/include/rpl_statements_truncate.inc
new file mode 100644
index 00000000000..afd1d31a157
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/rpl_statements_truncate.inc
@@ -0,0 +1,15 @@
+# Tests for the performance schema
+
+# ==========================================
+# HELPER include/rpl_truncate_statements.inc
+# ==========================================
+
+--disable_query_log
+update performance_schema.setup_instruments set enabled='no', timed='no' where name like '%statement/%';
+truncate table performance_schema.events_waits_history_long;
+truncate table performance_schema.events_statements_summary_by_digest;
+truncate table performance_schema.events_statements_history;
+truncate table performance_schema.events_statements_history_long;
+update performance_schema.setup_instruments set enabled='yes', timed='yes' where name like '%statement/%';
+--enable_query_log
+
diff --git a/mysql-test/suite/perfschema/include/sizing_auto.inc b/mysql-test/suite/perfschema/include/sizing_auto.inc
index 1a9afeaf219..4c3451ce8b5 100644
--- a/mysql-test/suite/perfschema/include/sizing_auto.inc
+++ b/mysql-test/suite/perfschema/include/sizing_auto.inc
@@ -2,8 +2,8 @@
show variables like "table_definition_cache";
show variables like "table_open_cache";
show variables like "max_connections";
-# Results vary by platform:
-# show variables like "open_files_limit";
+# open_files_limit depends on OS configuration (ulimit -n)
+#show variables like "open_files_limit";
show variables like "%performance_schema%";
show status like "%performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/binlog_edge_row.result b/mysql-test/suite/perfschema/r/binlog_edge_row.result
index 9160519921a..40595a804f7 100644
--- a/mysql-test/suite/perfschema/r/binlog_edge_row.result
+++ b/mysql-test/suite/perfschema/r/binlog_edge_row.result
@@ -78,6 +78,8 @@ performance_schema.setup_instruments.timed= 'NO';
update my_bh_table, performance_schema.setup_instruments
set my_bh_table.a = my_bh_table.a + 1,
performance_schema.setup_instruments.timed= 'NO';
+Warnings:
+Warning 1870 Row events are not logged for UPDATE statements that modify BLACKHOLE tables in row format. Table(s): 'my_bh_table.'
use test;
drop table if exists marker_multi_delete;
Warnings:
@@ -101,6 +103,8 @@ delete my_bh_table.*, performance_schema.setup_actors.*
from my_bh_table, performance_schema.setup_actors
where my_bh_table.a != 1000
or performance_schema.setup_actors.role='BAZ';
+Warnings:
+Warning 1870 Row events are not logged for DELETE statements that modify BLACKHOLE tables in row format. Table(s): 'my_bh_table.'
use test;
drop table if exists marker_end;
Warnings:
diff --git a/mysql-test/suite/perfschema/r/func_file_io.result b/mysql-test/suite/perfschema/r/func_file_io.result
index a71c8e601aa..d710774a1f4 100644
--- a/mysql-test/suite/perfschema/r/func_file_io.result
+++ b/mysql-test/suite/perfschema/r/func_file_io.result
@@ -3,6 +3,7 @@ UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/io/file/%';
update performance_schema.threads SET instrumented = 'YES'
WHERE PROCESSLIST_ID=connection_id();
+truncate table performance_schema.events_statements_summary_by_digest;
flush status;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value')
diff --git a/mysql-test/suite/perfschema/r/func_mutex.result b/mysql-test/suite/perfschema/r/func_mutex.result
index a76e7f3a646..86967a2a63f 100644
--- a/mysql-test/suite/perfschema/r/func_mutex.result
+++ b/mysql-test/suite/perfschema/r/func_mutex.result
@@ -2,6 +2,7 @@ UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
+truncate table performance_schema.events_statements_summary_by_digest;
flush status;
select NAME from performance_schema.mutex_instances
where NAME = 'wait/synch/mutex/sql/TABLE_SHARE::tdc.LOCK_table_share' GROUP BY NAME;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
index e7af3cdc006..6f5affadd2f 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
@@ -23,8 +23,10 @@ User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
select @@global.max_connect_errors into @saved_max_connect_errors;
-set global max_connect_errors = 2;
+set global max_connect_errors = 3;
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+create user 'quota'@'santa.claus.ipv4.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
select "Con1 is alive";
Con1 is alive
Con1 is alive
@@ -207,7 +209,215 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 2
+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 2
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug_dbug= "-d,native_password_bad_reply";
+message
+Valid connection should reset SUM_CONNECT_ERROR counter
+set global debug_dbug= "+d,native_password_bad_reply";
+"Dumping 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 2
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 1
+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 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 2
+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 4
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+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 5
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 1
+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 5
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 2
+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 5
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com';
+revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com';
+drop user 'quota'@'santa.claus.ipv4.example.com';
set global max_connect_errors = @saved_max_connect_errors;
set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
index 2e9ad44b58d..5d1846f3354 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
@@ -23,8 +23,10 @@ User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
select @@global.max_connect_errors into @saved_max_connect_errors;
-set global max_connect_errors = 2;
+set global max_connect_errors = 3;
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+create user 'quota'@'santa.claus.ipv6.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
select "Con1 is alive";
Con1 is alive
Con1 is alive
@@ -207,7 +209,215 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 2
+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 2
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug_dbug= "-d,native_password_bad_reply";
+message
+Valid connection should reset SUM_CONNECT_ERROR counter
+set global debug_dbug= "+d,native_password_bad_reply";
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.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 2
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 1
+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 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 2
+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 4
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 08S01: Bad handshake
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+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 5
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 1
+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 5
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 2
+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 5
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com';
+revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com';
+drop user 'quota'@'santa.claus.ipv6.example.com';
set global max_connect_errors = @saved_max_connect_errors;
set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/r/myisam_file_io.result b/mysql-test/suite/perfschema/r/myisam_file_io.result
index 826c4563932..ea1e0bd52b8 100644
--- a/mysql-test/suite/perfschema/r/myisam_file_io.result
+++ b/mysql-test/suite/perfschema/r/myisam_file_io.result
@@ -4,6 +4,7 @@ update performance_schema.setup_instruments set enabled='YES'
update performance_schema.setup_consumers
set enabled='YES';
truncate table performance_schema.events_waits_history_long;
+truncate table performance_schema.events_statements_summary_by_digest;
flush status;
drop table if exists test.no_index_tab;
create table test.no_index_tab ( a varchar(255), b int ) engine=myisam;
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index 0eb5ff8c737..bef2759da41 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -28,7 +28,8 @@ select (instr_name like "statement/%") into is_statement;
select instr_name, is_wait, is_stage, is_statement;
select count(name)
from performance_schema.setup_instruments
-where name like (concat(instr_name, "%"))
+where (name like (concat(instr_name, "%")))
+and (not name like "%/abstract/%")
into count_expected;
set cmd_1= "select count(*) from (select distinct event_name from performance_schema.";
set cmd_2= concat(" where event_name like \"",
@@ -115,7 +116,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
@@ -639,6 +640,41 @@ status
Checking table events_waits_summary_global_by_event_name ...
Warnings:
Warning 12000 Done
+call check_instrument("statement/abstract/");
+instr_name is_wait is_stage is_statement
+statement/abstract/ 0 0 1
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
call check_instrument("statement/");
instr_name is_wait is_stage is_statement
statement/ 0 0 1
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 02e3ed7da62..838d17e61fe 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -46,7 +46,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/rpl_statements.result b/mysql-test/suite/perfschema/r/rpl_statements.result
new file mode 100644
index 00000000000..e271cd2a7fa
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/rpl_statements.result
@@ -0,0 +1,241 @@
+include/master-slave.inc
+[connection master]
+
+#
+# STEP 1 - CREATE AND REPLICATE TEST TABLES
+#
+
+**************
+*** MASTER ***
+**************
+
+*** Create test tables
+
+show variables like '%binlog_format%';
+Variable_name Value
+binlog_format MIXED
+drop table if exists test.marker;
+select thread_id into @my_thread_id
+from performance_schema.threads
+where processlist_id = connection_id();
+create table test.marker(s1 int) engine=innodb;
+**************
+*** SLAVE ***
+**************
+
+*** Clear statement events
+
+#
+# STEP 2 - REPLICATE ONE ROW ON MASTER TO GET REPLICATION THREAD ID ON SLAVE
+#
+**************
+*** MASTER ***
+**************
+
+insert into test.marker values (0);
+
+**************
+*** SLAVE ***
+**************
+
+*** Verify row, get replication thread id, clear statement events
+
+select thread_id into @slave_thread_id from performance_schema.events_statements_history
+where sql_text like '%marker%';
+*** Verify row inserted on master was replicated
+select count(*) = 1 as 'Expect 1' from test.marker;
+Expect 1
+1
+*** Clear statement events
+
+#
+# STEP 3 - PERFORM DML STATEMENTS ON MASTER
+#
+**************
+*** MASTER ***
+**************
+
+show variables like '%binlog_format%';
+Variable_name Value
+binlog_format MIXED
+*** Clear statement events
+
+*** Create/drop table, create/drop database
+
+create database marker1_db;
+create database marker2_db;
+create table marker1_db.table1 (s1 int) engine=innodb;
+create table marker2_db.table1 (s1 int) engine=innodb;
+create table marker2_db.table2 (s1 int) engine=innodb;
+
+*** Transaction
+start transaction;
+insert into marker1_db.table1 values (1), (2), (3);
+insert into marker2_db.table1 values (1), (2), (3);
+commit;
+
+*** Alter
+alter table marker1_db.table1 add column (s2 varchar(32));
+
+*** Insert, Update
+start transaction;
+insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six');
+update marker1_db.table1 set s1 = s1 + 1;
+commit;
+
+*** Rollback
+start transaction;
+insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine');
+rollback;
+
+*** Autocommit, Delete, Drop
+delete from marker1_db.table1 where s1 > 4;
+drop table marker2_db.table1;
+drop database marker2_db;
+
+*** Examine statements events that will be compared on the slave
+
+select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from performance_schema.events_statements_history_long
+where sql_text like '%marker%' order by event_id;
+thread_id event_id event_name current_schema digest_text sql_text
+[THREAD_ID] [EVENT_ID] statement/sql/create_db test CREATE SCHEMA marker1_db create database marker1_db
+[THREAD_ID] [EVENT_ID] statement/sql/create_db test CREATE SCHEMA marker2_db create database marker2_db
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker1_db . table1 ( s1 INTEGER ) ENGINE = innodb create table marker1_db.table1 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker2_db . table1 ( s1 INTEGER ) ENGINE = innodb create table marker2_db.table1 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker2_db . table2 ( s1 INTEGER ) ENGINE = innodb create table marker2_db.table2 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (?) /* , ... */ insert into marker1_db.table1 values (1), (2), (3)
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker2_db . table1 VALUES (?) /* , ... */ insert into marker2_db.table1 values (1), (2), (3)
+[THREAD_ID] [EVENT_ID] statement/sql/alter_table test ALTER TABLE marker1_db . table1 ADD COLUMN ( s2 VARCHARACTER (?) ) alter table marker1_db.table1 add column (s2 varchar(32))
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (...) /* , ... */ insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six')
+[THREAD_ID] [EVENT_ID] statement/sql/update test UPDATE marker1_db . table1 SET s1 = s1 + ? update marker1_db.table1 set s1 = s1 + 1
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (...) /* , ... */ insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine')
+[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM marker1_db . table1 WHERE s1 > ? delete from marker1_db.table1 where s1 > 4
+[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE marker2_db . table1 drop table marker2_db.table1
+[THREAD_ID] [EVENT_ID] statement/sql/drop_db test DROP SCHEMA marker2_db drop database marker2_db
+
+#
+# STEP 4 - REPLICATE STATEMENT EVENTS ON MASTER TO SLAVE
+#
+
+*** Store statement events in holding table, then replicate
+
+#
+# Create table to hold statement events for later comparison on the slave
+#
+create table test.master_events_statements_history_long as
+(select thread_id, event_id, event_name, sql_text, digest, digest_text, current_schema, rows_affected
+from performance_schema.events_statements_history_long
+where (thread_id=@my_thread_id and digest_text like '%marker%'));
+
+#
+# STEP 5 - VERIFY DML AND DDL STATEMENT EVENTS ON SLAVE
+#
+**************
+*** SLAVE ***
+**************
+
+*** List statement events from master
+
+select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from master_events_statements_history_long order by event_id;
+thread_id event_id event_name current_schema digest_text sql_text
+[THREAD_ID] [EVENT_ID] statement/sql/create_db test CREATE SCHEMA marker1_db create database marker1_db
+[THREAD_ID] [EVENT_ID] statement/sql/create_db test CREATE SCHEMA marker2_db create database marker2_db
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker1_db . table1 ( s1 INTEGER ) ENGINE = innodb create table marker1_db.table1 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker2_db . table1 ( s1 INTEGER ) ENGINE = innodb create table marker2_db.table1 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker2_db . table2 ( s1 INTEGER ) ENGINE = innodb create table marker2_db.table2 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (?) /* , ... */ insert into marker1_db.table1 values (1), (2), (3)
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker2_db . table1 VALUES (?) /* , ... */ insert into marker2_db.table1 values (1), (2), (3)
+[THREAD_ID] [EVENT_ID] statement/sql/alter_table test ALTER TABLE marker1_db . table1 ADD COLUMN ( s2 VARCHARACTER (?) ) alter table marker1_db.table1 add column (s2 varchar(32))
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (...) /* , ... */ insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six')
+[THREAD_ID] [EVENT_ID] statement/sql/update test UPDATE marker1_db . table1 SET s1 = s1 + ? update marker1_db.table1 set s1 = s1 + 1
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (...) /* , ... */ insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine')
+[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM marker1_db . table1 WHERE s1 > ? delete from marker1_db.table1 where s1 > 4
+[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE marker2_db . table1 drop table marker2_db.table1
+[THREAD_ID] [EVENT_ID] statement/sql/drop_db test DROP SCHEMA marker2_db drop database marker2_db
+
+*** List statement events on slave
+
+select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from performance_schema.events_statements_history_long
+where thread_id = @slave_thread_id and sql_text like '%marker%' order by event_id;
+thread_id event_id event_name current_schema digest_text sql_text
+[THREAD_ID] [EVENT_ID] statement/sql/create_db marker1_db CREATE SCHEMA marker1_db create database marker1_db
+[THREAD_ID] [EVENT_ID] statement/sql/create_db marker2_db CREATE SCHEMA marker2_db create database marker2_db
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker1_db . table1 ( s1 INTEGER ) ENGINE = innodb create table marker1_db.table1 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker2_db . table1 ( s1 INTEGER ) ENGINE = innodb create table marker2_db.table1 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/create_table test CREATE TABLE marker2_db . table2 ( s1 INTEGER ) ENGINE = innodb create table marker2_db.table2 (s1 int) engine=innodb
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (?) /* , ... */ insert into marker1_db.table1 values (1), (2), (3)
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker2_db . table1 VALUES (?) /* , ... */ insert into marker2_db.table1 values (1), (2), (3)
+[THREAD_ID] [EVENT_ID] statement/sql/alter_table test ALTER TABLE marker1_db . table1 ADD COLUMN ( s2 VARCHARACTER (?) ) alter table marker1_db.table1 add column (s2 varchar(32))
+[THREAD_ID] [EVENT_ID] statement/sql/insert test INSERT INTO marker1_db . table1 VALUES (...) /* , ... */ insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six')
+[THREAD_ID] [EVENT_ID] statement/sql/update test UPDATE marker1_db . table1 SET s1 = s1 + ? update marker1_db.table1 set s1 = s1 + 1
+[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM marker1_db . table1 WHERE s1 > ? delete from marker1_db.table1 where s1 > 4
+[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE `marker2_db` . `table1` DROP TABLE `marker2_db`.`table1` /* generated by server */
+[THREAD_ID] [EVENT_ID] statement/sql/drop_db marker2_db DROP SCHEMA marker2_db drop database marker2_db
+
+*** Compare master and slave events
+
+
+*** Event name comparison - expect 0 mismatches
+
+select thread_id, event_id, event_name, digest_text, sql_text from performance_schema.events_statements_history_long t1
+where t1.thread_id = @slave_thread_id and
+sql_text like '%marker%' and
+not exists (select * from master_events_statements_history_long t2 where t2.event_name = t1.event_name);
+thread_id event_id event_name digest_text sql_text
+
+*** Statement digest comparison - expect 1 mismatch for DROP TABLE
+
+select thread_id, event_id, event_name, digest, digest_text, sql_text from performance_schema.events_statements_history_long t1
+where t1.thread_id = @slave_thread_id and
+sql_text like '%marker%' and
+not exists (select * from master_events_statements_history_long t2 where t2.digest = t1.digest);
+thread_id event_id event_name digest digest_text sql_text
+[THREAD_ID] [EVENT_ID] statement/sql/drop_table [DIGEST] DROP TABLE `marker2_db` . `table1` DROP TABLE `marker2_db`.`table1` /* generated by server */
+
+#
+# STEP 6 - DISABLE REPLICATED STATEMENT EVENTS ON SLAVE
+#
+update performance_schema.setup_instruments set enabled='no', timed='no'
+ where name like '%statement/abstract/relay_log%';
+select * from performance_schema.setup_instruments where name like '%statement/abstract/relay_log%';
+NAME ENABLED TIMED
+statement/abstract/relay_log NO NO
+
+#
+# STEP 7 - UPDATE TABLES ON MASTER, REPLICATE
+#
+**************
+*** MASTER ***
+**************
+
+*** Clear statement events
+*** Update some tables, then replicate
+
+insert into marker1_db.table1 values (999, '999'), (998, '998'), (997, '997');
+
+#
+# STEP 8 - VERIFY TABLE UPDATES FROM MASTER, EXPECT NO STATEMENT EVENTS ON SLAVE
+#
+**************
+*** SLAVE ***
+**************
+
+*** Confirm rows were replicated
+
+select * from marker1_db.table1 where s1 > 900 order by s1;
+s1 s2
+997 997
+998 998
+999 999
+
+*** Confirm that are no statements events from the replication thread
+
+select * from performance_schema.events_statements_history_long
+where thread_id = @slave_thread_id;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
+
+#
+# STEP 9 - CLEAN UP
+#
+
+include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
index 2ea7d17a888..e502376b578 100644
--- a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
+++ b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
@@ -1,13 +1,18 @@
+#
+# Verify that the configuration file defaults were processed correctly
+#
SELECT * FROM performance_schema.setup_instruments
WHERE name IN (
'wait/synch/mutex/sql/LOCK_user_conn',
'wait/synch/mutex/sql/LOCK_uuid_generator',
-'wait/synch/mutex/sql/LOCK_xid_cache'
- 'stage/sql/creating table')
+'wait/synch/mutex/sql/LOCK_xid_cache',
+'stage/sql/creating table')
AND enabled = 'yes' AND timed = 'no'
ORDER BY name;
NAME ENABLED TIMED
+stage/sql/creating table YES NO
wait/synch/mutex/sql/LOCK_user_conn YES NO
+wait/synch/mutex/sql/LOCK_xid_cache YES NO
SELECT * FROM performance_schema.setup_instruments
WHERE name = 'wait/synch/mutex/sql/LOCK_thread_count'
AND enabled = 'no' AND timed = 'no';
@@ -23,13 +28,36 @@ NAME ENABLED TIMED
wait/synch/mutex/sql/LOG_INFO::lock YES YES
wait/synch/mutex/sql/THD::LOCK_thd_data YES YES
SELECT * FROM performance_schema.setup_instruments
-WHERE name IN (
-'wait/synch/mutex/sql/Delayed_insert::mutex',
-'wait/synch/mutex/sql/hash_filo::lock')
+WHERE name = 'wait/synch/mutex/sql/hash_filo::lock'
AND enabled = 'no' AND timed = 'no'
ORDER BY name;
NAME ENABLED TIMED
-wait/synch/mutex/sql/Delayed_insert::mutex NO NO
wait/synch/mutex/sql/hash_filo::lock NO NO
+#
+# Verify that the instrument startup settings are not not visible.
+#
SHOW VARIABLES LIKE "%/wait/synch/mutex%";
Variable_name Value
+#
+# Verify command line options are processed correctly
+#
+#
+# Verify that wait/io/table/sql/handler is enabled and timed
+#
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like "%wait/io/table/sql/handler%";
+NAME ENABLED TIMED
+wait/io/table/sql/handler YES YES
+#
+# Stop server
+# Restart server with wait/io/table/sql/handler disabled
+# Enable reconnect
+# Wait until connected again
+# Disable reconnect
+#
+# Verify that wait/io/table is disabled
+#
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like "%wait/io/table/sql/handler%";
+NAME ENABLED TIMED
+wait/io/table/sql/handler NO NO
diff --git a/mysql-test/suite/perfschema/r/sizing_default.result b/mysql-test/suite/perfschema/r/sizing_default.result
index 2a1a89dd4ba..ef7f7069c19 100644
--- a/mysql-test/suite/perfschema/r/sizing_default.result
+++ b/mysql-test/suite/perfschema/r/sizing_default.result
@@ -1,45 +1,45 @@
show variables like "table_definition_cache";
Variable_name Value
-table_definition_cache 400
+table_definition_cache 1400
show variables like "table_open_cache";
Variable_name Value
-table_open_cache 400
+table_open_cache 2000
show variables like "max_connections";
Variable_name Value
max_connections 151
show variables like "%performance_schema%";
Variable_name Value
performance_schema ON
-performance_schema_accounts_size 10
-performance_schema_digests_size 1000
-performance_schema_events_stages_history_long_size 100
-performance_schema_events_stages_history_size 5
-performance_schema_events_statements_history_long_size 100
-performance_schema_events_statements_history_size 5
-performance_schema_events_waits_history_long_size 100
-performance_schema_events_waits_history_size 5
-performance_schema_hosts_size 20
+performance_schema_accounts_size 100
+performance_schema_digests_size 10000
+performance_schema_events_stages_history_long_size 10000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 10000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
-performance_schema_max_cond_instances 836
+performance_schema_max_cond_instances 3504
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
-performance_schema_max_file_instances 1556
+performance_schema_max_file_instances 7693
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 3282
-performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 1724
+performance_schema_max_mutex_instances 15906
+performance_schema_max_rwlock_classes 40
+performance_schema_max_rwlock_instances 9102
performance_schema_max_socket_classes 10
-performance_schema_max_socket_instances 179
+performance_schema_max_socket_instances 322
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 167
-performance_schema_max_table_handles 445
-performance_schema_max_table_instances 445
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 4000
+performance_schema_max_table_instances 12500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 224
+performance_schema_max_thread_instances 402
performance_schema_session_connect_attrs_size 512
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
-performance_schema_users_size 5
+performance_schema_users_size 100
show status like "%performance_schema%";
Variable_name Value
Performance_schema_accounts_lost 0
@@ -68,19 +68,19 @@ Performance_schema_users_lost 0
show engine performance_schema status;
Type Name Status
performance_schema events_waits_current.row_size 184
-performance_schema events_waits_current.row_count 1344
+performance_schema events_waits_current.row_count 2412
performance_schema events_waits_history.row_size 184
-performance_schema events_waits_history.row_count 1120
-performance_schema events_waits_history.memory 206080
+performance_schema events_waits_history.row_count 4020
+performance_schema events_waits_history.memory 739680
performance_schema events_waits_history_long.row_size 184
-performance_schema events_waits_history_long.row_count 100
-performance_schema events_waits_history_long.memory 18400
+performance_schema events_waits_history_long.row_count 10000
+performance_schema events_waits_history_long.memory 1840000
performance_schema (pfs_mutex_class).row_size 256
performance_schema (pfs_mutex_class).row_count 200
performance_schema (pfs_mutex_class).memory 51200
performance_schema (pfs_rwlock_class).row_size 320
-performance_schema (pfs_rwlock_class).row_count 30
-performance_schema (pfs_rwlock_class).memory 9600
+performance_schema (pfs_rwlock_class).row_count 40
+performance_schema (pfs_rwlock_class).memory 12800
performance_schema (pfs_cond_class).row_size 256
performance_schema (pfs_cond_class).row_count 80
performance_schema (pfs_cond_class).memory 20480
@@ -91,32 +91,32 @@ performance_schema (pfs_file_class).row_size 320
performance_schema (pfs_file_class).row_count 50
performance_schema (pfs_file_class).memory 16000
performance_schema mutex_instances.row_size 128
-performance_schema mutex_instances.row_count 3282
-performance_schema mutex_instances.memory 420096
+performance_schema mutex_instances.row_count 15906
+performance_schema mutex_instances.memory 2035968
performance_schema rwlock_instances.row_size 192
-performance_schema rwlock_instances.row_count 1724
-performance_schema rwlock_instances.memory 331008
+performance_schema rwlock_instances.row_count 9102
+performance_schema rwlock_instances.memory 1747584
performance_schema cond_instances.row_size 128
-performance_schema cond_instances.row_count 836
-performance_schema cond_instances.memory 107008
-performance_schema threads.row_size 1856
-performance_schema threads.row_count 224
-performance_schema threads.memory 415744
+performance_schema cond_instances.row_count 3504
+performance_schema cond_instances.memory 448512
+performance_schema threads.row_size 2816
+performance_schema threads.row_count 402
+performance_schema threads.memory 1132032
performance_schema file_instances.row_size 704
-performance_schema file_instances.row_count 1556
-performance_schema file_instances.memory 1095424
+performance_schema file_instances.row_count 7693
+performance_schema file_instances.memory 5415872
performance_schema (pfs_file_handle).row_size 8
performance_schema (pfs_file_handle).row_count 32768
performance_schema (pfs_file_handle).memory 262144
performance_schema events_waits_summary_by_thread_by_event_name.row_size 32
-performance_schema events_waits_summary_by_thread_by_event_name.row_count 83552
-performance_schema events_waits_summary_by_thread_by_event_name.memory 2673664
+performance_schema events_waits_summary_by_thread_by_event_name.row_count 153966
+performance_schema events_waits_summary_by_thread_by_event_name.memory 4926912
performance_schema (pfs_table_share).row_size 22208
-performance_schema (pfs_table_share).row_count 445
-performance_schema (pfs_table_share).memory 9882560
+performance_schema (pfs_table_share).row_count 12500
+performance_schema (pfs_table_share).memory 277600000
performance_schema (pfs_table).row_size 9280
-performance_schema (pfs_table).row_count 445
-performance_schema (pfs_table).memory 4129600
+performance_schema (pfs_table).row_count 4000
+performance_schema (pfs_table).memory 37120000
performance_schema setup_actors.row_size 256
performance_schema setup_actors.row_count 100
performance_schema setup_actors.memory 25600
@@ -124,101 +124,101 @@ performance_schema setup_objects.row_size 448
performance_schema setup_objects.row_count 100
performance_schema setup_objects.memory 44800
performance_schema (pfs_account).row_size 256
-performance_schema (pfs_account).row_count 10
-performance_schema (pfs_account).memory 2560
+performance_schema (pfs_account).row_count 100
+performance_schema (pfs_account).memory 25600
performance_schema events_waits_summary_by_account_by_event_name.row_size 32
-performance_schema events_waits_summary_by_account_by_event_name.row_count 3730
-performance_schema events_waits_summary_by_account_by_event_name.memory 119360
+performance_schema events_waits_summary_by_account_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_account_by_event_name.memory 1225600
performance_schema events_waits_summary_by_user_by_event_name.row_size 32
-performance_schema events_waits_summary_by_user_by_event_name.row_count 1865
-performance_schema events_waits_summary_by_user_by_event_name.memory 59680
+performance_schema events_waits_summary_by_user_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_user_by_event_name.memory 1225600
performance_schema events_waits_summary_by_host_by_event_name.row_size 32
-performance_schema events_waits_summary_by_host_by_event_name.row_count 7460
-performance_schema events_waits_summary_by_host_by_event_name.memory 238720
+performance_schema events_waits_summary_by_host_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_host_by_event_name.memory 1225600
performance_schema (pfs_user).row_size 128
-performance_schema (pfs_user).row_count 5
-performance_schema (pfs_user).memory 640
+performance_schema (pfs_user).row_count 100
+performance_schema (pfs_user).memory 12800
performance_schema (pfs_host).row_size 128
-performance_schema (pfs_host).row_count 20
-performance_schema (pfs_host).memory 2560
-performance_schema (pfs_stage_class).row_size 192
+performance_schema (pfs_host).row_count 100
+performance_schema (pfs_host).memory 12800
+performance_schema (pfs_stage_class).row_size 256
performance_schema (pfs_stage_class).row_count 150
-performance_schema (pfs_stage_class).memory 28800
+performance_schema (pfs_stage_class).memory 38400
performance_schema events_stages_history.row_size 88
-performance_schema events_stages_history.row_count 1120
-performance_schema events_stages_history.memory 98560
+performance_schema events_stages_history.row_count 4020
+performance_schema events_stages_history.memory 353760
performance_schema events_stages_history_long.row_size 88
-performance_schema events_stages_history_long.row_count 100
-performance_schema events_stages_history_long.memory 8800
+performance_schema events_stages_history_long.row_count 10000
+performance_schema events_stages_history_long.memory 880000
performance_schema events_stages_summary_by_thread_by_event_name.row_size 32
-performance_schema events_stages_summary_by_thread_by_event_name.row_count 33600
-performance_schema events_stages_summary_by_thread_by_event_name.memory 1075200
+performance_schema events_stages_summary_by_thread_by_event_name.row_count 60300
+performance_schema events_stages_summary_by_thread_by_event_name.memory 1929600
performance_schema events_stages_summary_global_by_event_name.row_size 32
performance_schema events_stages_summary_global_by_event_name.row_count 150
performance_schema events_stages_summary_global_by_event_name.memory 4800
performance_schema events_stages_summary_by_account_by_event_name.row_size 32
-performance_schema events_stages_summary_by_account_by_event_name.row_count 1500
-performance_schema events_stages_summary_by_account_by_event_name.memory 48000
+performance_schema events_stages_summary_by_account_by_event_name.row_count 15000
+performance_schema events_stages_summary_by_account_by_event_name.memory 480000
performance_schema events_stages_summary_by_user_by_event_name.row_size 32
-performance_schema events_stages_summary_by_user_by_event_name.row_count 750
-performance_schema events_stages_summary_by_user_by_event_name.memory 24000
+performance_schema events_stages_summary_by_user_by_event_name.row_count 15000
+performance_schema events_stages_summary_by_user_by_event_name.memory 480000
performance_schema events_stages_summary_by_host_by_event_name.row_size 32
-performance_schema events_stages_summary_by_host_by_event_name.row_count 3000
-performance_schema events_stages_summary_by_host_by_event_name.memory 96000
+performance_schema events_stages_summary_by_host_by_event_name.row_count 15000
+performance_schema events_stages_summary_by_host_by_event_name.memory 480000
performance_schema (pfs_statement_class).row_size 192
-performance_schema (pfs_statement_class).row_count 167
-performance_schema (pfs_statement_class).memory 32064
+performance_schema (pfs_statement_class).row_count 168
+performance_schema (pfs_statement_class).memory 32256
performance_schema events_statements_history.row_size 3024
-performance_schema events_statements_history.row_count 1120
-performance_schema events_statements_history.memory 3386880
+performance_schema events_statements_history.row_count 4020
+performance_schema events_statements_history.memory 12156480
performance_schema events_statements_history_long.row_size 3024
-performance_schema events_statements_history_long.row_count 100
-performance_schema events_statements_history_long.memory 302400
+performance_schema events_statements_history_long.row_count 10000
+performance_schema events_statements_history_long.memory 30240000
performance_schema events_statements_summary_by_thread_by_event_name.row_size 184
-performance_schema events_statements_summary_by_thread_by_event_name.row_count 37408
-performance_schema events_statements_summary_by_thread_by_event_name.memory 6883072
+performance_schema events_statements_summary_by_thread_by_event_name.row_count 67536
+performance_schema events_statements_summary_by_thread_by_event_name.memory 12426624
performance_schema events_statements_summary_global_by_event_name.row_size 184
-performance_schema events_statements_summary_global_by_event_name.row_count 167
-performance_schema events_statements_summary_global_by_event_name.memory 30728
+performance_schema events_statements_summary_global_by_event_name.row_count 168
+performance_schema events_statements_summary_global_by_event_name.memory 30912
performance_schema events_statements_summary_by_account_by_event_name.row_size 184
-performance_schema events_statements_summary_by_account_by_event_name.row_count 1670
-performance_schema events_statements_summary_by_account_by_event_name.memory 307280
+performance_schema events_statements_summary_by_account_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_account_by_event_name.memory 3091200
performance_schema events_statements_summary_by_user_by_event_name.row_size 184
-performance_schema events_statements_summary_by_user_by_event_name.row_count 835
-performance_schema events_statements_summary_by_user_by_event_name.memory 153640
+performance_schema events_statements_summary_by_user_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_user_by_event_name.memory 3091200
performance_schema events_statements_summary_by_host_by_event_name.row_size 184
-performance_schema events_statements_summary_by_host_by_event_name.row_count 3340
-performance_schema events_statements_summary_by_host_by_event_name.memory 614560
+performance_schema events_statements_summary_by_host_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_host_by_event_name.memory 3091200
performance_schema events_statements_current.row_size 3024
-performance_schema events_statements_current.row_count 224
-performance_schema events_statements_current.memory 677376
+performance_schema events_statements_current.row_count 402
+performance_schema events_statements_current.memory 1215648
performance_schema (pfs_socket_class).row_size 320
performance_schema (pfs_socket_class).row_count 10
performance_schema (pfs_socket_class).memory 3200
performance_schema socket_instances.row_size 320
-performance_schema socket_instances.row_count 179
-performance_schema socket_instances.memory 57280
+performance_schema socket_instances.row_count 322
+performance_schema socket_instances.memory 103040
performance_schema events_statements_summary_by_digest.row_size 1472
-performance_schema events_statements_summary_by_digest.row_count 1000
-performance_schema events_statements_summary_by_digest.memory 1472000
-performance_schema session_connect_attrs.row_size 224
+performance_schema events_statements_summary_by_digest.row_count 10000
+performance_schema events_statements_summary_by_digest.memory 14720000
+performance_schema session_connect_attrs.row_size 402
performance_schema session_connect_attrs.row_count 512
-performance_schema session_connect_attrs.memory 114688
+performance_schema session_connect_attrs.memory 205824
performance_schema (account_hash).count 2
-performance_schema (account_hash).size 10
+performance_schema (account_hash).size 100
performance_schema (digest_hash).count 0
-performance_schema (digest_hash).size 1000
+performance_schema (digest_hash).size 10000
performance_schema (filename_hash).count 0
-performance_schema (filename_hash).size 1556
+performance_schema (filename_hash).size 7693
performance_schema (host_hash).count 2
-performance_schema (host_hash).size 20
+performance_schema (host_hash).size 100
performance_schema (setup_actor_hash).count 1
performance_schema (setup_actor_hash).size 100
performance_schema (setup_object_hash).count 4
performance_schema (setup_object_hash).size 100
-performance_schema (table_share_hash).count 82
-performance_schema (table_share_hash).size 445
+performance_schema (table_share_hash).count 80
+performance_schema (table_share_hash).size 12500
performance_schema (user_hash).count 2
-performance_schema (user_hash).size 5
+performance_schema (user_hash).size 100
performance_schema host_cache.size 336
-performance_schema performance_schema.memory 35561856
+performance_schema performance_schema.memory 422231328
diff --git a/mysql-test/suite/perfschema/r/sizing_high.result b/mysql-test/suite/perfschema/r/sizing_high.result
index 6e7a1abe8a2..4d63c970782 100644
--- a/mysql-test/suite/perfschema/r/sizing_high.result
+++ b/mysql-test/suite/perfschema/r/sizing_high.result
@@ -26,12 +26,12 @@ performance_schema_max_file_handles 32768
performance_schema_max_file_instances 23385
performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 52200
-performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_classes 40
performance_schema_max_rwlock_instances 30800
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 420
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 167
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 800
performance_schema_max_table_instances 12500
performance_schema_max_thread_classes 50
@@ -79,8 +79,8 @@ performance_schema (pfs_mutex_class).row_size 256
performance_schema (pfs_mutex_class).row_count 200
performance_schema (pfs_mutex_class).memory 51200
performance_schema (pfs_rwlock_class).row_size 320
-performance_schema (pfs_rwlock_class).row_count 30
-performance_schema (pfs_rwlock_class).memory 9600
+performance_schema (pfs_rwlock_class).row_count 40
+performance_schema (pfs_rwlock_class).memory 12800
performance_schema (pfs_cond_class).row_size 256
performance_schema (pfs_cond_class).row_count 80
performance_schema (pfs_cond_class).memory 20480
@@ -99,9 +99,9 @@ performance_schema rwlock_instances.memory 5913600
performance_schema cond_instances.row_size 128
performance_schema cond_instances.row_count 10900
performance_schema cond_instances.memory 1395200
-performance_schema threads.row_size 1856
+performance_schema threads.row_size 2816
performance_schema threads.row_count 500
-performance_schema threads.memory 928000
+performance_schema threads.memory 1408000
performance_schema file_instances.row_size 704
performance_schema file_instances.row_count 23385
performance_schema file_instances.memory 16463040
@@ -109,8 +109,8 @@ performance_schema (pfs_file_handle).row_size 8
performance_schema (pfs_file_handle).row_count 32768
performance_schema (pfs_file_handle).memory 262144
performance_schema events_waits_summary_by_thread_by_event_name.row_size 32
-performance_schema events_waits_summary_by_thread_by_event_name.row_count 186500
-performance_schema events_waits_summary_by_thread_by_event_name.memory 5968000
+performance_schema events_waits_summary_by_thread_by_event_name.row_count 191500
+performance_schema events_waits_summary_by_thread_by_event_name.memory 6128000
performance_schema (pfs_table_share).row_size 22208
performance_schema (pfs_table_share).row_count 12500
performance_schema (pfs_table_share).memory 277600000
@@ -127,23 +127,23 @@ performance_schema (pfs_account).row_size 256
performance_schema (pfs_account).row_count 100
performance_schema (pfs_account).memory 25600
performance_schema events_waits_summary_by_account_by_event_name.row_size 32
-performance_schema events_waits_summary_by_account_by_event_name.row_count 37300
-performance_schema events_waits_summary_by_account_by_event_name.memory 1193600
+performance_schema events_waits_summary_by_account_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_account_by_event_name.memory 1225600
performance_schema events_waits_summary_by_user_by_event_name.row_size 32
-performance_schema events_waits_summary_by_user_by_event_name.row_count 37300
-performance_schema events_waits_summary_by_user_by_event_name.memory 1193600
+performance_schema events_waits_summary_by_user_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_user_by_event_name.memory 1225600
performance_schema events_waits_summary_by_host_by_event_name.row_size 32
-performance_schema events_waits_summary_by_host_by_event_name.row_count 37300
-performance_schema events_waits_summary_by_host_by_event_name.memory 1193600
+performance_schema events_waits_summary_by_host_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_host_by_event_name.memory 1225600
performance_schema (pfs_user).row_size 128
performance_schema (pfs_user).row_count 100
performance_schema (pfs_user).memory 12800
performance_schema (pfs_host).row_size 128
performance_schema (pfs_host).row_count 100
performance_schema (pfs_host).memory 12800
-performance_schema (pfs_stage_class).row_size 192
+performance_schema (pfs_stage_class).row_size 256
performance_schema (pfs_stage_class).row_count 150
-performance_schema (pfs_stage_class).memory 28800
+performance_schema (pfs_stage_class).memory 38400
performance_schema events_stages_history.row_size 88
performance_schema events_stages_history.row_count 5000
performance_schema events_stages_history.memory 440000
@@ -166,8 +166,8 @@ performance_schema events_stages_summary_by_host_by_event_name.row_size 32
performance_schema events_stages_summary_by_host_by_event_name.row_count 15000
performance_schema events_stages_summary_by_host_by_event_name.memory 480000
performance_schema (pfs_statement_class).row_size 192
-performance_schema (pfs_statement_class).row_count 167
-performance_schema (pfs_statement_class).memory 32064
+performance_schema (pfs_statement_class).row_count 168
+performance_schema (pfs_statement_class).memory 32256
performance_schema events_statements_history.row_size 3024
performance_schema events_statements_history.row_count 5000
performance_schema events_statements_history.memory 15120000
@@ -175,20 +175,20 @@ performance_schema events_statements_history_long.row_size 3024
performance_schema events_statements_history_long.row_count 10000
performance_schema events_statements_history_long.memory 30240000
performance_schema events_statements_summary_by_thread_by_event_name.row_size 184
-performance_schema events_statements_summary_by_thread_by_event_name.row_count 83500
-performance_schema events_statements_summary_by_thread_by_event_name.memory 15364000
+performance_schema events_statements_summary_by_thread_by_event_name.row_count 84000
+performance_schema events_statements_summary_by_thread_by_event_name.memory 15456000
performance_schema events_statements_summary_global_by_event_name.row_size 184
-performance_schema events_statements_summary_global_by_event_name.row_count 167
-performance_schema events_statements_summary_global_by_event_name.memory 30728
+performance_schema events_statements_summary_global_by_event_name.row_count 168
+performance_schema events_statements_summary_global_by_event_name.memory 30912
performance_schema events_statements_summary_by_account_by_event_name.row_size 184
-performance_schema events_statements_summary_by_account_by_event_name.row_count 16700
-performance_schema events_statements_summary_by_account_by_event_name.memory 3072800
+performance_schema events_statements_summary_by_account_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_account_by_event_name.memory 3091200
performance_schema events_statements_summary_by_user_by_event_name.row_size 184
-performance_schema events_statements_summary_by_user_by_event_name.row_count 16700
-performance_schema events_statements_summary_by_user_by_event_name.memory 3072800
+performance_schema events_statements_summary_by_user_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_user_by_event_name.memory 3091200
performance_schema events_statements_summary_by_host_by_event_name.row_size 184
-performance_schema events_statements_summary_by_host_by_event_name.row_count 16700
-performance_schema events_statements_summary_by_host_by_event_name.memory 3072800
+performance_schema events_statements_summary_by_host_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_host_by_event_name.memory 3091200
performance_schema events_statements_current.row_size 3024
performance_schema events_statements_current.row_count 500
performance_schema events_statements_current.memory 1512000
@@ -216,9 +216,9 @@ performance_schema (setup_actor_hash).count 1
performance_schema (setup_actor_hash).size 100
performance_schema (setup_object_hash).count 4
performance_schema (setup_object_hash).size 100
-performance_schema (table_share_hash).count 82
+performance_schema (table_share_hash).count 80
performance_schema (table_share_hash).size 12500
performance_schema (user_hash).count 2
performance_schema (user_hash).size 100
performance_schema host_cache.size 336
-performance_schema performance_schema.memory 421029256
+performance_schema performance_schema.memory 421925632
diff --git a/mysql-test/suite/perfschema/r/sizing_low.result b/mysql-test/suite/perfschema/r/sizing_low.result
index 19c6e36868b..d5aab2c2df3 100644
--- a/mysql-test/suite/perfschema/r/sizing_low.result
+++ b/mysql-test/suite/perfschema/r/sizing_low.result
@@ -26,12 +26,12 @@ performance_schema_max_file_handles 32768
performance_schema_max_file_instances 1556
performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 2945
-performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_classes 40
performance_schema_max_rwlock_instances 1612
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 67
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 167
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 112
performance_schema_max_table_instances 445
performance_schema_max_thread_classes 50
@@ -79,8 +79,8 @@ performance_schema (pfs_mutex_class).row_size 256
performance_schema (pfs_mutex_class).row_count 200
performance_schema (pfs_mutex_class).memory 51200
performance_schema (pfs_rwlock_class).row_size 320
-performance_schema (pfs_rwlock_class).row_count 30
-performance_schema (pfs_rwlock_class).memory 9600
+performance_schema (pfs_rwlock_class).row_count 40
+performance_schema (pfs_rwlock_class).memory 12800
performance_schema (pfs_cond_class).row_size 256
performance_schema (pfs_cond_class).row_count 80
performance_schema (pfs_cond_class).memory 20480
@@ -99,9 +99,9 @@ performance_schema rwlock_instances.memory 309504
performance_schema cond_instances.row_size 128
performance_schema cond_instances.row_count 612
performance_schema cond_instances.memory 78336
-performance_schema threads.row_size 1856
+performance_schema threads.row_size 2816
performance_schema threads.row_count 112
-performance_schema threads.memory 207872
+performance_schema threads.memory 315392
performance_schema file_instances.row_size 704
performance_schema file_instances.row_count 1556
performance_schema file_instances.memory 1095424
@@ -109,8 +109,8 @@ performance_schema (pfs_file_handle).row_size 8
performance_schema (pfs_file_handle).row_count 32768
performance_schema (pfs_file_handle).memory 262144
performance_schema events_waits_summary_by_thread_by_event_name.row_size 32
-performance_schema events_waits_summary_by_thread_by_event_name.row_count 41776
-performance_schema events_waits_summary_by_thread_by_event_name.memory 1336832
+performance_schema events_waits_summary_by_thread_by_event_name.row_count 42896
+performance_schema events_waits_summary_by_thread_by_event_name.memory 1372672
performance_schema (pfs_table_share).row_size 22208
performance_schema (pfs_table_share).row_count 445
performance_schema (pfs_table_share).memory 9882560
@@ -127,23 +127,23 @@ performance_schema (pfs_account).row_size 256
performance_schema (pfs_account).row_count 10
performance_schema (pfs_account).memory 2560
performance_schema events_waits_summary_by_account_by_event_name.row_size 32
-performance_schema events_waits_summary_by_account_by_event_name.row_count 3730
-performance_schema events_waits_summary_by_account_by_event_name.memory 119360
+performance_schema events_waits_summary_by_account_by_event_name.row_count 3830
+performance_schema events_waits_summary_by_account_by_event_name.memory 122560
performance_schema events_waits_summary_by_user_by_event_name.row_size 32
-performance_schema events_waits_summary_by_user_by_event_name.row_count 1865
-performance_schema events_waits_summary_by_user_by_event_name.memory 59680
+performance_schema events_waits_summary_by_user_by_event_name.row_count 1915
+performance_schema events_waits_summary_by_user_by_event_name.memory 61280
performance_schema events_waits_summary_by_host_by_event_name.row_size 32
-performance_schema events_waits_summary_by_host_by_event_name.row_count 7460
-performance_schema events_waits_summary_by_host_by_event_name.memory 238720
+performance_schema events_waits_summary_by_host_by_event_name.row_count 7660
+performance_schema events_waits_summary_by_host_by_event_name.memory 245120
performance_schema (pfs_user).row_size 128
performance_schema (pfs_user).row_count 5
performance_schema (pfs_user).memory 640
performance_schema (pfs_host).row_size 128
performance_schema (pfs_host).row_count 20
performance_schema (pfs_host).memory 2560
-performance_schema (pfs_stage_class).row_size 192
+performance_schema (pfs_stage_class).row_size 256
performance_schema (pfs_stage_class).row_count 150
-performance_schema (pfs_stage_class).memory 28800
+performance_schema (pfs_stage_class).memory 38400
performance_schema events_stages_history.row_size 88
performance_schema events_stages_history.row_count 560
performance_schema events_stages_history.memory 49280
@@ -166,8 +166,8 @@ performance_schema events_stages_summary_by_host_by_event_name.row_size 32
performance_schema events_stages_summary_by_host_by_event_name.row_count 3000
performance_schema events_stages_summary_by_host_by_event_name.memory 96000
performance_schema (pfs_statement_class).row_size 192
-performance_schema (pfs_statement_class).row_count 167
-performance_schema (pfs_statement_class).memory 32064
+performance_schema (pfs_statement_class).row_count 168
+performance_schema (pfs_statement_class).memory 32256
performance_schema events_statements_history.row_size 3024
performance_schema events_statements_history.row_count 560
performance_schema events_statements_history.memory 1693440
@@ -175,20 +175,20 @@ performance_schema events_statements_history_long.row_size 3024
performance_schema events_statements_history_long.row_count 100
performance_schema events_statements_history_long.memory 302400
performance_schema events_statements_summary_by_thread_by_event_name.row_size 184
-performance_schema events_statements_summary_by_thread_by_event_name.row_count 18704
-performance_schema events_statements_summary_by_thread_by_event_name.memory 3441536
+performance_schema events_statements_summary_by_thread_by_event_name.row_count 18816
+performance_schema events_statements_summary_by_thread_by_event_name.memory 3462144
performance_schema events_statements_summary_global_by_event_name.row_size 184
-performance_schema events_statements_summary_global_by_event_name.row_count 167
-performance_schema events_statements_summary_global_by_event_name.memory 30728
+performance_schema events_statements_summary_global_by_event_name.row_count 168
+performance_schema events_statements_summary_global_by_event_name.memory 30912
performance_schema events_statements_summary_by_account_by_event_name.row_size 184
-performance_schema events_statements_summary_by_account_by_event_name.row_count 1670
-performance_schema events_statements_summary_by_account_by_event_name.memory 307280
+performance_schema events_statements_summary_by_account_by_event_name.row_count 1680
+performance_schema events_statements_summary_by_account_by_event_name.memory 309120
performance_schema events_statements_summary_by_user_by_event_name.row_size 184
-performance_schema events_statements_summary_by_user_by_event_name.row_count 835
-performance_schema events_statements_summary_by_user_by_event_name.memory 153640
+performance_schema events_statements_summary_by_user_by_event_name.row_count 840
+performance_schema events_statements_summary_by_user_by_event_name.memory 154560
performance_schema events_statements_summary_by_host_by_event_name.row_size 184
-performance_schema events_statements_summary_by_host_by_event_name.row_count 3340
-performance_schema events_statements_summary_by_host_by_event_name.memory 614560
+performance_schema events_statements_summary_by_host_by_event_name.row_count 3360
+performance_schema events_statements_summary_by_host_by_event_name.memory 618240
performance_schema events_statements_current.row_size 3024
performance_schema events_statements_current.row_count 112
performance_schema events_statements_current.memory 338688
@@ -216,9 +216,9 @@ performance_schema (setup_actor_hash).count 1
performance_schema (setup_actor_hash).size 100
performance_schema (setup_object_hash).count 4
performance_schema (setup_object_hash).size 100
-performance_schema (table_share_hash).count 82
+performance_schema (table_share_hash).count 80
performance_schema (table_share_hash).size 445
performance_schema (user_hash).count 2
performance_schema (user_hash).size 5
performance_schema host_cache.size 336
-performance_schema performance_schema.memory 24576832
+performance_schema performance_schema.memory 24771616
diff --git a/mysql-test/suite/perfschema/r/sizing_med.result b/mysql-test/suite/perfschema/r/sizing_med.result
index 4fbf4ac08de..c2e7a4df4bf 100644
--- a/mysql-test/suite/perfschema/r/sizing_med.result
+++ b/mysql-test/suite/perfschema/r/sizing_med.result
@@ -26,12 +26,12 @@ performance_schema_max_file_handles 32768
performance_schema_max_file_instances 1754
performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 4230
-performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_classes 40
performance_schema_max_rwlock_instances 2222
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 232
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 167
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 573
performance_schema_max_table_instances 556
performance_schema_max_thread_classes 50
@@ -79,8 +79,8 @@ performance_schema (pfs_mutex_class).row_size 256
performance_schema (pfs_mutex_class).row_count 200
performance_schema (pfs_mutex_class).memory 51200
performance_schema (pfs_rwlock_class).row_size 320
-performance_schema (pfs_rwlock_class).row_count 30
-performance_schema (pfs_rwlock_class).memory 9600
+performance_schema (pfs_rwlock_class).row_count 40
+performance_schema (pfs_rwlock_class).memory 12800
performance_schema (pfs_cond_class).row_size 256
performance_schema (pfs_cond_class).row_count 80
performance_schema (pfs_cond_class).memory 20480
@@ -99,9 +99,9 @@ performance_schema rwlock_instances.memory 426624
performance_schema cond_instances.row_size 128
performance_schema cond_instances.row_count 1079
performance_schema cond_instances.memory 138112
-performance_schema threads.row_size 1856
+performance_schema threads.row_size 2816
performance_schema threads.row_count 289
-performance_schema threads.memory 536384
+performance_schema threads.memory 813824
performance_schema file_instances.row_size 704
performance_schema file_instances.row_count 1754
performance_schema file_instances.memory 1234816
@@ -109,8 +109,8 @@ performance_schema (pfs_file_handle).row_size 8
performance_schema (pfs_file_handle).row_count 32768
performance_schema (pfs_file_handle).memory 262144
performance_schema events_waits_summary_by_thread_by_event_name.row_size 32
-performance_schema events_waits_summary_by_thread_by_event_name.row_count 107797
-performance_schema events_waits_summary_by_thread_by_event_name.memory 3449504
+performance_schema events_waits_summary_by_thread_by_event_name.row_count 110687
+performance_schema events_waits_summary_by_thread_by_event_name.memory 3541984
performance_schema (pfs_table_share).row_size 22208
performance_schema (pfs_table_share).row_count 556
performance_schema (pfs_table_share).memory 12347648
@@ -127,23 +127,23 @@ performance_schema (pfs_account).row_size 256
performance_schema (pfs_account).row_count 100
performance_schema (pfs_account).memory 25600
performance_schema events_waits_summary_by_account_by_event_name.row_size 32
-performance_schema events_waits_summary_by_account_by_event_name.row_count 37300
-performance_schema events_waits_summary_by_account_by_event_name.memory 1193600
+performance_schema events_waits_summary_by_account_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_account_by_event_name.memory 1225600
performance_schema events_waits_summary_by_user_by_event_name.row_size 32
-performance_schema events_waits_summary_by_user_by_event_name.row_count 37300
-performance_schema events_waits_summary_by_user_by_event_name.memory 1193600
+performance_schema events_waits_summary_by_user_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_user_by_event_name.memory 1225600
performance_schema events_waits_summary_by_host_by_event_name.row_size 32
-performance_schema events_waits_summary_by_host_by_event_name.row_count 37300
-performance_schema events_waits_summary_by_host_by_event_name.memory 1193600
+performance_schema events_waits_summary_by_host_by_event_name.row_count 38300
+performance_schema events_waits_summary_by_host_by_event_name.memory 1225600
performance_schema (pfs_user).row_size 128
performance_schema (pfs_user).row_count 100
performance_schema (pfs_user).memory 12800
performance_schema (pfs_host).row_size 128
performance_schema (pfs_host).row_count 100
performance_schema (pfs_host).memory 12800
-performance_schema (pfs_stage_class).row_size 192
+performance_schema (pfs_stage_class).row_size 256
performance_schema (pfs_stage_class).row_count 150
-performance_schema (pfs_stage_class).memory 28800
+performance_schema (pfs_stage_class).memory 38400
performance_schema events_stages_history.row_size 88
performance_schema events_stages_history.row_count 2890
performance_schema events_stages_history.memory 254320
@@ -166,8 +166,8 @@ performance_schema events_stages_summary_by_host_by_event_name.row_size 32
performance_schema events_stages_summary_by_host_by_event_name.row_count 15000
performance_schema events_stages_summary_by_host_by_event_name.memory 480000
performance_schema (pfs_statement_class).row_size 192
-performance_schema (pfs_statement_class).row_count 167
-performance_schema (pfs_statement_class).memory 32064
+performance_schema (pfs_statement_class).row_count 168
+performance_schema (pfs_statement_class).memory 32256
performance_schema events_statements_history.row_size 3024
performance_schema events_statements_history.row_count 2890
performance_schema events_statements_history.memory 8739360
@@ -175,20 +175,20 @@ performance_schema events_statements_history_long.row_size 3024
performance_schema events_statements_history_long.row_count 1000
performance_schema events_statements_history_long.memory 3024000
performance_schema events_statements_summary_by_thread_by_event_name.row_size 184
-performance_schema events_statements_summary_by_thread_by_event_name.row_count 48263
-performance_schema events_statements_summary_by_thread_by_event_name.memory 8880392
+performance_schema events_statements_summary_by_thread_by_event_name.row_count 48552
+performance_schema events_statements_summary_by_thread_by_event_name.memory 8933568
performance_schema events_statements_summary_global_by_event_name.row_size 184
-performance_schema events_statements_summary_global_by_event_name.row_count 167
-performance_schema events_statements_summary_global_by_event_name.memory 30728
+performance_schema events_statements_summary_global_by_event_name.row_count 168
+performance_schema events_statements_summary_global_by_event_name.memory 30912
performance_schema events_statements_summary_by_account_by_event_name.row_size 184
-performance_schema events_statements_summary_by_account_by_event_name.row_count 16700
-performance_schema events_statements_summary_by_account_by_event_name.memory 3072800
+performance_schema events_statements_summary_by_account_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_account_by_event_name.memory 3091200
performance_schema events_statements_summary_by_user_by_event_name.row_size 184
-performance_schema events_statements_summary_by_user_by_event_name.row_count 16700
-performance_schema events_statements_summary_by_user_by_event_name.memory 3072800
+performance_schema events_statements_summary_by_user_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_user_by_event_name.memory 3091200
performance_schema events_statements_summary_by_host_by_event_name.row_size 184
-performance_schema events_statements_summary_by_host_by_event_name.row_count 16700
-performance_schema events_statements_summary_by_host_by_event_name.memory 3072800
+performance_schema events_statements_summary_by_host_by_event_name.row_count 16800
+performance_schema events_statements_summary_by_host_by_event_name.memory 3091200
performance_schema events_statements_current.row_size 3024
performance_schema events_statements_current.row_count 289
performance_schema events_statements_current.memory 873936
@@ -216,9 +216,9 @@ performance_schema (setup_actor_hash).count 1
performance_schema (setup_actor_hash).size 100
performance_schema (setup_object_hash).count 4
performance_schema (setup_object_hash).size 100
-performance_schema (table_share_hash).count 82
+performance_schema (table_share_hash).count 80
performance_schema (table_share_hash).size 556
performance_schema (user_hash).count 2
performance_schema (user_hash).size 100
performance_schema host_cache.size 336
-performance_schema performance_schema.memory 70366560
+performance_schema performance_schema.memory 70954032
diff --git a/mysql-test/suite/perfschema/r/sizing_off.result b/mysql-test/suite/perfschema/r/sizing_off.result
index 79059b7efb4..0d95a8c0f1b 100644
--- a/mysql-test/suite/perfschema/r/sizing_off.result
+++ b/mysql-test/suite/perfschema/r/sizing_off.result
@@ -17,12 +17,12 @@ performance_schema_max_file_handles 32768
performance_schema_max_file_instances -1
performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances -1
-performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_classes 40
performance_schema_max_rwlock_instances -1
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances -1
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 167
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles -1
performance_schema_max_table_instances -1
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
index dc652f8bbbf..b27ecd52226 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
index 2984360fad9..0b8e00a5653 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
index 2f0cff977e7..8e8d1498b9f 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
index 1a1062d3201..d4b02dedc2c 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
index 58d4e611812..0d7ea7d6294 100644
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result
index cf5b5ba09e0..b9ec719ed58 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
index 805bb3a2cce..4fac77bc0cc 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
index 172ca779e18..75cd54776eb 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
index e8c1580fd03..9922fcaa016 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
index 02be2fe9585..6e8735f6a1f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result
index 7d5fdaf7134..f5dae7c61d9 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
index 1ee6c681d01..4b3c8790b58 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
index 6d51baa0d2f..92ec4cf61fc 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
index 7bead1375fe..e4ac0d0fa8b 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
index f4a6264e573..3bba543f3b8 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 0
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
index 6f2dc52e485..2c3ef382fb9 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
index 210a5e677e9..0b49b4d055a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
index e495686fa63..9cf73c2b78d 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 0
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
index 474875f2de7..6da66d6ee75 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 0
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
index 6ccd55451ac..532935bb0ff 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 0
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
index 6443cba13df..360571bc326 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
index ad44f26b880..d458e3da9b1 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
index cd21d415dad..2682ea22f88 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
index 2fa222208b3..9568e9ad56b 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
index 46d18a2e354..c189d9a5024 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 0
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
index a098c3556f0..a440cfe3302 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 0
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
index da1de089ef8..d9c945ea8cb 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
index e8663c0baf3..f5ce5bebb51 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result
index 84c9da61842..53cb0051f97 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
index ba1b38ec1ae..125274550eb 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
index db1f905da73..50212863574 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index 9d1259394a3..08847829579 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index 58d4e611812..0d7ea7d6294 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -93,7 +93,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
index b4af9d021ef..ea2980e5755 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
index 6ccc81c5581..f51e8383019 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
index b7ed12e9f00..a7844b6b0e6 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
index 4f45ae0fedd..4d089c810a1 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
index 937a6bc11f4..23bd1294445 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
@@ -61,7 +61,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
index d6436c2f4ac..7edfc3824bb 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
@@ -60,7 +60,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
index fa805e36760..99d2e7d4655 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
@@ -61,7 +61,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
index 5b0105ab137..f8c660bd932 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
@@ -60,7 +60,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result
index 62d619854a8..73ed3550a77 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_off.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
index 7c91487477c..3906c6f6b84 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
index e4a3aabd51b..0b579f54a66 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
index f6d2ac4fb19..e137525e5b0 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
index f76b83d2854..799555b685e 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
index a5c6f669eb6..bf920a30af3 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
index a327eadeb75..d100f2a5e08 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
index 2cd3cd51329..a5d046f154c 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
index 40eb000ea84..413a566fefb 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
index bc348ffdd1c..4a5e7aeede1 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
index 5f30bde9421..25ba676993a 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
index 9a147466a78..41292e5913e 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
index 63b1f709b72..fc7c523ed8c 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
index ac740035848..210928a0c04 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
index 8fa0ff230e3..9df65066d45 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
index 83d70261823..a9109fa42d2 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
index 5dac5f5b83a..542b020f77a 100644
--- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
index f702ebadfc0..ece0dadebd0 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
index 693723f6538..956540b9327 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
index 274b9c22b9f..72f0240c6be 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
index 2cf43f9b47a..a93cc1b6499 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
index 412353b73dd..0e1b7032af6 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
index 487bc91e784..fb1fd8fb207 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
index 1fe09b3008f..f97272634b9 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
@@ -63,7 +63,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
index 5bbd3ca022c..ddf8ef7bf9d 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
@@ -62,7 +62,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
index 4fd4f505454..588a378024a 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
index a3e0129bb70..76c466d48cc 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
index 3edba653026..2450456355a 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
@@ -65,7 +65,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
index 461ff5da3dd..72b46a2820b 100644
--- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
@@ -64,7 +64,7 @@ performance_schema_max_rwlock_instances 5000
performance_schema_max_socket_classes 10
performance_schema_max_socket_instances 1000
performance_schema_max_stage_classes 150
-performance_schema_max_statement_classes 179
+performance_schema_max_statement_classes 180
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
diff --git a/mysql-test/suite/perfschema/t/disabled.def b/mysql-test/suite/perfschema/t/disabled.def
index 79b31af3066..888298bbb09 100644
--- a/mysql-test/suite/perfschema/t/disabled.def
+++ b/mysql-test/suite/perfschema/t/disabled.def
@@ -9,5 +9,3 @@
# Do not use any TAB characters for whitespace.
#
##############################################################################
-hostcache_ipv4_max_con : BUG#14627287 27th Sept, 2012 Mayank
-hostcache_ipv6_max_con : BUG#14627287 27th Sept, 2012 Mayank
diff --git a/mysql-test/suite/perfschema/t/event_aggregate.test b/mysql-test/suite/perfschema/t/event_aggregate.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_h.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_a_no_u_no_h.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_h.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_h.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_u.test b/mysql-test/suite/perfschema/t/event_aggregate_no_u.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_u.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_u.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test b/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test
index c1a895ec549..372cda050ee 100644
--- a/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test
+++ b/mysql-test/suite/perfschema/t/event_aggregate_no_u_no_h.test
@@ -4,4 +4,3 @@
--source ../include/event_aggregate_setup.inc
--source ../include/event_aggregate_load.inc
--source ../include/event_aggregate_cleanup.inc
-
diff --git a/mysql-test/suite/perfschema/t/func_file_io.test b/mysql-test/suite/perfschema/t/func_file_io.test
index 014ab5e0731..2055fa9a008 100644
--- a/mysql-test/suite/perfschema/t/func_file_io.test
+++ b/mysql-test/suite/perfschema/t/func_file_io.test
@@ -16,6 +16,7 @@ update performance_schema.threads SET instrumented = 'YES'
WHERE PROCESSLIST_ID=connection_id();
# reset lost counters
+truncate table performance_schema.events_statements_summary_by_digest;
flush status;
--disable_warnings
diff --git a/mysql-test/suite/perfschema/t/func_mutex.test b/mysql-test/suite/perfschema/t/func_mutex.test
index 01bf7e14d96..ca1feb68091 100644
--- a/mysql-test/suite/perfschema/t/func_mutex.test
+++ b/mysql-test/suite/perfschema/t/func_mutex.test
@@ -14,6 +14,7 @@ WHERE name LIKE 'wait/synch/mutex/%'
OR name LIKE 'wait/synch/rwlock/%';
# reset lost counters
+truncate table performance_schema.events_statements_summary_by_digest;
flush status;
# Make sure objects are instrumented
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
index 4e735156c4b..7c89aa3d44e 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv4_blocked.test
@@ -18,10 +18,13 @@
select @@global.max_connect_errors into @saved_max_connect_errors;
-set global max_connect_errors = 2;
+set global max_connect_errors = 3;
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+create user 'quota'@'santa.claus.ipv4.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
+
connect (con1,"127.0.0.1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
select current_user();
@@ -75,7 +78,70 @@ flush hosts;
--disable_query_log
--error ER_HANDSHAKE_ERROR
-connect (con2c,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+connect (con3a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_ERROR
+connect (con3b,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--connection default
+set global debug_dbug= "-d,native_password_bad_reply";
+
+--disable_query_log
+connect (con4,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+select "Valid connection should reset SUM_CONNECT_ERROR counter" as message;
+--disconnect con4
+--enable_query_log
+
+--connection default
+set global debug_dbug= "+d,native_password_bad_reply";
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_ERROR
+connect (con5a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_ERROR
+connect (con5b,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_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_HOST_IS_BLOCKED
+connect (con5d,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HOST_IS_BLOCKED
+connect (con5e,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
--enable_query_log
--connection default
@@ -84,6 +150,9 @@ connect (con2c,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
drop user 'root'@'santa.claus.ipv4.example.com';
+revoke select on test.* from 'quota'@'santa.claus.ipv4.example.com';
+drop user 'quota'@'santa.claus.ipv4.example.com';
+
set global max_connect_errors = @saved_max_connect_errors;
set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test
index 4d3defe77cc..9d4707dc027 100644
--- a/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test
+++ b/mysql-test/suite/perfschema/t/hostcache_ipv6_blocked.test
@@ -19,10 +19,13 @@
select @@global.max_connect_errors into @saved_max_connect_errors;
-set global max_connect_errors = 2;
+set global max_connect_errors = 3;
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+create user 'quota'@'santa.claus.ipv6.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
+
connect (con1,"::1",root,,test,$MASTER_MYPORT,);
select "Con1 is alive";
select current_user();
@@ -76,7 +79,70 @@ flush hosts;
--disable_query_log
--error ER_HANDSHAKE_ERROR
-connect (con2c,"::1",quota,,test,$MASTER_MYPORT,);
+connect (con3a,"::1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_ERROR
+connect (con3b,"::1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--connection default
+set global debug_dbug= "-d,native_password_bad_reply";
+
+--disable_query_log
+connect (con4,"::1",quota,,test,$MASTER_MYPORT,);
+select "Valid connection should reset SUM_CONNECT_ERROR counter" as message;
+--disconnect con4
+--enable_query_log
+
+--connection default
+set global debug_dbug= "+d,native_password_bad_reply";
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_ERROR
+connect (con5a,"::1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_ERROR
+connect (con5b,"::1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HANDSHAKE_ERROR
+connect (con5c,"::1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HOST_IS_BLOCKED
+connect (con5d,"::1",quota,,test,$MASTER_MYPORT,);
+--enable_query_log
+
+--connection default
+--source ../include/hostcache_dump.inc
+
+--disable_query_log
+--error ER_HOST_IS_BLOCKED
+connect (con5e,"::1",quota,,test,$MASTER_MYPORT,);
--enable_query_log
--connection default
@@ -85,6 +151,9 @@ connect (con2c,"::1",quota,,test,$MASTER_MYPORT,);
revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
drop user 'root'@'santa.claus.ipv6.example.com';
+revoke select on test.* from 'quota'@'santa.claus.ipv6.example.com';
+drop user 'quota'@'santa.claus.ipv6.example.com';
+
set global max_connect_errors = @saved_max_connect_errors;
set global debug_dbug= default;
diff --git a/mysql-test/suite/perfschema/t/myisam_file_io.test b/mysql-test/suite/perfschema/t/myisam_file_io.test
index d93edd7d3b6..3b6a1369ab5 100644
--- a/mysql-test/suite/perfschema/t/myisam_file_io.test
+++ b/mysql-test/suite/perfschema/t/myisam_file_io.test
@@ -15,6 +15,7 @@ update performance_schema.setup_consumers
truncate table performance_schema.events_waits_history_long;
# Reset lost counters to a known state
+truncate table performance_schema.events_statements_summary_by_digest;
flush status;
# Code to test
diff --git a/mysql-test/suite/perfschema/t/nesting.test b/mysql-test/suite/perfschema/t/nesting.test
index 9b1458dca5d..21e7260222a 100644
--- a/mysql-test/suite/perfschema/t/nesting.test
+++ b/mysql-test/suite/perfschema/t/nesting.test
@@ -45,11 +45,12 @@ update performance_schema.setup_instruments set enabled='YES', timed='YES'
update performance_schema.setup_instruments set enabled='YES', timed='YES'
where name in ('statement/sql/select',
- 'statement/com/',
- 'statement/com/Query',
+ 'statement/abstract/new_packet',
+ 'statement/abstract/Query',
'statement/com/error');
# Start from a known clean state, to avoid noise from previous tests
+truncate table performance_schema.events_statements_summary_by_digest;
flush tables;
flush status;
diff --git a/mysql-test/suite/perfschema/t/ortho_iter.test b/mysql-test/suite/perfschema/t/ortho_iter.test
index 09ecfa8a788..0856e266386 100644
--- a/mysql-test/suite/perfschema/t/ortho_iter.test
+++ b/mysql-test/suite/perfschema/t/ortho_iter.test
@@ -44,7 +44,8 @@ begin
select count(name)
from performance_schema.setup_instruments
- where name like (concat(instr_name, "%"))
+ where (name like (concat(instr_name, "%")))
+ and (not name like "%/abstract/%")
into count_expected;
set cmd_1= "select count(*) from (select distinct event_name from performance_schema.";
@@ -138,6 +139,7 @@ call check_instrument("wait/");
call check_instrument("stage/");
call check_instrument("statement/com/");
call check_instrument("statement/sql/");
+call check_instrument("statement/abstract/");
call check_instrument("statement/");
call check_instrument("idle/io/socket");
call check_instrument("idle/");
diff --git a/mysql-test/suite/perfschema/t/rpl_statements.test b/mysql-test/suite/perfschema/t/rpl_statements.test
new file mode 100644
index 00000000000..fa429cd2aa3
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/rpl_statements.test
@@ -0,0 +1,339 @@
+#
+# Check statement instrumentation of replicated statements
+#
+--source include/not_embedded.inc
+--source include/have_innodb.inc
+--source include/have_perfschema.inc
+--source ../include/no_protocol.inc
+--source include/have_binlog_format_mixed.inc
+--source include/master-slave.inc
+
+#==============================================================
+# Execute a variety of dml and ddl statements on the master.
+# Verify that the corresponding statement events are generated
+# on the slave.
+#
+# 1. Setup test files on master
+# 2. Replicate test files to slave
+# 3. Perform dml and ddl statements on master
+# 4. Copy statement events on master into a temporary table
+# 4. Replicate to slave
+# 5. Compare statement events on slave to those from the master
+# 6. Disable statement/abstract/relay_log on slave
+# 7. Update some tables on the master then replicate
+# 8. Verify that the updates were replicated but no statement
+# events were recorded
+#==============================================================
+
+#
+# UTILITY QUERIES
+#
+let $get_thread_id=
+ select thread_id into @my_thread_id
+ from performance_schema.threads
+ where processlist_id = connection_id();
+
+let $disable_instruments=
+ update performance_schema.setup_instruments
+ set enabled='no', timed='no'
+ where name like '%statement/%';
+
+let $enable_instruments= ../include
+ update performance_schema.setup_instruments
+ set enabled='yes', timed='yes'
+ where name like '%statement/%';
+
+let $column_list=
+ thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text;
+
+# Define instrument name for enable/disable instruments
+let $pfs_instrument='%statement/%';
+
+--echo
+--echo #
+--echo # STEP 1 - CREATE AND REPLICATE TEST TABLES
+--echo #
+
+connection master;
+
+--echo
+--echo **************
+--echo *** MASTER ***
+--echo **************
+--echo
+--echo *** Create test tables
+--echo
+
+show variables like '%binlog_format%';
+
+--disable_warnings
+drop table if exists test.marker;
+--enable_warnings
+
+eval $get_thread_id;
+
+create table test.marker(s1 int) engine=innodb;
+
+sync_slave_with_master;
+
+--echo **************
+--echo *** SLAVE ***
+--echo **************
+--echo
+--echo *** Clear statement events
+--source ../include/rpl_statements_truncate.inc
+
+--echo
+--echo #
+--echo # STEP 2 - REPLICATE ONE ROW ON MASTER TO GET REPLICATION THREAD ID ON SLAVE
+--echo #
+
+connection master;
+
+--echo **************
+--echo *** MASTER ***
+--echo **************
+--echo
+insert into test.marker values (0);
+--echo
+
+sync_slave_with_master;
+
+--echo **************
+--echo *** SLAVE ***
+--echo **************
+--echo
+--echo *** Verify row, get replication thread id, clear statement events
+--echo
+
+# TODO: Get slave thread id from threads using thread/sql/slave_sql event name
+
+select thread_id into @slave_thread_id from performance_schema.events_statements_history
+ where sql_text like '%marker%';
+let $slave_thread_id= `select @slave_thread_id`;
+
+--echo *** Verify row inserted on master was replicated
+select count(*) = 1 as 'Expect 1' from test.marker;
+
+--echo *** Clear statement events
+--source ../include/rpl_statements_truncate.inc
+
+--echo
+--echo #
+--echo # STEP 3 - PERFORM DML STATEMENTS ON MASTER
+--echo #
+
+connection master;
+
+--echo **************
+--echo *** MASTER ***
+--echo **************
+--echo
+show variables like '%binlog_format%';
+
+--echo *** Clear statement events
+--source ../include/rpl_statements_truncate.inc
+
+--echo
+--echo *** Create/drop table, create/drop database
+--echo
+create database marker1_db;
+create database marker2_db;
+create table marker1_db.table1 (s1 int) engine=innodb;
+create table marker2_db.table1 (s1 int) engine=innodb;
+create table marker2_db.table2 (s1 int) engine=innodb;
+
+--echo
+--echo *** Transaction
+start transaction;
+insert into marker1_db.table1 values (1), (2), (3);
+insert into marker2_db.table1 values (1), (2), (3);
+commit;
+
+--echo
+--echo *** Alter
+alter table marker1_db.table1 add column (s2 varchar(32));
+
+--echo
+--echo *** Insert, Update
+start transaction;
+insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six');
+update marker1_db.table1 set s1 = s1 + 1;
+commit;
+
+--echo
+--echo *** Rollback
+start transaction;
+insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine');
+rollback;
+
+--echo
+--echo *** Autocommit, Delete, Drop
+delete from marker1_db.table1 where s1 > 4;
+drop table marker2_db.table1;
+drop database marker2_db;
+
+--source ../include/disable_instruments.inc
+
+--echo
+--echo *** Examine statements events that will be compared on the slave
+--echo
+
+--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
+
+eval select $column_list from performance_schema.events_statements_history_long
+ where sql_text like '%marker%' order by event_id;
+
+--echo
+--echo #
+--echo # STEP 4 - REPLICATE STATEMENT EVENTS ON MASTER TO SLAVE
+--echo #
+--echo
+--echo *** Store statement events in holding table, then replicate
+--echo
+
+--source ../include/disable_instruments.inc
+
+--echo #
+--echo # Create table to hold statement events for later comparison on the slave
+--echo #
+
+create table test.master_events_statements_history_long as
+ (select thread_id, event_id, event_name, sql_text, digest, digest_text, current_schema, rows_affected
+ from performance_schema.events_statements_history_long
+ where (thread_id=@my_thread_id and digest_text like '%marker%'));
+
+--source ../include/enable_instruments.inc
+
+--echo
+--echo #
+--echo # STEP 5 - VERIFY DML AND DDL STATEMENT EVENTS ON SLAVE
+--echo #
+
+sync_slave_with_master;
+
+--echo **************
+--echo *** SLAVE ***
+--echo **************
+
+--source ../include/disable_instruments.inc
+
+--echo
+--echo *** List statement events from master
+--echo
+--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
+eval select $column_list from master_events_statements_history_long order by event_id;
+
+--echo
+--echo *** List statement events on slave
+--echo
+
+--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
+
+eval select $column_list from performance_schema.events_statements_history_long
+ where thread_id = @slave_thread_id and sql_text like '%marker%' order by event_id;
+
+--echo
+--echo *** Compare master and slave events
+--echo
+
+# Note: The statement digest provides a more robust comparison than the
+# event name. However, in some cases, e.g. DROP TABLE, the server generates
+# its own version of the statement which includes additional quotes and a
+# comment. A digest comparison is therefore impractical for server-generated
+# statements, so we use both methods to ensure coverage.
+
+--echo
+--echo *** Event name comparison - expect 0 mismatches
+--echo
+
+select thread_id, event_id, event_name, digest_text, sql_text from performance_schema.events_statements_history_long t1
+ where t1.thread_id = @slave_thread_id and
+ sql_text like '%marker%' and
+ not exists (select * from master_events_statements_history_long t2 where t2.event_name = t1.event_name);
+
+--echo
+--echo *** Statement digest comparison - expect 1 mismatch for DROP TABLE
+--echo
+
+--replace_column 1 [THREAD_ID] 2 [EVENT_ID] 4 [DIGEST]
+
+select thread_id, event_id, event_name, digest, digest_text, sql_text from performance_schema.events_statements_history_long t1
+ where t1.thread_id = @slave_thread_id and
+ sql_text like '%marker%' and
+ not exists (select * from master_events_statements_history_long t2 where t2.digest = t1.digest);
+
+--echo
+--echo #
+--echo # STEP 6 - DISABLE REPLICATED STATEMENT EVENTS ON SLAVE
+--echo #
+--source ../include/rpl_statements_truncate.inc
+--source ../include/enable_instruments.inc
+
+update performance_schema.setup_instruments set enabled='no', timed='no'
+ where name like '%statement/abstract/relay_log%';
+
+select * from performance_schema.setup_instruments where name like '%statement/abstract/relay_log%';
+
+--echo
+--echo #
+--echo # STEP 7 - UPDATE TABLES ON MASTER, REPLICATE
+--echo #
+
+connection master;
+
+--echo **************
+--echo *** MASTER ***
+--echo **************
+--echo
+--echo *** Clear statement events
+--source ../include/rpl_statements_truncate.inc
+
+--echo *** Update some tables, then replicate
+--echo
+
+insert into marker1_db.table1 values (999, '999'), (998, '998'), (997, '997');
+
+--echo
+--echo #
+--echo # STEP 8 - VERIFY TABLE UPDATES FROM MASTER, EXPECT NO STATEMENT EVENTS ON SLAVE
+--echo #
+
+sync_slave_with_master;
+
+--echo **************
+--echo *** SLAVE ***
+--echo **************
+--echo
+--echo *** Confirm rows were replicated
+--echo
+
+select * from marker1_db.table1 where s1 > 900 order by s1;
+
+--echo
+--echo *** Confirm that are no statements events from the replication thread
+--echo
+
+select * from performance_schema.events_statements_history_long
+ where thread_id = @slave_thread_id;
+
+--source ../include/enable_instruments.inc
+
+--echo
+--echo #
+--echo # STEP 9 - CLEAN UP
+--echo #
+--echo
+--disable_query_log
+--disable_warnings
+
+connection master;
+drop table test.marker;
+drop table test.master_events_statements_history_long;
+drop database marker1_db;
+
+sync_slave_with_master;
+
+--enable_warnings
+--enable_query_log
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt b/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt
index 71106aaaed0..408eb5c79d2 100644
--- a/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt
+++ b/mysql-test/suite/perfschema/t/setup_instruments_defaults-master.opt
@@ -1,21 +1,29 @@
--log-error=0
--loose-performance-schema-instrument='%=ON'
+--loose-performance-schema-instrument=''
+--loose-performance-schema-instrument=' wait/synch/mutex/sql/% = OFF ''
+--loose-performance-schema-instrument='//wait/synch/mutex/sql/% = 'OFF ''
+--loose-performance-schema-instrument=' wait/synch/mutex/sql/% = OFF '
+--loose-performance-schema-instrument='''''
+--loose-performance-schema-instrument=' / '
+--loose-performance-schema-instrument=' wait/synch/mutex/sql/% = OFF '
--loose-performance-schema-instrument='wait/synch/mutex/sql/% = OFF '
--loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK% = ON'
---loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK_thread_count = OFF'
+--loose-performance-schema-instrument='wait/synch/mutex/sql/LOCK_thread_count=OFF'
--loose-performance-schema-instrument=' wait/synch/mutex/sql/LOCK_user_conn = COUNTED'
---loose-performance-schema-instrument='wait%/synch/mutex/sql/LOCK_uu%_genera%/ = COUNTED'
---loose-performance-schema-instrument='%%wait/synch/mutex/sql/LOCK_xid_cache = COUNTED'
+--loose-performance-schema-instrument='wait%/synch/mutex/sql/LOCK_uu%_genera%/= COUNTED'
+--loose-performance-schema-instrument='%%wait/synch/mutex/sql/LOCK_xid_cache=COUNTED'
--loose-performance-schema-instrument='%=FOO'
--loose-performance-schema-instrument='%=%'
--loose-performance-schema-instrument='%'
---loose-performance-schema-instrument=''
--loose-performance-schema-instrument=' unknown%instrument/event/name with blanks = YES'
---loose-performance-schema-instrument='unknown/instrument/event/name = TRUE'
---loose-performance-schema-instrument='stage/sql/creating table = COUNTED'
---loose-performance-schema-instrument='wait/synch/mutex/sql/LOG_INFO::lock = 1'
---loose-performance-schema-instrument='wait/synch/mutex/sql/Delayed_insert::mutex = 0'
---loose-performance-schema-instrument='wait/synch/mutex/sql/THD::LOCK_thd_data = TRUE'
---loose-performance-schema-instrument='wait/synch/mutex/sql/hash_filo::lock = FALSE'
+--loose-performance-schema-instrument='unknown/instrument/event/name = TRUE'
+--loose-performance-schema-instrument='stage/sql/creating table = COUNTED'
+--loose-performance-schema-instrument='wait/synch/mutex/sql/LOG_INFO::lock = 1'
+--loose-performance-schema-instrument='wait/synch/mutex/sql/THD::LOCK_thd_data= TRUE'
+--loose-performance-schema-instrument='wait/synch/mutex/sql/hash_filo::lock =FALSE'
--loose-performance-schema-instrument='wait/synch/mutex/sql/TABLE_SHARE::LOCK_ha_data= NO'
+
+
+
diff --git a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
index b84b082c484..5fd5acceb34 100644
--- a/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
+++ b/mysql-test/suite/perfschema/t/setup_instruments_defaults.test
@@ -4,14 +4,18 @@
--source include/have_perfschema.inc
# Verify that the configuration options were applied correctly to the
-# setup_instruments table. These instruments that are known to persist across
+# performance_schema.setup_instruments table. These instruments that are known to persist across
# platforms and the various compile options.
+--echo #
+--echo # Verify that the configuration file defaults were processed correctly
+--echo #
+
SELECT * FROM performance_schema.setup_instruments
WHERE name IN (
'wait/synch/mutex/sql/LOCK_user_conn',
'wait/synch/mutex/sql/LOCK_uuid_generator',
- 'wait/synch/mutex/sql/LOCK_xid_cache'
+ 'wait/synch/mutex/sql/LOCK_xid_cache',
'stage/sql/creating table')
AND enabled = 'yes' AND timed = 'no'
ORDER BY name;
@@ -28,13 +32,52 @@ AND enabled = 'yes' AND timed = 'yes'
ORDER BY name;
SELECT * FROM performance_schema.setup_instruments
-WHERE name IN (
- 'wait/synch/mutex/sql/Delayed_insert::mutex',
- 'wait/synch/mutex/sql/hash_filo::lock')
+WHERE name = 'wait/synch/mutex/sql/hash_filo::lock'
AND enabled = 'no' AND timed = 'no'
ORDER BY name;
-#
-# Verify that the instrument startup settings are not not visible.
-#
-SHOW VARIABLES LIKE "%/wait/synch/mutex%"; \ No newline at end of file
+--echo #
+--echo # Verify that the instrument startup settings are not not visible.
+--echo #
+SHOW VARIABLES LIKE "%/wait/synch/mutex%";
+
+--echo #
+--echo # Verify command line options are processed correctly
+--echo #
+
+# The instrument wait/io/table/sql/handler should be enabled and timed. We will
+# restart the server with the instrument disabled from the command line.
+--echo #
+--echo # Verify that wait/io/table/sql/handler is enabled and timed
+--echo #
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like "%wait/io/table/sql/handler%";
+
+# Write file to make mysql-test-run.pl wait for the server to stop
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+
+# Restart the server
+--echo #
+--echo # Stop server
+--send_shutdown
+--echo # Restart server with wait/io/table/sql/handler disabled
+
+--exec echo "restart:--loose-performance-schema-instrument=%wait/io/table/sql/%=off" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+
+# Turn on reconnect
+--echo # Enable reconnect
+--enable_reconnect
+
+# Wait for server to be back online again
+--echo # Wait until connected again
+--source include/wait_until_connected_again.inc
+
+# Turn off reconnect again
+--echo # Disable reconnect
+--disable_reconnect
+
+--echo #
+--echo # Verify that wait/io/table is disabled
+--echo #
+SELECT * FROM performance_schema.setup_instruments
+WHERE name like "%wait/io/table/sql/handler%";
diff --git a/mysql-test/suite/perfschema/t/sizing_default.cnf b/mysql-test/suite/perfschema/t/sizing_default.cnf
index 1e99e180b79..6a929998329 100644
--- a/mysql-test/suite/perfschema/t/sizing_default.cnf
+++ b/mysql-test/suite/perfschema/t/sizing_default.cnf
@@ -4,10 +4,13 @@
[mysqld.1]
# Default values used in the server, out of the box
-table_definition_cache=400
-table_open_cache=400
-max_connections=151
-open_files_limit=1024
+# open_files_limit can be scaled down based on the os configuration (ulimit -n),
+# so to get a stable test output, make sure ulimit -n is big enough
+#
+# What is supposed to happen here by default:
+# table_open_cache = 2000
+# table_definition_cache = 400 + 2000/2 = 1400
+# max_connections = 151
# Automated sizing for everything
diff --git a/mysql-test/suite/perfschema/t/sizing_default.test b/mysql-test/suite/perfschema/t/sizing_default.test
index 4d02d41aecd..d5fb8be9f77 100644
--- a/mysql-test/suite/perfschema/t/sizing_default.test
+++ b/mysql-test/suite/perfschema/t/sizing_default.test
@@ -5,5 +5,27 @@
--source include/not_valgrind.inc
--source ../include/have_aligned_memory.inc
+# Skip test if not defaults is used.
+let $max_open_files_limit= `SELECT @@open_files_limit < 5000`;
+if ($max_open_files_limit)
+{
+ skip Need open_files_limit to be at least 5000;
+}
+let $max_table_open_cache= `SELECT @@table_open_cache != 2000`;
+if ($max_table_open_cache)
+{
+ skip Need table_open_cache to be exactly 2000;
+}
+let $max_table_definition_cache= `SELECT @@table_definition_cache != 1400`;
+if ($max_table_definition_cache)
+{
+ skip Need table_definition_cache to be exactly 1400;
+}
+let $max_connections= `SELECT @@max_connections != 151`;
+if ($max_connections)
+{
+ skip Need max_connections to be exactly 151;
+}
+
--source ../include/sizing_auto.inc