summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/perfschema/r')
-rw-r--r--mysql-test/suite/perfschema/r/column_privilege.result3
-rw-r--r--mysql-test/suite/perfschema/r/connect_attrs.result5
-rw-r--r--mysql-test/suite/perfschema/r/connection.result33
-rw-r--r--mysql-test/suite/perfschema/r/connection_3a.result33
-rw-r--r--mysql-test/suite/perfschema/r/connection_3a_3u.result33
-rw-r--r--mysql-test/suite/perfschema/r/connection_3u.result33
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate.result37
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a.result37
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result37
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result37
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result37
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_h.result37
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u.result37
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result37
-rw-r--r--mysql-test/suite/perfschema/r/global_read_lock.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result10
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result18
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_format.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result44
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result15
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result7
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result7
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result10
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result18
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result44
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result15
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result7
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result5
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result9
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result7
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_peer_addr.result5
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result5
-rw-r--r--mysql-test/suite/perfschema/r/one_thread_per_con.result19
-rw-r--r--mysql-test/suite/perfschema/r/privilege.result14
-rw-r--r--mysql-test/suite/perfschema/r/read_only.result6
-rw-r--r--mysql-test/suite/perfschema/r/relaylog.result4
-rw-r--r--mysql-test/suite/perfschema/r/rpl_gtid_func.result12
-rw-r--r--mysql-test/suite/perfschema/r/rpl_statements.result33
-rw-r--r--mysql-test/suite/perfschema/r/setup_actors.result45
-rw-r--r--mysql-test/suite/perfschema/r/socket_connect.result8
-rw-r--r--mysql-test/suite/perfschema/r/socket_instances_func.result21
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result11
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result13
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_function.result8
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_global.result8
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_procedure.result8
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_table.result8
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_off.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result33
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result33
-rw-r--r--mysql-test/suite/perfschema/r/thread_cache.result18
105 files changed, 1773 insertions, 499 deletions
diff --git a/mysql-test/suite/perfschema/r/column_privilege.result b/mysql-test/suite/perfschema/r/column_privilege.result
index ea901484d7e..f88a5615e16 100644
--- a/mysql-test/suite/perfschema/r/column_privilege.result
+++ b/mysql-test/suite/perfschema/r/column_privilege.result
@@ -9,6 +9,7 @@ to 'pfs_user_5'@localhost;
grant UPDATE(enabled) on performance_schema.setup_instruments
to 'pfs_user_5'@localhost;
flush privileges;
+connect con1, localhost, pfs_user_5, , ;
select thread_id from performance_schema.events_waits_current;
select thread_id, event_id from performance_schema.events_waits_current;
update performance_schema.setup_instruments set enabled='YES';
@@ -21,6 +22,8 @@ update performance_schema.setup_instruments set name='illegal';
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'name' in table 'setup_instruments'
update performance_schema.setup_instruments set timed='NO';
ERROR 42000: UPDATE command denied to user 'pfs_user_5'@'localhost' for column 'timed' in table 'setup_instruments'
+connection default;
+disconnect con1;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
DROP USER 'pfs_user_5'@localhost;
flush privileges;
diff --git a/mysql-test/suite/perfschema/r/connect_attrs.result b/mysql-test/suite/perfschema/r/connect_attrs.result
index 0fb0ad34ab2..5e45a4cd900 100644
--- a/mysql-test/suite/perfschema/r/connect_attrs.result
+++ b/mysql-test/suite/perfschema/r/connect_attrs.result
@@ -25,6 +25,8 @@ FROM performance_schema.session_account_connect_attrs;
COUNT(DISTINCT PROCESSLIST_ID)
1
CREATE USER wl5924@localhost;
+connect non_privileged_user,localhost,wl5924,,test;
+connection default;
# must return 1
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_account_connect_attrs;
@@ -35,12 +37,15 @@ SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_connect_attrs;
COUNT(DISTINCT PROCESSLIST_ID)
2
+connection non_privileged_user;
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_account_connect_attrs;
ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_account_connect_attrs'
SELECT COUNT(DISTINCT PROCESSLIST_ID)
FROM performance_schema.session_connect_attrs;
ERROR 42000: SELECT command denied to user 'wl5924'@'localhost' for table 'session_connect_attrs'
+connection default;
+disconnect non_privileged_user;
grant select on performance_schema.* to wl5924@localhost;
SELECT SUM(ISNULL(ATTR_VALUE)), COUNT(*)
FROM performance_schema.session_account_connect_attrs
diff --git a/mysql-test/suite/perfschema/r/connection.result b/mysql-test/suite/perfschema/r/connection.result
index fe312f6fa04..332b5a43466 100644
--- a/mysql-test/suite/perfschema/r/connection.result
+++ b/mysql-test/suite/perfschema/r/connection.result
@@ -11,6 +11,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1a, localhost, user1, , ;
select "user1 in con1a" as status;
status
user1 in con1a
@@ -30,6 +31,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1b, localhost, user1, , ;
select "user1 in con1b" as status;
status
user1 in con1b
@@ -50,6 +52,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1c, localhost, user1, , ;
select "user1 in con1c" as status;
status
user1 in con1c
@@ -71,6 +74,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2a, localhost, user2, , ;
select "user2 in con2a" as status;
status
user2 in con2a
@@ -95,6 +99,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2b, localhost, user2, , ;
select "user2 in con2b" as status;
status
user2 in con2b
@@ -120,6 +125,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2c, localhost, user2, , ;
select "user2 in con2c" as status;
status
user2 in con2c
@@ -146,6 +152,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con3a, localhost, user3, , ;
select "user3 in con3a" as status;
status
user3 in con3a
@@ -175,6 +182,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con3b, localhost, user3, , ;
select "user3 in con3b" as status;
status
user3 in con3b
@@ -205,6 +213,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con3c, localhost, user3, , ;
select "user3 in con3c" as status;
status
user3 in con3c
@@ -236,6 +245,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connection default;
+disconnect con1a;
select "con1a disconnected" as status;
status
con1a disconnected
@@ -266,6 +277,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con2a;
select "con2a disconnected" as status;
status
con2a disconnected
@@ -295,6 +307,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con3a;
select "con3a disconnected" as status;
status
con3a disconnected
@@ -401,6 +414,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con4a, localhost, user4, , ;
select "user4 in con4a" as status;
status
user4 in con4a
@@ -432,6 +446,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con4b, localhost, user4, , ;
select "user4 in con4b" as status;
status
user4 in con4b
@@ -464,6 +479,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con4c, localhost, user4, , ;
select "user4 in con4c" as status;
status
user4 in con4c
@@ -497,6 +513,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connection default;
+disconnect con1b;
select "con1b disconnected" as status;
status
con1b disconnected
@@ -529,6 +547,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con2b;
select "con2b disconnected" as status;
status
con2b disconnected
@@ -560,6 +579,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con3b;
select "con3b disconnected" as status;
status
con3b disconnected
@@ -590,6 +610,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con1c;
select "con1c disconnected" as status;
status
con1c disconnected
@@ -619,6 +640,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con2c;
select "con2c disconnected" as status;
status
con2c disconnected
@@ -647,6 +669,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con3c;
select "con3c disconnected" as status;
status
con3c disconnected
@@ -734,6 +757,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con5a, localhost, user5, , ;
select "user5 in con5a" as status;
status
user5 in con5a
@@ -758,6 +782,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con5b, localhost, user5, , ;
select "user5 in con5b" as status;
status
user5 in con5b
@@ -783,6 +808,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con5c, localhost, user5, , ;
select "user5 in con5c" as status;
status
user5 in con5c
@@ -809,6 +835,13 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connection default;
+disconnect con4a;
+disconnect con4b;
+disconnect con4c;
+disconnect con5a;
+disconnect con5b;
+disconnect con5c;
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
status
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
diff --git a/mysql-test/suite/perfschema/r/connection_3a.result b/mysql-test/suite/perfschema/r/connection_3a.result
index 1f92d67137d..e799864edfd 100644
--- a/mysql-test/suite/perfschema/r/connection_3a.result
+++ b/mysql-test/suite/perfschema/r/connection_3a.result
@@ -11,6 +11,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1a, localhost, user1, , ;
select "user1 in con1a" as status;
status
user1 in con1a
@@ -30,6 +31,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1b, localhost, user1, , ;
select "user1 in con1b" as status;
status
user1 in con1b
@@ -50,6 +52,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1c, localhost, user1, , ;
select "user1 in con1c" as status;
status
user1 in con1c
@@ -71,6 +74,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2a, localhost, user2, , ;
select "user2 in con2a" as status;
status
user2 in con2a
@@ -94,6 +98,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2b, localhost, user2, , ;
select "user2 in con2b" as status;
status
user2 in con2b
@@ -118,6 +123,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2c, localhost, user2, , ;
select "user2 in con2c" as status;
status
user2 in con2c
@@ -143,6 +149,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con3a, localhost, user3, , ;
select "user3 in con3a" as status;
status
user3 in con3a
@@ -170,6 +177,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con3b, localhost, user3, , ;
select "user3 in con3b" as status;
status
user3 in con3b
@@ -198,6 +206,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con3c, localhost, user3, , ;
select "user3 in con3c" as status;
status
user3 in con3c
@@ -227,6 +236,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connection default;
+disconnect con1a;
select "con1a disconnected" as status;
status
con1a disconnected
@@ -255,6 +266,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con2a;
select "con2a disconnected" as status;
status
con2a disconnected
@@ -282,6 +294,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con3a;
select "con3a disconnected" as status;
status
con3a disconnected
@@ -380,6 +393,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con4a, localhost, user4, , ;
select "user4 in con4a" as status;
status
user4 in con4a
@@ -408,6 +422,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con4b, localhost, user4, , ;
select "user4 in con4b" as status;
status
user4 in con4b
@@ -437,6 +452,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con4c, localhost, user4, , ;
select "user4 in con4c" as status;
status
user4 in con4c
@@ -467,6 +483,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connection default;
+disconnect con1b;
select "con1b disconnected" as status;
status
con1b disconnected
@@ -496,6 +514,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con2b;
select "con2b disconnected" as status;
status
con2b disconnected
@@ -524,6 +543,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con3b;
select "con3b disconnected" as status;
status
con3b disconnected
@@ -551,6 +571,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con1c;
select "con1c disconnected" as status;
status
con1c disconnected
@@ -577,6 +598,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con2c;
select "con2c disconnected" as status;
status
con2c disconnected
@@ -602,6 +624,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+disconnect con3c;
select "con3c disconnected" as status;
status
con3c disconnected
@@ -683,6 +706,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con5a, localhost, user5, , ;
select "user5 in con5a" as status;
status
user5 in con5a
@@ -706,6 +730,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con5b, localhost, user5, , ;
select "user5 in con5b" as status;
status
user5 in con5b
@@ -730,6 +755,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con5c, localhost, user5, , ;
select "user5 in con5c" as status;
status
user5 in con5c
@@ -755,6 +781,13 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connection default;
+disconnect con4a;
+disconnect con4b;
+disconnect con4c;
+disconnect con5a;
+disconnect con5b;
+disconnect con5c;
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
status
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
diff --git a/mysql-test/suite/perfschema/r/connection_3a_3u.result b/mysql-test/suite/perfschema/r/connection_3a_3u.result
index 0a6229d9f93..a3758a6ace1 100644
--- a/mysql-test/suite/perfschema/r/connection_3a_3u.result
+++ b/mysql-test/suite/perfschema/r/connection_3a_3u.result
@@ -11,6 +11,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1a, localhost, user1, , ;
select "user1 in con1a" as status;
status
user1 in con1a
@@ -30,6 +31,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1b, localhost, user1, , ;
select "user1 in con1b" as status;
status
user1 in con1b
@@ -50,6 +52,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1c, localhost, user1, , ;
select "user1 in con1c" as status;
status
user1 in con1c
@@ -71,6 +74,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2a, localhost, user2, , ;
select "user2 in con2a" as status;
status
user2 in con2a
@@ -93,6 +97,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 1
+connect con2b, localhost, user2, , ;
select "user2 in con2b" as status;
status
user2 in con2b
@@ -116,6 +121,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 2
+connect con2c, localhost, user2, , ;
select "user2 in con2c" as status;
status
user2 in con2c
@@ -140,6 +146,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connect con3a, localhost, user3, , ;
select "user3 in con3a" as status;
status
user3 in con3a
@@ -165,6 +172,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 4
+connect con3b, localhost, user3, , ;
select "user3 in con3b" as status;
status
user3 in con3b
@@ -191,6 +199,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 5
+connect con3c, localhost, user3, , ;
select "user3 in con3c" as status;
status
user3 in con3c
@@ -218,6 +227,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 6
+connection default;
+disconnect con1a;
select "con1a disconnected" as status;
status
con1a disconnected
@@ -244,6 +255,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 6
+disconnect con2a;
select "con2a disconnected" as status;
status
con2a disconnected
@@ -269,6 +281,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 6
+disconnect con3a;
select "con3a disconnected" as status;
status
con3a disconnected
@@ -359,6 +372,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 6
+connect con4a, localhost, user4, , ;
select "user4 in con4a" as status;
status
user4 in con4a
@@ -384,6 +398,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 7
+connect con4b, localhost, user4, , ;
select "user4 in con4b" as status;
status
user4 in con4b
@@ -410,6 +425,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 8
+connect con4c, localhost, user4, , ;
select "user4 in con4c" as status;
status
user4 in con4c
@@ -437,6 +453,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+connection default;
+disconnect con1b;
select "con1b disconnected" as status;
status
con1b disconnected
@@ -463,6 +481,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+disconnect con2b;
select "con2b disconnected" as status;
status
con2b disconnected
@@ -488,6 +507,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+disconnect con3b;
select "con3b disconnected" as status;
status
con3b disconnected
@@ -512,6 +532,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+disconnect con1c;
select "con1c disconnected" as status;
status
con1c disconnected
@@ -535,6 +556,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+disconnect con2c;
select "con2c disconnected" as status;
status
con2c disconnected
@@ -557,6 +579,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+disconnect con3c;
select "con3c disconnected" as status;
status
con3c disconnected
@@ -630,6 +653,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+connect con5a, localhost, user5, , ;
select "user5 in con5a" as status;
status
user5 in con5a
@@ -652,6 +676,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+connect con5b, localhost, user5, , ;
select "user5 in con5b" as status;
status
user5 in con5b
@@ -675,6 +700,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+connect con5c, localhost, user5, , ;
select "user5 in con5c" as status;
status
user5 in con5c
@@ -699,6 +725,13 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 9
+connection default;
+disconnect con4a;
+disconnect con4b;
+disconnect con4c;
+disconnect con5a;
+disconnect con5b;
+disconnect con5c;
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
status
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
diff --git a/mysql-test/suite/perfschema/r/connection_3u.result b/mysql-test/suite/perfschema/r/connection_3u.result
index f0606301532..7bb5691c7f6 100644
--- a/mysql-test/suite/perfschema/r/connection_3u.result
+++ b/mysql-test/suite/perfschema/r/connection_3u.result
@@ -11,6 +11,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1a, localhost, user1, , ;
select "user1 in con1a" as status;
status
user1 in con1a
@@ -30,6 +31,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1b, localhost, user1, , ;
select "user1 in con1b" as status;
status
user1 in con1b
@@ -50,6 +52,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con1c, localhost, user1, , ;
select "user1 in con1c" as status;
status
user1 in con1c
@@ -71,6 +74,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 0
+connect con2a, localhost, user2, , ;
select "user2 in con2a" as status;
status
user2 in con2a
@@ -94,6 +98,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 1
+connect con2b, localhost, user2, , ;
select "user2 in con2b" as status;
status
user2 in con2b
@@ -118,6 +123,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 1
+connect con2c, localhost, user2, , ;
select "user2 in con2c" as status;
status
user2 in con2c
@@ -143,6 +149,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 1
+connect con3a, localhost, user3, , ;
select "user3 in con3a" as status;
status
user3 in con3a
@@ -170,6 +177,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 2
+connect con3b, localhost, user3, , ;
select "user3 in con3b" as status;
status
user3 in con3b
@@ -198,6 +206,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 2
+connect con3c, localhost, user3, , ;
select "user3 in con3c" as status;
status
user3 in con3c
@@ -227,6 +236,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 2
+connection default;
+disconnect con1a;
select "con1a disconnected" as status;
status
con1a disconnected
@@ -255,6 +266,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 2
+disconnect con2a;
select "con2a disconnected" as status;
status
con2a disconnected
@@ -282,6 +294,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 2
+disconnect con3a;
select "con3a disconnected" as status;
status
con3a disconnected
@@ -380,6 +393,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 2
+connect con4a, localhost, user4, , ;
select "user4 in con4a" as status;
status
user4 in con4a
@@ -408,6 +422,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connect con4b, localhost, user4, , ;
select "user4 in con4b" as status;
status
user4 in con4b
@@ -437,6 +452,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connect con4c, localhost, user4, , ;
select "user4 in con4c" as status;
status
user4 in con4c
@@ -467,6 +483,8 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connection default;
+disconnect con1b;
select "con1b disconnected" as status;
status
con1b disconnected
@@ -496,6 +514,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+disconnect con2b;
select "con2b disconnected" as status;
status
con2b disconnected
@@ -524,6 +543,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+disconnect con3b;
select "con3b disconnected" as status;
status
con3b disconnected
@@ -551,6 +571,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+disconnect con1c;
select "con1c disconnected" as status;
status
con1c disconnected
@@ -577,6 +598,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+disconnect con2c;
select "con2c disconnected" as status;
status
con2c disconnected
@@ -602,6 +624,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+disconnect con3c;
select "con3c disconnected" as status;
status
con3c disconnected
@@ -681,6 +704,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connect con5a, localhost, user5, , ;
select "user5 in con5a" as status;
status
user5 in con5a
@@ -704,6 +728,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connect con5b, localhost, user5, , ;
select "user5 in con5b" as status;
status
user5 in con5b
@@ -728,6 +753,7 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connect con5c, localhost, user5, , ;
select "user5 in con5c" as status;
status
user5 in con5c
@@ -753,6 +779,13 @@ variable_name variable_value
PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
PERFORMANCE_SCHEMA_HOSTS_LOST 0
PERFORMANCE_SCHEMA_USERS_LOST 3
+connection default;
+disconnect con4a;
+disconnect con4b;
+disconnect con4c;
+disconnect con5a;
+disconnect con5b;
+disconnect con5c;
select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
status
con 5a, 5b, 5c, 6a, 6b, 6c disconnected
diff --git a/mysql-test/suite/perfschema/r/event_aggregate.result b/mysql-test/suite/perfschema/r/event_aggregate.result
index a5cfe97f98e..1f168cee431 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate.result
@@ -71,7 +71,8 @@ root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -175,6 +176,7 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -182,7 +184,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -293,7 +295,8 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -433,6 +436,7 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -440,7 +444,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -580,7 +584,8 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -749,6 +754,7 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -756,7 +762,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -925,7 +931,8 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1123,6 +1130,7 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -1130,7 +1138,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -1328,7 +1336,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -1525,7 +1534,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 5
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -1719,7 +1729,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 5
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -1910,7 +1921,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 5
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -2098,6 +2110,7 @@ user4 0 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
index 42945079ef4..7c9c3794d5f 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
@@ -70,7 +70,8 @@ root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -160,6 +161,7 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -167,7 +169,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -264,7 +266,8 @@ user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -377,6 +380,7 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -384,7 +388,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -497,7 +501,8 @@ user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -626,6 +631,7 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -633,7 +639,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -762,7 +768,8 @@ user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -907,6 +914,7 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -914,7 +922,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -1059,7 +1067,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -1203,7 +1212,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 5
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -1344,7 +1354,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 5
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -1482,7 +1493,8 @@ user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 5
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1617,6 +1629,7 @@ user4 0 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
index 12893a8cc2b..c8a9233e2a6 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
@@ -57,7 +57,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -134,6 +135,7 @@ root 1 1
user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -141,7 +143,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -225,7 +227,8 @@ root 1 1
user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -325,6 +328,7 @@ user1 1 1
user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -332,7 +336,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -432,7 +436,8 @@ user1 1 1
user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -548,6 +553,7 @@ user2 1 1
user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -555,7 +561,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -671,7 +677,8 @@ user2 1 1
user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -803,6 +810,7 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -810,7 +818,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -942,7 +950,8 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -1073,7 +1082,8 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -1201,7 +1211,8 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -1326,7 +1337,8 @@ user3 0 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1448,6 +1460,7 @@ user3 0 1
user4 0 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
index bd9a52361a1..95b46de4b57 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
@@ -69,7 +69,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -145,6 +146,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -152,7 +154,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -235,7 +237,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -321,6 +324,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -328,7 +332,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -414,7 +418,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -503,6 +508,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -510,7 +516,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -599,7 +605,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -691,6 +698,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -698,7 +706,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -790,7 +798,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -881,7 +890,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 5
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -969,7 +979,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 5
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -1054,7 +1065,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 5
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1136,6 +1148,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
index bb14b14e291..2dda100704f 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
@@ -56,7 +56,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -119,6 +120,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -126,7 +128,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -196,7 +198,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -269,6 +272,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -276,7 +280,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -349,7 +353,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -425,6 +430,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -432,7 +438,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -508,7 +514,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -587,6 +594,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -594,7 +602,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -673,7 +681,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -751,7 +760,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -826,7 +836,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -898,7 +909,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -967,6 +979,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
index 0595c50e531..86edcf225c7 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
@@ -58,7 +58,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
root 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -149,6 +150,7 @@ root 1 1
user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -156,7 +158,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -254,7 +256,8 @@ root 1 1
user1 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -381,6 +384,7 @@ user1 1 1
user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -388,7 +392,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -515,7 +519,8 @@ user1 1 1
user2 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -671,6 +676,7 @@ user2 1 1
user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -678,7 +684,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -834,7 +840,8 @@ user2 1 1
user3 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -1019,6 +1026,7 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -1026,7 +1034,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -1211,7 +1219,8 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -1395,7 +1404,8 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -1576,7 +1586,8 @@ user3 1 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -1754,7 +1765,8 @@ user3 0 1
user4 1 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1929,6 +1941,7 @@ user3 0 1
user4 0 1
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
index 532fd209e18..f5c4044f40f 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
@@ -70,7 +70,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 1
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -160,6 +161,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -167,7 +169,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -264,7 +266,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 2
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -377,6 +380,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -384,7 +388,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -497,7 +501,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 3
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -626,6 +631,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -633,7 +639,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -762,7 +768,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 4
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -907,6 +914,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -914,7 +922,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -1059,7 +1067,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 5 5
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -1203,7 +1212,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 4 5
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -1344,7 +1354,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 3 5
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -1482,7 +1493,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 2 5
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1617,6 +1629,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 1 5
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
index 76c7311f99c..5b40823e6ff 100644
--- a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
@@ -57,7 +57,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -134,6 +135,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con1;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -141,7 +143,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -225,7 +227,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 connected =================="
+connect con2, localhost, user2, , ;
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -325,6 +328,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con2;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -332,7 +336,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -432,7 +436,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 connected =================="
+connect con3, localhost, user3, , ;
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -548,6 +553,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con3;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -555,7 +561,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -671,7 +677,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 connected =================="
+connect con4, localhost, user4, , ;
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -803,6 +810,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection con4;
select get_lock("marker", 10);
get_lock("marker", 10)
1
@@ -810,7 +818,7 @@ select release_lock("marker");
release_lock("marker")
1
insert into test.t1 values ("marker");
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -942,7 +950,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con1 disconnected =================="
+disconnect con1;
+connection default;
"================== Step 10 =================="
call dump_thread();
username status
@@ -1073,7 +1082,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con2 disconnected =================="
+disconnect con2;
+connection default;
"================== Step 11 =================="
call dump_thread();
username status
@@ -1201,7 +1211,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con3 disconnected =================="
+disconnect con3;
+connection default;
"================== Step 12 =================="
call dump_thread();
username status
@@ -1326,7 +1337,8 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
-"================== con4 disconnected =================="
+disconnect con4;
+connection default;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1448,6 +1460,7 @@ execute dump_users;
USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== WAITS_BY_THREAD truncated =================="
"================== Step 14 =================="
diff --git a/mysql-test/suite/perfschema/r/global_read_lock.result b/mysql-test/suite/perfschema/r/global_read_lock.result
index dab22c79100..6eed64f12d5 100644
--- a/mysql-test/suite/perfschema/r/global_read_lock.result
+++ b/mysql-test/suite/perfschema/r/global_read_lock.result
@@ -3,7 +3,7 @@ update performance_schema.setup_instruments set enabled='YES';
create user pfsuser@localhost;
grant SELECT, UPDATE, LOCK TABLES on performance_schema.* to pfsuser@localhost;
flush privileges;
-connect (con1, localhost, pfsuser, , test);
+connect con1, localhost, pfsuser, , test;
lock tables performance_schema.setup_instruments read;
select * from performance_schema.setup_instruments;
unlock tables;
@@ -29,9 +29,11 @@ where event_name like "wait/synch/cond/sql/MDL_context::COND_wait_status";
event_name short_source timer_end timer_wait operation
wait/synch/cond/sql/MDL_context::COND_wait_status mdl.cc: SET SET timed_wait
unlock tables;
+connection con1;
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
unlock tables;
+disconnect con1;
connection default;
drop user pfsuser@localhost;
flush privileges;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
index d146f5324d0..0abbc7326dc 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'192.0.2.4';
grant select on test.* to 'root'@'192.0.2.4';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
+connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
index 08f280f30a9..c2ec1e1d1e4 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
index 6c1bce7c9a0..fd286dc4c24 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'192.0.2.4';
grant select on test.* to 'root'@'192.0.2.4';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
+connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
index 924b66cf726..d4887df429d 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
index d04a565508f..684897a3b38 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'santa.claus.ipv4.example.com';
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@santa.claus.ipv4.example.com
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
+connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@santa.claus.ipv4.example.com
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
index 1846dbe0719..7f6de0de46d 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
index ea5e91307c8..1f8345a8315 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
@@ -27,19 +27,25 @@ create user 'root'@'santa.claus.ipv4.example.com';
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
create user 'root'@'192.0.2.4';
grant select on test.* to 'root'@'192.0.2.4';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
+connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -68,12 +74,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
index 618bcea553d..3f069d515be 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
index 6cc93cd4a7f..9a85430a6d7 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
@@ -27,15 +27,19 @@ CREATE USER 'plug'@'santa.claus.ipv4.example.com'
CREATE USER 'plug_dest'@'santa.claus.ipv4.example.com'
IDENTIFIED BY 'plug_test_passwd';
GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv4.example.com';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -65,6 +69,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Plugin 'test_plugin_server' is not loaded
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -95,6 +100,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
install plugin test_plugin_server soname 'PLUGIN_AUTH';
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -124,6 +130,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -154,6 +161,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
GRANT PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
TO 'plug'@'santa.claus.ipv4.example.com';
+connect con4,"127.0.0.1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin;
select "Con4 is alive";
Con4 is alive
Con4 is alive
@@ -163,6 +171,8 @@ plug@santa.claus.ipv4.example.com
select current_user();
current_user()
plug_dest@santa.claus.ipv4.example.com
+disconnect con4;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
index 4eae65c4618..011af9b2eaa 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
@@ -28,14 +28,18 @@ create user 'root'@'santa.claus.ipv4.example.com';
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";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -65,6 +69,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -94,6 +99,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -123,6 +129,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -152,6 +159,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -182,6 +190,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
flush hosts;
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -211,6 +220,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -239,10 +249,13 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connection default;
set global debug_dbug= "-d,native_password_bad_reply";
message
Valid connection should reset SUM_CONNECT_ERROR counter
+connection default;
set global debug_dbug= "+d,native_password_bad_reply";
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -272,6 +285,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -301,6 +315,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -330,6 +345,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -359,6 +375,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -388,6 +405,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
index baf9eae9f5c..cfc6c8e4f66 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
index 31e4bc9f843..f294b441411 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
@@ -28,19 +28,25 @@ create user 'quota'@'santa.claus.ipv4.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
with max_connections_per_hour 3;
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+connect con2a,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con2a is alive";
Con2a is alive
Con2a is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+disconnect con2a;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -69,12 +75,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
+connect con2b,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con2b is alive";
Con2b is alive
Con2b is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+disconnect con2b;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -103,12 +112,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
+connect con2c,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con2c is alive";
Con2c is alive
Con2c is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+disconnect con2c;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -138,6 +150,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -167,6 +180,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -200,12 +214,14 @@ grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
with max_user_connections 3;
flush user_resources;
+connect con3a,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con7 is alive";
Con7 is alive
Con7 is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -234,12 +250,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3b,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con3b is alive";
Con3b is alive
Con3b is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -268,12 +286,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3c,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con3c is alive";
Con3c is alive
Con3c is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -303,6 +323,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -332,6 +353,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -360,16 +382,21 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+disconnect con3a;
+disconnect con3b;
+disconnect con3c;
grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
with max_user_connections 0;
flush user_resources;
set global max_user_connections = 3;
+connect con4a,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con4a is alive";
Con4a is alive
Con4a is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -398,12 +425,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con4b,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con4b is alive";
Con4b is alive
Con4b is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -432,12 +461,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con4c,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con4c is alive";
Con4c is alive
Con4c is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -467,6 +498,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -496,6 +528,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -524,15 +557,20 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+disconnect con4a;
+disconnect con4b;
+disconnect con4c;
set global max_user_connections = 0;
set global max_connections = 3;
flush user_resources;
+connect con5a,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con4a is alive";
Con4a is alive
Con4a is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -561,12 +599,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con5b,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
select "Con5b is alive";
Con5b is alive
Con5b is alive
select current_user();
current_user()
quota@santa.claus.ipv4.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -596,6 +636,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -625,6 +666,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -653,6 +695,8 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+disconnect con5a;
+disconnect con5b;
set global max_connections = @saved_max_connections;
set global max_user_connections = @saved_max_user_connections;
drop user 'quota'@'santa.claus.ipv4.example.com';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
index 1c893320340..a172dff7935 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
@@ -27,19 +27,25 @@ create user 'root'@'192.0.2.4';
grant select on test.* to 'root'@'192.0.2.4';
create user 'root'@'santa.claus.ipv4.example.com';
grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
+connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -68,12 +74,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -103,12 +112,15 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+connect con4,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con4 is alive";
Con4 is alive
Con4 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con4;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -137,12 +149,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con5,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con5 is alive";
Con5 is alive
Con5 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con5;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
index 2976f8c9e16..3852a675f81 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -90,6 +95,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -119,6 +125,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
index 68855bbc0ce..f42a300e6ea 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'192.0.2.4';
grant select on test.* to 'root'@'192.0.2.4';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
+connect con2,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@192.0.2.4
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
index f27bda9ada1..d1ce2ac0c25 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
index 69f68de8d90..683376fb088 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
@@ -27,14 +27,18 @@ create user 'user_with'@'santa.claus.ipv4.example.com'
identified by 'good_password';
grant select on test.* to 'user_without'@'santa.claus.ipv4.example.com';
grant select on test.* to 'user_with'@'santa.claus.ipv4.example.com';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -64,6 +68,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -93,6 +98,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -122,6 +128,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -151,6 +158,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -180,6 +188,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
index a3d2b1d273f..353c4a55772 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
@@ -31,14 +31,18 @@ grant select on test.* to 'user_ssl_x509'@'santa.claus.ipv4.example.com'
REQUIRE SUBJECT '/C=??/ST=??/L=??/
O=No such thing/
CN=Santa Claus/emailAddress=santa.claus@example.com';
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -68,6 +72,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -97,6 +102,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
@@ -126,6 +132,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv4.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
index 36d7692f824..93bcca91300 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'2001:db8::6:6';
grant select on test.* to 'root'@'2001:db8::6:6';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
+connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"::1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
index d241bede905..d386d30c2d7 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
index 37470bdc0bb..41006170ab4 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'2001:db8::6:6';
grant select on test.* to 'root'@'2001:db8::6:6';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
+connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"::1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
index b14fb2f955e..d67f8cce707 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
index 410f116f4d0..ccb3c7564f2 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'santa.claus.ipv6.example.com';
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@santa.claus.ipv6.example.com
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
+connect con3,"::1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@santa.claus.ipv6.example.com
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
index b88bb94343f..01a70fd2183 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
@@ -22,14 +22,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -59,6 +63,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
index 6ccb3b66f22..b4f1a39fcce 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
@@ -27,19 +27,25 @@ create user 'root'@'santa.claus.ipv6.example.com';
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
create user 'root'@'2001:db8::6:6';
grant select on test.* to 'root'@'2001:db8::6:6';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
+connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -68,12 +74,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"::1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
index 73741cf42ed..22271f4ba5f 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
index 8042071c68f..dea4d07f593 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
@@ -27,15 +27,19 @@ CREATE USER 'plug'@'santa.claus.ipv6.example.com'
CREATE USER 'plug_dest'@'santa.claus.ipv6.example.com'
IDENTIFIED BY 'plug_test_passwd';
GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv6.example.com';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -65,6 +69,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Plugin 'test_plugin_server' is not loaded
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -95,6 +100,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
install plugin test_plugin_server soname 'PLUGIN_AUTH';
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -124,6 +130,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -154,6 +161,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
GRANT PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com'
TO 'plug'@'santa.claus.ipv6.example.com';
+connect con4,"::1",plug,plug_dest,test,$MASTER_MYPORT,,,auth_test_plugin;
select "Con4 is alive";
Con4 is alive
Con4 is alive
@@ -163,6 +171,8 @@ plug@santa.claus.ipv6.example.com
select current_user();
current_user()
plug_dest@santa.claus.ipv6.example.com
+disconnect con4;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
index a0c2d8bdfa6..5f9f47fc8da 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
@@ -28,14 +28,18 @@ create user 'root'@'santa.claus.ipv6.example.com';
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";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -65,6 +69,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -94,6 +99,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -123,6 +129,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -152,6 +159,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -182,6 +190,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
flush hosts;
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -211,6 +220,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -239,10 +249,13 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connection default;
set global debug_dbug= "-d,native_password_bad_reply";
message
Valid connection should reset SUM_CONNECT_ERROR counter
+connection default;
set global debug_dbug= "+d,native_password_bad_reply";
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -272,6 +285,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -301,6 +315,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -330,6 +345,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -359,6 +375,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -388,6 +405,7 @@ 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'
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
index 4416b78d009..d97fe0a82ff 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
@@ -28,19 +28,25 @@ create user 'quota'@'santa.claus.ipv6.example.com';
grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
with max_connections_per_hour 3;
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+connect con2a,"::1",quota,,test,$MASTER_MYPORT,;
select "Con2a is alive";
Con2a is alive
Con2a is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+disconnect con2a;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -69,12 +75,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
+connect con2b,"::1",quota,,test,$MASTER_MYPORT,;
select "Con2b is alive";
Con2b is alive
Con2b is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+disconnect con2b;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -103,12 +112,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
+connect con2c,"::1",quota,,test,$MASTER_MYPORT,;
select "Con2c is alive";
Con2c is alive
Con2c is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+disconnect con2c;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -138,6 +150,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN null
LAST_ERROR_SEEN null
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -167,6 +180,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -200,12 +214,14 @@ grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
with max_user_connections 3;
flush user_resources;
+connect con3a,"::1",quota,,test,$MASTER_MYPORT,;
select "Con7 is alive";
Con7 is alive
Con7 is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -234,12 +250,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3b,"::1",quota,,test,$MASTER_MYPORT,;
select "Con3b is alive";
Con3b is alive
Con3b is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -268,12 +286,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3c,"::1",quota,,test,$MASTER_MYPORT,;
select "Con3c is alive";
Con3c is alive
Con3c is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -303,6 +323,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -332,6 +353,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -360,16 +382,21 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+disconnect con3a;
+disconnect con3b;
+disconnect con3c;
grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
with max_user_connections 0;
flush user_resources;
set global max_user_connections = 3;
+connect con4a,"::1",quota,,test,$MASTER_MYPORT,;
select "Con4a is alive";
Con4a is alive
Con4a is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -398,12 +425,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con4b,"::1",quota,,test,$MASTER_MYPORT,;
select "Con4b is alive";
Con4b is alive
Con4b is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -432,12 +461,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con4c,"::1",quota,,test,$MASTER_MYPORT,;
select "Con4c is alive";
Con4c is alive
Con4c is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -467,6 +498,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -496,6 +528,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 42000: User quota already has more than 'max_user_connections' active connections
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -524,15 +557,20 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+disconnect con4a;
+disconnect con4b;
+disconnect con4c;
set global max_user_connections = 0;
set global max_connections = 3;
flush user_resources;
+connect con5a,"::1",quota,,test,$MASTER_MYPORT,;
select "Con4a is alive";
Con4a is alive
Con4a is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -561,12 +599,14 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con5b,"::1",quota,,test,$MASTER_MYPORT,;
select "Con5b is alive";
Con5b is alive
Con5b is alive
select current_user();
current_user()
quota@santa.claus.ipv6.example.com
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -596,6 +636,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -625,6 +666,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -653,6 +695,8 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+disconnect con5a;
+disconnect con5b;
set global max_connections = @saved_max_connections;
set global max_user_connections = @saved_max_user_connections;
drop user 'quota'@'santa.claus.ipv6.example.com';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
index a2b9a32c764..4fdc6ef1b4c 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
@@ -27,19 +27,25 @@ create user 'root'@'2001:db8::6:6';
grant select on test.* to 'root'@'2001:db8::6:6';
create user 'root'@'santa.claus.ipv6.example.com';
grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
+connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -68,12 +74,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"::1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -103,12 +112,15 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+connect con4,"::1",root,,test,$MASTER_MYPORT,;
select "Con4 is alive";
Con4 is alive
Con4 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con4;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -137,12 +149,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con5,"::1",root,,test,$MASTER_MYPORT,;
select "Con5 is alive";
Con5 is alive
Con5 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con5;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
index 373ed10677a..59891d359ff 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -90,6 +95,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -119,6 +125,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
index 99b47be724f..9e88dcf66b3 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
@@ -25,19 +25,25 @@ select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
create user 'root'@'2001:db8::6:6';
grant select on test.* to 'root'@'2001:db8::6:6';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
+connect con2,"::1",root,,test,$MASTER_MYPORT,;
select "Con2 is alive";
Con2 is alive
Con2 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con2;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -66,12 +72,15 @@ COUNT_LOCAL_ERRORS 0
COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
+connect con3,"::1",root,,test,$MASTER_MYPORT,;
select "Con3 is alive";
Con3 is alive
Con3 is alive
select current_user();
current_user()
root@2001:db8::6:6
+disconnect con3;
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
index 32a06e8105f..7bbff5f30db 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
@@ -23,14 +23,18 @@ select `User`, `Host` from mysql.`user` where `user` like '2001:%';
User Host
select `User`, `Host` from mysql.`user` where `user` like 'santa.claus.%';
User Host
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
@@ -60,6 +64,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MariaDB server
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST NULL
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
index 5c3b363c5cd..d35dc133015 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
@@ -27,14 +27,18 @@ create user 'user_with'@'santa.claus.ipv6.example.com'
identified by 'good_password';
grant select on test.* to 'user_without'@'santa.claus.ipv6.example.com';
grant select on test.* to 'user_with'@'santa.claus.ipv6.example.com';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -64,6 +68,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -93,6 +98,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -122,6 +128,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -151,6 +158,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -180,6 +188,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
index 422db77b5ae..03be70e1553 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
@@ -31,14 +31,18 @@ grant select on test.* to 'user_ssl_x509'@'santa.claus.ipv6.example.com'
REQUIRE SUBJECT '/C=??/ST=??/L=??/
O=No such thing/
CN=Santa Claus/emailAddress=santa.claus@example.com';
+connect con1,"::1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -68,6 +72,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -97,6 +102,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
@@ -126,6 +132,7 @@ COUNT_UNKNOWN_ERRORS 0
FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv6.example.com' (using password: YES)
+connection default;
"Dumping performance_schema.host_cache"
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
diff --git a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
index 70618be6145..35b11567252 100644
--- a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
+++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
@@ -30,14 +30,18 @@ Connection_errors_max_connections 0
Connection_errors_peer_address 0
Connection_errors_select 0
Connection_errors_tcpwrap 0
+connect con1,"127.0.0.1",root,,test,$MASTER_MYPORT,;
select "Con1 is alive";
Con1 is alive
Con1 is alive
select current_user();
current_user()
root@localhost
+disconnect con1;
+connection default;
set global debug_dbug= "+d,vio_peer_addr_error";
ERROR HY000: Can't get hostname for your address
+connection default;
show global status like "connection_errors_%";
Variable_name Value
Connection_errors_accept 0
@@ -48,6 +52,7 @@ Connection_errors_select 0
Connection_errors_tcpwrap 0
"Dumping performance_schema.host_cache"
ERROR HY000: Can't get hostname for your address
+connection default;
show global status like "connection_errors_%";
Variable_name Value
Connection_errors_accept 0
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
index 2bf65c30e4a..6a4233d2e42 100644
--- a/mysql-test/suite/perfschema/r/nesting.result
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -1,4 +1,4 @@
-"================== con1 connected =================="
+connect con1, localhost, user1, , ;
select "MARKER_BEGIN" as marker;
marker
MARKER_BEGIN
@@ -24,7 +24,7 @@ MARKER_END
select "Con1 is done with payload" as status;
status
Con1 is done with payload
-"================== con1 done =================="
+connection default;
set @con1_tid = (select thread_id from performance_schema.threads
where processlist_user = 'user1');
select (@con1_tid is not null) as expected;
@@ -239,3 +239,4 @@ select "With a third part to make things complete" as payload NULL NULL
126 126 wait/synch/mutex/sql/THD::LOCK_thd_data lock STATEMENT 110
127 128 stage/sql/cleaning up (stage) STATEMENT 110
128 128 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 127
+disconnect con1;
diff --git a/mysql-test/suite/perfschema/r/one_thread_per_con.result b/mysql-test/suite/perfschema/r/one_thread_per_con.result
index 998aba6281c..03966ad8556 100644
--- a/mysql-test/suite/perfschema/r/one_thread_per_con.result
+++ b/mysql-test/suite/perfschema/r/one_thread_per_con.result
@@ -1,3 +1,7 @@
+connect con1, localhost, root, , ;
+connect con2, localhost, root, , ;
+connect con3, localhost, root, , ;
+connection default;
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/mutex/mysys/THR_LOCK_myisam";
drop table if exists test.t1;
@@ -7,13 +11,13 @@ truncate table performance_schema.events_waits_history_long;
show variables like "thread_handling";
Variable_name Value
thread_handling one-thread-per-connection
-"----------------- Connection 1"
+connection con1;
create table test.t1(a int) engine=MYISAM;
-"----------------- Connection 2"
+connection con2;
create table test.t2(a int) engine=MYISAM;
-"----------------- Connection 3"
+connection con3;
create table test.t3(a int) engine=MYISAM;
-"----------------- Connection default"
+connection default;
execute stmt_dump_events using @tid;
event_name short_source operation number_of_bytes
wait/synch/mutex/mysys/THR_LOCK_myisam mi_create.c: lock NULL
@@ -36,3 +40,10 @@ drop table test.t1;
drop table test.t2;
drop table test.t3;
update performance_schema.setup_instruments set enabled='YES';
+connection con1;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection con3;
+disconnect con3;
+connection default;
diff --git a/mysql-test/suite/perfschema/r/privilege.result b/mysql-test/suite/perfschema/r/privilege.result
index 1f806d94991..09d32a177fd 100644
--- a/mysql-test/suite/perfschema/r/privilege.result
+++ b/mysql-test/suite/perfschema/r/privilege.result
@@ -214,6 +214,7 @@ can select
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
can select
can select
+connect con1, localhost, pfs_user_1, , ;
drop table if exists test.t1;
rename table performance_schema.setup_instruments to test.t1;
ERROR 42000: Access denied for user 'pfs_user_1'@'localhost' to database 'performance_schema'
@@ -312,6 +313,8 @@ can select
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
can select
can select
+disconnect con1;
+connect con2, localhost, pfs_user_2, , ;
drop table if exists test.t1;
rename table performance_schema.setup_instruments to test.t1;
ERROR 42000: Access denied for user 'pfs_user_2'@'localhost' to database 'performance_schema'
@@ -410,6 +413,8 @@ can select
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
can select
can select
+disconnect con2;
+connect con3, localhost, pfs_user_3, , ;
drop table if exists test.t1;
rename table performance_schema.setup_instruments to test.t1;
ERROR 42000: Access denied for user 'pfs_user_3'@'localhost' to database 'performance_schema'
@@ -504,6 +509,8 @@ SELECT "can select" FROM performance_schema.events_waits_summary_by_instance LIM
ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_summary_by_instance'
SELECT "can select" FROM performance_schema.file_summary_by_instance LIMIT 1;
ERROR 42000: SELECT command denied to user 'pfs_user_3'@'localhost' for table 'file_summary_by_instance'
+disconnect con3;
+connection default;
revoke all privileges, grant option from 'pfs_user_1'@localhost;
revoke all privileges, grant option from 'pfs_user_2'@localhost;
revoke all privileges, grant option from 'pfs_user_3'@localhost;
@@ -514,10 +521,12 @@ flush privileges;
# Test cases from WL#4818
# Setup user
CREATE user pfs_user_4;
+connect pfs_user_4, localhost, pfs_user_4, , ;
#
# WL#4818, NFS4: Normal user does not have access to view data
# without grants
#
+connection pfs_user_4;
# Select as pfs_user_4 should fail without grant
SELECT event_id FROM performance_schema.events_waits_history;
ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'events_waits_history'
@@ -533,6 +542,7 @@ ERROR 42000: SELECT command denied to user 'pfs_user_4'@'localhost' for table 'f
# WL#4818, NFS3: Normal user does not have access to change what is
# instrumented without grants
#
+connection pfs_user_4;
# User pfs_user_4 should not be allowed to tweak instrumentation without
# explicit grant
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
@@ -555,6 +565,7 @@ ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table 'eve
# WL#4814, NFS1: Can use grants to give normal user access
# to turn on and off instrumentation
#
+connection default;
# Grant access to change tables with the root account
GRANT UPDATE ON performance_schema.setup_consumers TO pfs_user_4;
GRANT UPDATE, SELECT ON performance_schema.setup_timers TO pfs_user_4;
@@ -562,6 +573,7 @@ GRANT UPDATE, SELECT ON performance_schema.setup_instruments TO pfs_user_4;
GRANT DROP ON performance_schema.events_waits_current TO pfs_user_4;
GRANT DROP ON performance_schema.events_waits_history TO pfs_user_4;
GRANT DROP ON performance_schema.events_waits_history_long TO pfs_user_4;
+connection pfs_user_4;
# User pfs_user_4 should now be allowed to tweak instrumentation
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
@@ -573,6 +585,8 @@ TRUNCATE TABLE performance_schema.events_waits_history_long;
TRUNCATE TABLE performance_schema.events_waits_history;
TRUNCATE TABLE performance_schema.events_waits_current;
# Clean up
+disconnect pfs_user_4;
+connection default;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM pfs_user_4;
DROP USER pfs_user_4;
flush privileges;
diff --git a/mysql-test/suite/perfschema/r/read_only.result b/mysql-test/suite/perfschema/r/read_only.result
index b2502808821..045e3232fda 100644
--- a/mysql-test/suite/perfschema/r/read_only.result
+++ b/mysql-test/suite/perfschema/r/read_only.result
@@ -3,7 +3,7 @@ set @start_read_only= @@global.read_only;
create user pfsuser@localhost;
grant SELECT, UPDATE on performance_schema.* to pfsuser@localhost;
flush privileges;
-connect (con1, localhost, pfsuser, , test);
+connect con1, localhost, pfsuser, , test;
connection default;
set global read_only=0;
connection con1;
@@ -33,7 +33,8 @@ update performance_schema.setup_instruments set enabled='YES';
connection default;
grant super on *.* to pfsuser@localhost;
flush privileges;
-connect (con1, localhost, pfsuser, , test);
+disconnect con1;
+connect con1, localhost, pfsuser, , test;
select @@global.read_only;
@@global.read_only
1
@@ -44,6 +45,7 @@ GRANT SELECT, UPDATE ON `performance_schema`.* TO 'pfsuser'@'localhost'
select * from performance_schema.setup_instruments;
update performance_schema.setup_instruments set enabled='NO';
update performance_schema.setup_instruments set enabled='YES';
+disconnect con1;
connection default;
set global read_only= @start_read_only;
drop user pfsuser@localhost;
diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result
index 284b36e722f..8dcecf0dc9c 100644
--- a/mysql-test/suite/perfschema/r/relaylog.result
+++ b/mysql-test/suite/perfschema/r/relaylog.result
@@ -1,6 +1,7 @@
include/master-slave.inc
[connection master]
drop table if exists test.t1;
+connection slave;
reset master;
create table test.t1(a int);
drop table test.t1;
@@ -10,7 +11,7 @@ slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; create table test.t1(a int)
slave-bin.000001 # Gtid # # GTID #-#-#
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
-"============ Performance schema on master ============"
+connection master;
select
substring(file_name, locate("master-", file_name)) as FILE_NAME,
EVENT_NAME,
@@ -82,6 +83,7 @@ where event_name like "%MYSQL_RELAY_LOG%"
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
wait/synch/cond/sql/MYSQL_RELAY_LOG::COND_queue_busy 0 0 0 0 0
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 0 0 0 0 0
+connection slave;
"============ Performance schema on slave ============"
select * from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
diff --git a/mysql-test/suite/perfschema/r/rpl_gtid_func.result b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
index d5f764013df..b07c29a054c 100644
--- a/mysql-test/suite/perfschema/r/rpl_gtid_func.result
+++ b/mysql-test/suite/perfschema/r/rpl_gtid_func.result
@@ -1,6 +1,6 @@
include/master-slave.inc
[connection master]
-**** On Master ****
+connection master;
drop table if exists test.marker;
create table test.marker(a int) engine=innodb;
insert into test.marker values (1);
@@ -11,12 +11,12 @@ truncate table performance_schema.events_waits_history_long;
truncate table performance_schema.events_statements_summary_by_digest;
update performance_schema.setup_instruments
set enabled='YES', timed='YES';
-**** On Slave ****
+connection slave;
truncate table performance_schema.events_waits_history_long;
truncate table performance_schema.events_statements_summary_by_digest;
update performance_schema.setup_instruments
set enabled='YES', timed='NO';
-**** On Master ****
+connection master;
select * from performance_schema.setup_instruments
where timed='NO';
NAME ENABLED TIMED
@@ -39,7 +39,7 @@ where digest_text like "%in_%_digest%";
digest_text count_star
SELECT ? AS `in_master_digest` 1
insert into test.marker values (2);
-**** On Slave ****
+connection slave;
select * from test.marker;
a
1
@@ -65,10 +65,10 @@ from performance_schema.events_statements_summary_by_digest
where digest_text like "%in_%_digest%";
digest_text count_star
SELECT ? AS `in_slave_digest` 1
-**** On Master ****
+connection master;
delete from performance_schema.setup_objects
where object_schema='master';
-**** On Slave ****
+connection slave;
delete from performance_schema.setup_objects
where object_schema='slave';
select * from performance_schema.setup_objects;
diff --git a/mysql-test/suite/perfschema/r/rpl_statements.result b/mysql-test/suite/perfschema/r/rpl_statements.result
index 081710f1d54..431b8445309 100644
--- a/mysql-test/suite/perfschema/r/rpl_statements.result
+++ b/mysql-test/suite/perfschema/r/rpl_statements.result
@@ -4,10 +4,7 @@ include/master-slave.inc
#
# STEP 1 - CREATE AND REPLICATE TEST TABLES
#
-
-**************
-*** MASTER ***
-**************
+connection master;
*** Create test tables
@@ -19,24 +16,18 @@ 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 ***
-**************
+connection slave;
*** Clear statement events
#
# STEP 2 - REPLICATE ONE ROW ON MASTER TO GET REPLICATION THREAD ID ON SLAVE
#
-**************
-*** MASTER ***
-**************
+connection master;
insert into test.marker values (0);
-**************
-*** SLAVE ***
-**************
+connection slave;
*** Verify row, get replication thread id, clear statement events
@@ -51,9 +42,7 @@ Expect 1
#
# STEP 3 - PERFORM DML STATEMENTS ON MASTER
#
-**************
-*** MASTER ***
-**************
+connection master;
show variables like 'binlog_format%';
Variable_name Value
@@ -130,9 +119,7 @@ where (thread_id=@my_thread_id and digest_text like '%marker%'));
#
# STEP 5 - VERIFY DML AND DDL STATEMENT EVENTS ON SLAVE
#
-**************
-*** SLAVE ***
-**************
+connection slave;
*** List statement events from master
@@ -203,9 +190,7 @@ statement/abstract/relay_log NO NO
#
# STEP 7 - UPDATE TABLES ON MASTER, REPLICATE
#
-**************
-*** MASTER ***
-**************
+connection master;
*** Clear statement events
*** Update some tables, then replicate
@@ -215,9 +200,7 @@ 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 ***
-**************
+connection slave;
*** Confirm rows were replicated
diff --git a/mysql-test/suite/perfschema/r/setup_actors.result b/mysql-test/suite/perfschema/r/setup_actors.result
index 187b558e827..3474b678321 100644
--- a/mysql-test/suite/perfschema/r/setup_actors.result
+++ b/mysql-test/suite/perfschema/r/setup_actors.result
@@ -28,34 +28,34 @@ grant ALL on *.* to user4@localhost;
create user user5@localhost;
grant select on test.* to user5@localhost;
flush privileges;
-# Switch to (con1, localhost, user1, , )
+connect con1, localhost, user1, , ;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND NO user1 localhost
-# Switch to connection default
+connection default;
insert into performance_schema.setup_actors
values ('%', 'user1', '%');
-# Switch to connection con1
+connection con1;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND NO user1 localhost
-# Disconnect con1
-# Switch to (con2, localhost, user2, , )
+disconnect con1;
+connect con2, localhost, user2, , ;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID=connection_id();
NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND YES user2 localhost
-# Disconnect con2
-# Switch to connection default
+disconnect con2;
+connection default;
drop table if exists test.t1;
create table test.t1 (col1 bigint);
lock table test.t1 write;
-# Switch to (con3, localhost, user3, , )
+connect con3, localhost, user3, , ;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -64,7 +64,7 @@ thread/sql/one_connection FOREGROUND YES user3 localhost
# Send a statement to the server, but do not wait till the result
# comes back. We will pull this later.
insert into test.t1 set col1 = 1;
-# Switch to (con4, localhost, user4, , )
+connect con4, localhost, user4, , ;
# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
select count(*) = 1
from performance_schema.threads T inner join information_schema.PROCESSLIST P
@@ -74,20 +74,21 @@ T.PROCESSLIST_COMMAND = P.COMMAND and T.PROCESSLIST_INFO = P.INFO
where T.PROCESSLIST_USER = 'user3' and T.NAME = 'thread/sql/one_connection';
count(*) = 1
1
-# Switch to connection default
+connection default;
unlock tables;
-# Switch to connection con3 and reap the result of the no more blocked insert
-# Switch to connection default
+connection con3;
+# Reap the result of the no more blocked insert
+connection default;
drop table test.t1;
-# Disconnect con3
-# Switch to connection con4
+disconnect con3;
+connection con4;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND NO user4 localhost
-# Disconnect con4
-# Switch to connection default
+disconnect con4;
+connection default;
insert into performance_schema.setup_actors
values ('localhost', '%', '%');
select * from performance_schema.setup_actors
@@ -99,27 +100,27 @@ localhost % %
hosta user1 %
% user2 %
localhost user3 %
-# Switch to (con4b, localhost, user4, , )
+connect con4b, localhost, user4, , ;
select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND YES user4 localhost
-# Disconnect con4b
-# Switch to connection default
+disconnect con4b;
+connection default;
insert into performance_schema.setup_actors
values ('%', 'user5', '%');
create sql security definer view test.v1 as select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
-# Switch to (con5, localhost, user5, , )
+connect con5, localhost, user5, , ;
select * from performance_schema.threads;
ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table 'threads'
select * from test.v1;
NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
thread/sql/one_connection FOREGROUND YES user5 localhost
-# Disconnect con5
-# Switch to connection default and cleanup
+disconnect con5;
+connection default;
drop view test.v1;
revoke all privileges, grant option from user1@localhost;
revoke all privileges, grant option from user2@localhost;
diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result
index 10540fd3071..1ac22f6ca34 100644
--- a/mysql-test/suite/perfschema/r/socket_connect.result
+++ b/mysql-test/suite/perfschema/r/socket_connect.result
@@ -1,6 +1,7 @@
#==============================================================================
# Establish the level of IPV6 support
#==============================================================================
+connection default;
#==============================================================================
# Get hostname, port number
#==============================================================================
@@ -73,6 +74,7 @@ Expect 1
# Switch to connection default
+connection default;
#==============================================================================
# 3.0 ESTABLISH TCP/IP CONNECTION 2
# Connect with IP = localhost (127.0.0.1 or ::1)
@@ -129,6 +131,7 @@ Expect 1
#==============================================================================
# 4.0 Verify both connections exist in the instance tables
#==============================================================================
+connection default;
# 4.1 Verify that there are two TCP/IP connections in the socket instance table
@@ -152,7 +155,12 @@ Expect 1
# 5.0 Drop the client connections
#==============================================================================
# 5.1 Disconnect con1
+connection con1;
+disconnect con1;
# 5.2 Disconnect con2
+connection con2;
+disconnect con2;
+connection default;
#==============================================================================
# 6.0 Verify sockets were removed from the instance tables
#==============================================================================
diff --git a/mysql-test/suite/perfschema/r/socket_instances_func.result b/mysql-test/suite/perfschema/r/socket_instances_func.result
index ee1eac73879..8792730fa29 100644
--- a/mysql-test/suite/perfschema/r/socket_instances_func.result
+++ b/mysql-test/suite/perfschema/r/socket_instances_func.result
@@ -5,7 +5,7 @@ SELECT * FROM performance_schema.socket_instances;
SELECT THREAD_ID INTO @thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-# Establish local TCP/IP connection (con1,localhost,root,,test,,)
+connect con1,$my_localhost,root,,test,,$MASTER_MYPORT;
# Store the thread id of connection 1 (tcp/ip)
SELECT THREAD_ID INTO @thread_id
FROM performance_schema.threads
@@ -14,8 +14,8 @@ WHERE PROCESSLIST_ID = CONNECTION_ID();
SELECT PORT INTO @port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
-# Switch to connection default
-# Establish second local TCP/IP connection (con1,localhost,root,,test,,)
+connection default;
+connect con2,$my_localhost,root,,test,,$MASTER_MYPORT;
# Store the thread_id of connection 2 (tcp/ip)
SELECT THREAD_ID INTO @thread_id
FROM performance_schema.threads
@@ -24,8 +24,8 @@ WHERE PROCESSLIST_ID = CONNECTION_ID();
SELECT PORT INTO @port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
-# Switch to connection default
-# Establish local unix domain connection (con3,localhost,root,,test,,)
+connection default;
+connect con3,localhost,root,,test,,;
# Store the thread id of connection 3 (unix domain)
SELECT THREAD_ID INTO @thread_id
FROM performance_schema.threads
@@ -34,7 +34,7 @@ WHERE PROCESSLIST_ID = CONNECTION_ID();
SELECT PORT INTO @port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @thread_id;
-# Switch to connection default
+connection default;
# EVENT_NAME is the "wait/io/socket/*" instrument identifier.
SELECT COUNT(*) = 0 AS "Expect 1"
FROM performance_schema.socket_instances
@@ -196,7 +196,14 @@ EVENT_NAME IP
wait/io/socket/sql/client_connection <LOCALHOST>
wait/io/socket/sql/client_connection <LOCALHOST>
wait/io/socket/sql/client_connection
-# Disconnect con1, con2 and con3
+connection default;
+connection con1;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection con3;
+disconnect con3;
+connection default;
# After waiting a bit we should have no differences to socket_instances
# before con1, con2, con3 connecting.
SELECT *
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
index 9cd668c8e7a..455b6a2ad00 100644
--- a/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
@@ -1,6 +1,7 @@
#==============================================================================
# Establish the level of IPV6 support
#==============================================================================
+connection default;
#==============================================================================
# Get hostname, port number
#==============================================================================
@@ -12,6 +13,7 @@ SELECT @@port INTO @MY_MASTER_PORT;
# 1.1 Disable instrumentation of the default (this) connection
+connection default;
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
@@ -74,23 +76,27 @@ TRUNCATE performance_schema.socket_summary_by_event_name;
for later comparison to the 'after' byte count as a simple confirmation
that the table was updated.
+connection default;
SELECT sum(SUM_NUMBER_OF_BYTES_WRITE) INTO @my_write_count
FROM performance_schema.socket_summary_by_instance;
# 3.3 From connection 1, insert one a 1K row of data into t1
+connection con1;
USE mysqltest;
INSERT INTO t1 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t1 (s1) SELECT s1 FROM t1;
# 3.4 From connection 2, insert one a 1K row of data into t2
+connection con2;
USE mysqltest;
INSERT INTO t2 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t2 (s1) SELECT s1 FROM t2;
# 3.5 Get the 'after' sum of bytes written from socket_summary_by_instance
+connection default;
SELECT sum(SUM_NUMBER_OF_BYTES_WRITE) INTO @my_write_count
FROM performance_schema.socket_summary_by_instance;
@@ -112,10 +118,15 @@ consistent with totals in socket_summary_by_instance
# 5.1 Disconnect con1
+connection con1;
+disconnect con1;
# 5.2 Disconnect con2
+connection con2;
+disconnect con2;
# 5.3 Drop mysqltest
+connection default;
DROP DATABASE mysqltest;
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
index 21b99360e64..bf515500c2f 100644
--- a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
@@ -46,51 +46,63 @@ DROP USER 'root0123456789'@'localhost';
# length of user name = 4 character
# length of default db = 9 character
# connection runs through server_tcpip_socket !
+connect con1,localhost,root,,mysqltest,,;
DO 1;
+connection default;
# 3 Variations on SELECT
# 3.1 Check a SELECT ending with server sending an error message.
# Error message is short (unknown table).
SELECT col2 FROM does_not_exist;
ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
+connection default;
# 3.2 SELECT ending with server sending an error message.
# Now the statement is a bit longer but the error message
# length does again not depend on statement.
SELECT col2 FROM does_not_exist WHERE col1 = 0;
ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
+connection default;
# 3.3 SELECT ending with server sending an error message.
# The statement has the same length like in 3.2 but the error
# message is now different and much longer.
SELECT col2 FROM does_not_exist WHERE col1 A 0;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'A 0' at line 1
+connection default;
# 3.4 SELECT ending with server sending an error message.
# Statement and error message are a bit longer than in 3.1
# because the table name is longer.
SELECT col2 FROM does_not_exist0123;
ERROR 42S02: Table 'mysqltest.does_not_exist0123' doesn't exist
+connection default;
# 3.5 SELECT earning an empty result set.
SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1;
col2
+connection default;
# 3.6 SELECT earning an empty result set.
# Short column name is replaced by longer alias.
SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1;
my_super_col
+connection default;
# 3.7 SELECT earning one row with an empty string.
SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1;
col2
+connection default;
# 3.8 SELECT earning one row with one string one char long.
SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2;
col2
a
+connection default;
# 3.9 SELECT earning one row with one string 1024 char long.
SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3;
col2
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+connection default;
# 3.10 SELECT earning two rows with an empty string
SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2;
col2
+connection default;
# 3.11 Check that the preceding Connects/SQL command runs have not
# caused some unexpected state.
# 4. Check delta (value_after_action - value_before_action) details
@@ -205,3 +217,4 @@ col2
# It must reset all counters.
TRUNCATE TABLE performance_schema.socket_summary_by_instance;
# 6. Cleanup
+connection default;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_function.result b/mysql-test/suite/perfschema/r/stage_mdl_function.result
index 098ff4f2132..eb72fa338aa 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_function.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_function.result
@@ -1,3 +1,4 @@
+connect con1, localhost, user1, , ;
drop function if exists test.f1;
create function test.f1() returns int
return 1;
@@ -5,7 +6,9 @@ begin;
select test.f1();
test.f1()
1
+connect con2, localhost, user2, , ;
drop function test.f1;
+connection default;
call dump_one_thread('user1');
username event_name sql_text
user1 statement/sql/select select test.f1()
@@ -28,7 +31,12 @@ username event_name nesting_event_type
user2 stage/sql/Waiting for stored function metadata lock STATEMENT
username event_name nesting_event_type
user2 stage/sql/init STATEMENT
+connection con1;
select f1();
f1()
1
commit;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection default;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_global.result b/mysql-test/suite/perfschema/r/stage_mdl_global.result
index b476689338e..f82874bef74 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_global.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_global.result
@@ -1,5 +1,8 @@
+connect con1, localhost, user1, , ;
flush tables with read lock;
+connect con2, localhost, user2, , ;
insert into test.t1 values (1), (2), (3);
+connection default;
call dump_one_thread('user1');
username event_name sql_text
user1 statement/sql/flush flush tables with read lock
@@ -22,4 +25,9 @@ username event_name nesting_event_type
user2 stage/sql/init STATEMENT
user2 stage/sql/checking permissions STATEMENT
user2 stage/sql/Opening tables STATEMENT
+connection con1;
unlock tables;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection default;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
index 1eeae4fc4fa..8f7e70bc740 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
@@ -1,3 +1,4 @@
+connect con1, localhost, user1, , ;
drop function if exists test.f1;
drop procedure if exists test.p1;
create function test.f1() returns int
@@ -12,7 +13,9 @@ begin;
select test.f1();
test.f1()
1
+connect con2, localhost, user2, , ;
drop procedure test.p1;
+connection default;
call dump_one_thread('user1');
username event_name sql_text
user1 statement/sql/select select test.f1()
@@ -35,8 +38,13 @@ username event_name nesting_event_type
user2 stage/sql/Waiting for stored procedure metadata lock STATEMENT
username event_name nesting_event_type
user2 stage/sql/init STATEMENT
+connection con1;
select test.f1();
test.f1()
1
commit;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection default;
drop function test.f1;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_table.result b/mysql-test/suite/perfschema/r/stage_mdl_table.result
index 0699c28ac47..f7d519bedeb 100644
--- a/mysql-test/suite/perfschema/r/stage_mdl_table.result
+++ b/mysql-test/suite/perfschema/r/stage_mdl_table.result
@@ -1,3 +1,4 @@
+connect con1, localhost, user1, , ;
begin;
insert into test.t1 values (1), (2), (3);
commit;
@@ -7,7 +8,9 @@ a
1
2
3
+connect con2, localhost, user2, , ;
alter table test.t1 add column (b int);
+connection default;
call dump_one_thread('user1');
username event_name sql_text
user1 statement/sql/select select * from test.t1 for update
@@ -38,4 +41,9 @@ user2 stage/sql/After opening tables STATEMENT
user2 stage/sql/setup STATEMENT
user2 stage/sql/creating table STATEMENT
user2 stage/sql/After create STATEMENT
+connection con1;
commit;
+disconnect con1;
+connection con2;
+disconnect con2;
+connection default;
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 189a3200a91..73a4696070d 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -303,9 +306,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -369,6 +374,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -407,7 +413,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -471,9 +477,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -542,6 +550,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -587,7 +596,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -656,9 +665,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -732,6 +743,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -784,7 +796,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -858,11 +870,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 0
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -936,6 +949,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1087,7 +1101,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1160,7 +1174,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1232,7 +1246,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1303,7 +1317,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1373,6 +1387,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 b4fbf37265a..bb7cfdc92c7 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -302,9 +305,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -368,6 +373,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -406,7 +412,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -470,9 +476,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -541,6 +549,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -586,7 +595,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -655,9 +664,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -731,6 +742,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -783,7 +795,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -857,11 +869,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 132
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -935,6 +948,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1086,7 +1100,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1159,7 +1173,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1231,7 +1245,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1302,7 +1316,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1372,6 +1386,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 d20378236f5..816df3de09a 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -303,9 +306,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -369,6 +374,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -407,7 +413,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -471,9 +477,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -542,6 +550,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -587,7 +596,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -656,9 +665,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -732,6 +743,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -784,7 +796,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -858,11 +870,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 0
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -936,6 +949,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1087,7 +1101,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1160,7 +1174,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1232,7 +1246,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1303,7 +1317,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1373,6 +1387,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 087ed9e63ab..d44488d75f9 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -302,9 +305,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -368,6 +373,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -406,7 +412,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -470,9 +476,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -541,6 +549,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -586,7 +595,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -655,9 +664,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -731,6 +742,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -783,7 +795,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -857,11 +869,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 132
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -935,6 +948,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1086,7 +1100,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1159,7 +1173,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1231,7 +1245,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1302,7 +1316,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1372,6 +1386,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 860059fe0eb..a70e6ee1df5 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
@@ -150,9 +150,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -211,6 +213,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -242,7 +245,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -375,6 +380,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -413,7 +419,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -481,9 +487,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -556,6 +564,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -601,7 +610,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -674,9 +683,11 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -754,6 +765,7 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -806,7 +818,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -884,11 +896,12 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -966,6 +979,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1125,7 +1139,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1202,7 +1216,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1278,7 +1292,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1353,7 +1367,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1427,6 +1441,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 50bc51b8da6..d4d19f5db05 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
@@ -149,9 +149,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -210,6 +212,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -241,7 +244,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -306,9 +309,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -378,6 +383,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -416,7 +422,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -486,9 +492,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -563,6 +571,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -608,7 +617,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -683,9 +692,11 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -765,6 +776,7 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -817,7 +829,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -897,11 +909,12 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -981,6 +994,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1144,7 +1158,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1223,7 +1237,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1301,7 +1315,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1378,7 +1392,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1454,6 +1468,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 9340014985e..7fa8781ad49 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
@@ -150,9 +150,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -211,6 +213,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -242,7 +245,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -375,6 +380,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -413,7 +419,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -481,9 +487,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -556,6 +564,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -601,7 +610,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -674,9 +683,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -754,6 +765,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -806,7 +818,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -884,11 +896,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 0
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -966,6 +979,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1125,7 +1139,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1202,7 +1216,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1278,7 +1292,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1353,7 +1367,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1427,6 +1441,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 53ec7343676..e138ad6542a 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
@@ -149,9 +149,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -210,6 +212,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -241,7 +244,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -306,9 +309,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -378,6 +383,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -416,7 +422,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -486,9 +492,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -563,6 +571,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -608,7 +617,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -683,9 +692,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -765,6 +776,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -817,7 +829,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -897,11 +909,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 132
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -981,6 +994,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1144,7 +1158,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1223,7 +1237,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1301,7 +1315,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1378,7 +1392,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1454,6 +1468,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result
index 029a5d53861..9384f07f0f0 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_off.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -302,9 +305,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -368,6 +373,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -406,7 +412,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -470,9 +476,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -541,6 +549,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -586,7 +595,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -655,9 +664,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -731,6 +742,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -783,7 +795,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -857,11 +869,12 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -935,6 +948,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1086,7 +1100,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1159,7 +1173,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1231,7 +1245,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1302,7 +1316,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1372,6 +1386,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 d5c58d478bb..42785a22c32 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -303,9 +306,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -369,6 +374,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -407,7 +413,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -471,9 +477,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -542,6 +550,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -587,7 +596,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -656,9 +665,11 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -732,6 +743,7 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -784,7 +796,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -858,11 +870,12 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 0
TABLE test t3 82
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -936,6 +949,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1087,7 +1101,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1160,7 +1174,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1232,7 +1246,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1303,7 +1317,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1373,6 +1387,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 0
TABLE test t3 86
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 ae08a9749ef..1066228199d 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -302,9 +305,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -368,6 +373,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -406,7 +412,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -470,9 +476,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -541,6 +549,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -586,7 +595,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -655,9 +664,11 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -731,6 +742,7 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -783,7 +795,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -857,11 +869,12 @@ object_type object_schema object_name count_star
TABLE test t1 43
TABLE test t2 60
TABLE test t3 82
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -935,6 +948,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1086,7 +1100,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1159,7 +1173,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1231,7 +1245,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1302,7 +1316,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1372,6 +1386,7 @@ object_type object_schema object_name count_star
TABLE test t1 47
TABLE test t2 64
TABLE test t3 86
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 c3849107bd4..4e36b9d75a6 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -303,9 +306,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -369,6 +374,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 0
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -407,7 +413,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -471,9 +477,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -542,6 +550,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -587,7 +596,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -656,9 +665,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -732,6 +743,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 0
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -784,7 +796,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -858,11 +870,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 0
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -936,6 +949,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1087,7 +1101,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1160,7 +1174,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1232,7 +1246,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1303,7 +1317,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1373,6 +1387,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 0
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 f8f17d400ae..ee32194b651 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -302,9 +305,11 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -368,6 +373,7 @@ object_type object_schema object_name count_star
TABLE test t1 18
TABLE test t2 24
TABLE test t3 31
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -406,7 +412,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -470,9 +476,11 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -541,6 +549,7 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 54
TABLE test t3 72
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -586,7 +595,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -655,9 +664,11 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -731,6 +742,7 @@ object_type object_schema object_name count_star
TABLE test t1 65
TABLE test t2 90
TABLE test t3 123
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -783,7 +795,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -857,11 +869,12 @@ object_type object_schema object_name count_star
TABLE test t1 93
TABLE test t2 132
TABLE test t3 184
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -935,6 +948,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1086,7 +1100,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1159,7 +1173,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1231,7 +1245,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1302,7 +1316,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1372,6 +1386,7 @@ object_type object_schema object_name count_star
TABLE test t1 97
TABLE test t2 136
TABLE test t3 188
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 2aeeffdedcc..2d3d2d38079 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 43088cd3cfd..b47bf2dbe1e 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 f65e0494ebd..92c12d84f0f 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 2ab94084bb7..9b78d257e0e 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 7aec1bba281..c5481451fd3 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -373,6 +378,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -411,7 +417,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -477,9 +483,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -550,6 +558,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -595,7 +604,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -666,9 +675,11 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -744,6 +755,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -796,7 +808,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -872,11 +884,12 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -952,6 +965,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1107,7 +1121,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1182,7 +1196,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1256,7 +1270,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1329,7 +1343,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1401,6 +1415,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 ddfc5e373dd..81f424800d6 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -374,6 +379,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -412,7 +418,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -479,9 +485,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -553,6 +561,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -598,7 +607,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -670,9 +679,11 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -749,6 +760,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -801,7 +813,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -878,11 +890,12 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -959,6 +972,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1116,7 +1130,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1192,7 +1206,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1267,7 +1281,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1341,7 +1355,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1414,6 +1428,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 01b1d61877f..15e62be4b22 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -373,6 +378,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -411,7 +417,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -477,9 +483,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -550,6 +558,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -595,7 +604,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -666,9 +675,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -744,6 +755,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -796,7 +808,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -872,11 +884,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -952,6 +965,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1107,7 +1121,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1182,7 +1196,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1256,7 +1270,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1329,7 +1343,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1401,6 +1415,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 7b2554a4b64..dbcf7aca9a4 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -374,6 +379,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -412,7 +418,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -479,9 +485,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -553,6 +561,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -598,7 +607,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -670,9 +679,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -749,6 +760,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -801,7 +813,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -878,11 +890,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -959,6 +972,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1116,7 +1130,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1192,7 +1206,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1267,7 +1281,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1341,7 +1355,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1414,6 +1428,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 7a950643800..1230f1e91fe 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 0
TABLE test t3 54
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 8f9e6278ba8..1b04e9fe898 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 23
TABLE test t2 36
TABLE test t3 54
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 eb83349f11e..f376160939d 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 0
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 0
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 0
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 8c3b6a0549f..aae2c54e25c 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 8
TABLE test t2 12
TABLE test t3 17
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 30
TABLE test t3 44
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 35
TABLE test t2 54
TABLE test t3 81
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 53
TABLE test t2 84
TABLE test t3 128
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 f2c79374583..23f800e81d9 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 66a917412a9..99734474536 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 48
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 3b6326fd2df..fe63232cf52 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 85e1bbeb332..376333fc794 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 48
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 725770f2b3c..191bd161d92 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -373,6 +378,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -411,7 +417,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -477,9 +483,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -550,6 +558,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -595,7 +604,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -666,9 +675,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -744,6 +755,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -796,7 +808,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -872,11 +884,12 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -952,6 +965,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1107,7 +1121,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1182,7 +1196,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1256,7 +1270,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1329,7 +1343,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1401,6 +1415,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 d92ec0a1997..80590d5e468 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -374,6 +379,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -412,7 +418,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -479,9 +485,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -553,6 +561,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -598,7 +607,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -670,9 +679,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -749,6 +760,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -801,7 +813,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -878,11 +890,12 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -959,6 +972,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1116,7 +1130,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1192,7 +1206,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1267,7 +1281,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1341,7 +1355,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1414,6 +1428,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 b03a26f4694..e9b39c5db14 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
@@ -152,9 +152,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -213,6 +215,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -244,7 +247,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -373,6 +378,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -411,7 +417,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -477,9 +483,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -550,6 +558,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -595,7 +604,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -666,9 +675,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -744,6 +755,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -796,7 +808,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -872,11 +884,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -952,6 +965,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1107,7 +1121,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1182,7 +1196,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1256,7 +1270,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1329,7 +1343,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1401,6 +1415,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 ca62861bedb..92a020f1984 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
@@ -151,9 +151,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -212,6 +214,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -243,7 +246,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -374,6 +379,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -412,7 +418,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -479,9 +485,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -553,6 +561,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -598,7 +607,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -670,9 +679,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -749,6 +760,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -801,7 +813,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -878,11 +890,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 48
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -959,6 +972,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1116,7 +1130,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1192,7 +1206,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1267,7 +1281,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1341,7 +1355,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1414,6 +1428,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 7c1bbd2ddb0..4cdcbc45d7d 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 0
TABLE test t3 32
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 302563786d2..038335c22cb 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 24
TABLE test t2 28
TABLE test t3 32
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 390a3523421..ac5cde25522 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
@@ -154,9 +154,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -215,6 +217,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -246,7 +249,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -305,9 +308,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -371,6 +376,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 0
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -409,7 +415,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -473,9 +479,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -544,6 +552,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 0
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -589,7 +598,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -658,9 +667,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -734,6 +745,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 0
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -786,7 +798,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -860,11 +872,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 0
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -938,6 +951,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1089,7 +1103,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1162,7 +1176,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1234,7 +1248,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1305,7 +1319,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1375,6 +1389,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 0
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
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 123075896aa..faaf925dacd 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
@@ -153,9 +153,11 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connect con1, localhost, user1, , ;
select concat(current_user(), " is connected") as status;
status
user1@localhost is connected
+connection default;
"================== Step 2 =================="
call dump_thread();
username event_name count_star
@@ -214,6 +216,7 @@ object_type object_schema object_name count_star
TABLE test t1 0
TABLE test t2 0
TABLE test t3 0
+connection con1;
insert into test.t1 set a=101, b=1, c=1;
insert into test.t2 set a=102, b=2, c=2;
insert into test.t2 set a=103, b=3, c=3;
@@ -245,7 +248,7 @@ a b c d
select * from test.t3 where b=5;
a b c d
105 5 5 1
-"================== con1 marker =================="
+connection default;
"================== Step 3 =================="
call dump_thread();
username event_name count_star
@@ -304,9 +307,11 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connect con2, localhost, user2, , ;
select concat(current_user(), " is connected") as status;
status
user2@localhost is connected
+connection default;
"================== Step 4 =================="
call dump_thread();
username event_name count_star
@@ -370,6 +375,7 @@ object_type object_schema object_name count_star
TABLE test t1 10
TABLE test t2 12
TABLE test t3 14
+connection con2;
insert into test.t1 set a=201, b=1, c=1;
insert into test.t2 set a=202, b=2, c=2;
insert into test.t2 set a=203, b=3, c=3;
@@ -408,7 +414,7 @@ select * from test.t3 where b=5;
a b c d
105 5 5 2
205 5 5 1
-"================== con2 marker =================="
+connection default;
"================== Step 5 =================="
call dump_thread();
username event_name count_star
@@ -472,9 +478,11 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connect con3, localhost, user3, , ;
select concat(current_user(), " is connected") as status;
status
user3@localhost is connected
+connection default;
"================== Step 6 =================="
call dump_thread();
username event_name count_star
@@ -543,6 +551,7 @@ object_type object_schema object_name count_star
TABLE test t1 20
TABLE test t2 24
TABLE test t3 28
+connection con3;
insert into test.t1 set a=301, b=1, c=1;
insert into test.t2 set a=302, b=2, c=2;
insert into test.t2 set a=303, b=3, c=3;
@@ -588,7 +597,7 @@ a b c d
105 5 5 3
205 5 5 2
305 5 5 1
-"================== con3 marker =================="
+connection default;
"================== Step 7 =================="
call dump_thread();
username event_name count_star
@@ -657,9 +666,11 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connect con4, localhost, user4, , ;
select concat(current_user(), " is connected") as status;
status
user4@localhost is connected
+connection default;
"================== Step 8 =================="
call dump_thread();
username event_name count_star
@@ -733,6 +744,7 @@ object_type object_schema object_name count_star
TABLE test t1 30
TABLE test t2 36
TABLE test t3 42
+connection con4;
insert into test.t1 set a=401, b=1, c=1;
insert into test.t2 set a=402, b=2, c=2;
insert into test.t2 set a=403, b=3, c=3;
@@ -785,7 +797,7 @@ a b c d
205 5 5 3
305 5 5 2
405 5 5 1
-"================== con4 marker =================="
+connection default;
"================== Step 9 =================="
call dump_thread();
username event_name count_star
@@ -859,11 +871,12 @@ object_type object_schema object_name count_star
TABLE test t1 40
TABLE test t2 48
TABLE test t3 56
+connection con1;
lock tables test.t1 read, test.t2 read, test.t3 read;
unlock tables;
lock tables test.t1 write, test.t2 write, test.t3 write;
unlock tables;
-"================== con1 marker =================="
+connection default;
"================== Step 10 =================="
call dump_thread();
username event_name count_star
@@ -937,6 +950,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
flush tables;
"================== flush marker =================="
"================== Step 11 =================="
@@ -1088,7 +1102,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con1 disconnected =================="
+disconnect con1;
"================== Step 13 =================="
call dump_thread();
username status
@@ -1161,7 +1175,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con2 disconnected =================="
+disconnect con2;
"================== Step 14 =================="
call dump_thread();
username status
@@ -1233,7 +1247,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con3 disconnected =================="
+disconnect con3;
"================== Step 15 =================="
call dump_thread();
username status
@@ -1304,7 +1318,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
-"================== con4 disconnected =================="
+disconnect con4;
"================== Step 16 =================="
call dump_thread();
username status
@@ -1374,6 +1388,7 @@ object_type object_schema object_name count_star
TABLE test t1 44
TABLE test t2 52
TABLE test t3 60
+connection default;
truncate performance_schema.events_waits_summary_by_thread_by_event_name;
"================== BY_THREAD truncated =================="
"================== Step 17 =================="
diff --git a/mysql-test/suite/perfschema/r/thread_cache.result b/mysql-test/suite/perfschema/r/thread_cache.result
index f64cadc2705..daa9f318e7b 100644
--- a/mysql-test/suite/perfschema/r/thread_cache.result
+++ b/mysql-test/suite/perfschema/r/thread_cache.result
@@ -4,12 +4,21 @@ set global thread_cache_size = 0;
show variables like "thread_cache_size";
Variable_name Value
thread_cache_size 0
+connect con1, localhost, root, , ;
+connect con2, localhost, root, , ;
+connection default;
select @id_increment;
@id_increment
1
select @thread_id_increment;
@thread_id_increment
1
+disconnect con2;
+connection default;
+connect con3, localhost, root, , ;
+disconnect con3;
+disconnect con1;
+connection default;
select @id_increment;
@id_increment
1
@@ -20,12 +29,21 @@ set global thread_cache_size = 100;
show variables like "thread_cache_size";
Variable_name Value
thread_cache_size 100
+connect con1, localhost, root, , ;
+connect con2, localhost, root, , ;
+connection default;
select @id_increment;
@id_increment
1
select @thread_id_increment;
@thread_id_increment
1
+disconnect con2;
+connection default;
+connect con3, localhost, root, , ;
+disconnect con3;
+disconnect con1;
+connection default;
select @id_increment;
@id_increment
1