summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-03-13 17:52:10 +0100
committerSergei Golubchik <serg@mariadb.org>2020-03-14 09:51:36 +0100
commitdf25d67d5fc987ebc76160639bb76a1d42a05280 (patch)
tree5d3c1ec9e6a21469321871e2faa398dac5afef94 /mysql-test/suite/perfschema
parent57de4def856a136c60dbf65b1fbbb5a2e755c9ba (diff)
downloadmariadb-git-df25d67d5fc987ebc76160639bb76a1d42a05280.tar.gz
perfschema test formatting. Use --echo #
Diffstat (limited to 'mysql-test/suite/perfschema')
-rw-r--r--mysql-test/suite/perfschema/include/hostcache_dump.inc2
-rw-r--r--mysql-test/suite/perfschema/include/pfs_upgrade.inc10
-rw-r--r--mysql-test/suite/perfschema/include/show_aggregate.inc26
-rw-r--r--mysql-test/suite/perfschema/include/show_plugin_verifier.inc16
-rw-r--r--mysql-test/suite/perfschema/include/show_transaction_gtid.inc2
-rw-r--r--mysql-test/suite/perfschema/include/socket_check1.inc2
-rw-r--r--mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc39
-rw-r--r--mysql-test/suite/perfschema/r/alter_table_progress.result2
-rw-r--r--mysql-test/suite/perfschema/r/connection_type_notwin.result5
-rw-r--r--mysql-test/suite/perfschema/r/connection_type_win.result5
-rw-r--r--mysql-test/suite/perfschema/r/dml_handler.result8
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result10
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result26
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_format.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result38
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result10
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result26
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result38
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result4
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result12
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result8
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_peer_addr.result4
-rw-r--r--mysql-test/suite/perfschema/r/io_cache.result12
-rw-r--r--mysql-test/suite/perfschema/r/misc.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_event.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_func.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_proc.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_table.result2
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_view.result2
-rw-r--r--mysql-test/suite/perfschema/r/rpl_statements.result128
-rw-r--r--mysql-test/suite/perfschema/r/show_aggregate.result224
-rw-r--r--mysql-test/suite/perfschema/r/socket_connect.result76
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result84
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result16
-rw-r--r--mysql-test/suite/perfschema/r/table_name.result82
-rw-r--r--mysql-test/suite/perfschema/r/transaction.result270
-rw-r--r--mysql-test/suite/perfschema/r/transaction_nested_events.result372
-rw-r--r--mysql-test/suite/perfschema/t/alter_table_progress.test2
-rw-r--r--mysql-test/suite/perfschema/t/connection_type_notwin.test8
-rw-r--r--mysql-test/suite/perfschema/t/connection_type_win.test8
-rw-r--r--mysql-test/suite/perfschema/t/dml_handler.test8
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_instruments.test4
-rw-r--r--mysql-test/suite/perfschema/t/io_cache.test12
-rw-r--r--mysql-test/suite/perfschema/t/misc.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_event.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_func.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_proc.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_table.test2
-rw-r--r--mysql-test/suite/perfschema/t/pfs_upgrade_view.test2
-rw-r--r--mysql-test/suite/perfschema/t/rpl_statements.test128
-rw-r--r--mysql-test/suite/perfschema/t/show_aggregate.test172
-rw-r--r--mysql-test/suite/perfschema/t/show_coverage.test64
-rw-r--r--mysql-test/suite/perfschema/t/show_misc.test58
-rw-r--r--mysql-test/suite/perfschema/t/show_plugin.test280
-rw-r--r--mysql-test/suite/perfschema/t/show_sanity.test566
-rw-r--r--mysql-test/suite/perfschema/t/socket_connect.test76
-rw-r--r--mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test84
-rw-r--r--mysql-test/suite/perfschema/t/status_reprepare.test16
-rw-r--r--mysql-test/suite/perfschema/t/table_name.test82
-rw-r--r--mysql-test/suite/perfschema/t/transaction.test282
-rw-r--r--mysql-test/suite/perfschema/t/transaction_gtid.test6
-rw-r--r--mysql-test/suite/perfschema/t/transaction_nested_events.test108
88 files changed, 1836 insertions, 1845 deletions
diff --git a/mysql-test/suite/perfschema/include/hostcache_dump.inc b/mysql-test/suite/perfschema/include/hostcache_dump.inc
index 7f456a0c499..1d595ba24c0 100644
--- a/mysql-test/suite/perfschema/include/hostcache_dump.inc
+++ b/mysql-test/suite/perfschema/include/hostcache_dump.inc
@@ -1,6 +1,6 @@
# Helper for hostcache_*.test
---echo "Dumping performance_schema.host_cache"
+--echo # Dumping performance_schema.host_cache
--disable_query_log
--vertical_results
diff --git a/mysql-test/suite/perfschema/include/pfs_upgrade.inc b/mysql-test/suite/perfschema/include/pfs_upgrade.inc
index 0d4a864940c..8d9dca0a500 100644
--- a/mysql-test/suite/perfschema/include/pfs_upgrade.inc
+++ b/mysql-test/suite/perfschema/include/pfs_upgrade.inc
@@ -20,7 +20,7 @@ drop event if exists test.user_event;
--enable_warnings
---echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
+--echo # Testing mysql_upgrade with TABLE performance_schema.user_table
create table test.user_table(a int);
@@ -43,7 +43,7 @@ use test;
drop table test.user_table;
---echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
+--echo # Testing mysql_upgrade with VIEW performance_schema.user_view
create view test.user_view as select "Not supposed to be here";
@@ -66,7 +66,7 @@ use test;
drop view test.user_view;
---echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
+--echo # Testing mysql_upgrade with PROCEDURE performance_schema.user_proc
create procedure test.user_proc()
select "Not supposed to be here";
@@ -81,7 +81,7 @@ update mysql.proc set db='test' where name='user_proc';
drop procedure test.user_proc;
---echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func"
+--echo # Testing mysql_upgrade with FUNCTION performance_schema.user_func
create function test.user_func() returns integer
return 0;
@@ -96,7 +96,7 @@ update mysql.proc set db='test' where name='user_func';
drop function test.user_func;
---echo "Testing mysql_upgrade with EVENT performance_schema.user_event"
+--echo # Testing mysql_upgrade with EVENT performance_schema.user_event
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
diff --git a/mysql-test/suite/perfschema/include/show_aggregate.inc b/mysql-test/suite/perfschema/include/show_aggregate.inc
index a637e7b54dd..4489cf7a37b 100644
--- a/mysql-test/suite/perfschema/include/show_aggregate.inc
+++ b/mysql-test/suite/perfschema/include/show_aggregate.inc
@@ -12,7 +12,7 @@ UPDATE test.status_results sr, performance_schema.global_status sg
SET sr.stop = sg.variable_value
WHERE sr.variable_name = sg.variable_name
AND sg.variable_name IN ('handler_delete', 'handler_rollback');
---echo
+--echo #
--echo # Global deltas: END - START.
UPDATE test.status_results sr
SET sr.delta = sr.stop - sr.start;
@@ -30,21 +30,21 @@ UPDATE test.status_results sr, performance_schema.status_by_thread sbt
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con1_id;
---echo
+--echo #
--echo # Thread results from CON2.
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
SET sr.t2 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con2_id;
---echo
+--echo #
--echo # Thread results from CON3.
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
SET sr.t3 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con3_id;
---echo
+--echo #
--echo # Thread totals for 3 connections.
UPDATE test.status_results sr
SET sr.thread = sr.t1 + sr.t2 + sr.t3;
@@ -58,21 +58,21 @@ UPDATE test.status_results sr, performance_schema.status_by_user sbu
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user1');
---echo
+--echo #
--echo # User2
UPDATE test.status_results sr, performance_schema.status_by_user sbu
SET sr.u2 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user2');
---echo
+--echo #
--echo # User3
UPDATE test.status_results sr, performance_schema.status_by_user sbu
SET sr.u3 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user3');
---echo
+--echo #
--echo # Status totals for 3 users.
UPDATE test.status_results sr
SET sr.user = sr.u1 + sr.u2 + sr.u3;
@@ -80,14 +80,14 @@ UPDATE test.status_results sr
--echo #===========================
--echo # Status by host (localhost)
--echo #===========================
---echo
+--echo #
--echo # host1 = localhost
UPDATE test.status_results sr, performance_schema.status_by_host sbh
SET sr.h1 = sbh.variable_value
WHERE sr.variable_name = sbh.variable_name
AND sbh.variable_name IN ('handler_delete', 'handler_rollback')
AND sbh.host IN ('localhost');
---echo
+--echo #
--echo # Status totals for 'localhost' only.
UPDATE test.status_results sr
SET sr.host = sr.h1 + sr.h2 + sr.h3;
@@ -101,22 +101,22 @@ UPDATE test.status_results sr, performance_schema.status_by_account sba
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user1');
---echo
+--echo #
--echo # User2@localhost
UPDATE test.status_results sr, performance_schema.status_by_account sba
SET sr.a2 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user2');
---echo
+--echo #
--echo # User3@localhost
UPDATE test.status_results sr, performance_schema.status_by_account sba
SET sr.a3 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user3');
---echo
---echo
+--echo #
+--echo #
--echo # Status totals for 3 accounts.
UPDATE test.status_results sr
SET sr.acct = sr.a1 + sr.a2 + sr.a3;
diff --git a/mysql-test/suite/perfschema/include/show_plugin_verifier.inc b/mysql-test/suite/perfschema/include/show_plugin_verifier.inc
index 9705a1914c1..873205ad16e 100644
--- a/mysql-test/suite/perfschema/include/show_plugin_verifier.inc
+++ b/mysql-test/suite/perfschema/include/show_plugin_verifier.inc
@@ -1,20 +1,20 @@
--disable_warnings
---echo
+--echo #
SHOW GLOBAL STATUS LIKE "example_%";
---echo
+--echo #
SHOW SESSION STATUS LIKE "example_%";
---echo
+--echo #
SHOW GLOBAL VARIABLES LIKE "example_%";
---echo
+--echo #
SHOW SESSION VARIABLES LIKE "example_%";
---echo
+--echo #
SELECT variable_name, variable_value FROM performance_schema.global_status WHERE variable_name LIKE "example_%";
---echo
+--echo #
SELECT variable_name, variable_value FROM performance_schema.session_status WHERE variable_name LIKE "example_%";
---echo
+--echo #
SELECT variable_name, variable_value FROM performance_schema.global_variables WHERE variable_name LIKE "example_%";
---echo
+--echo #
SELECT variable_name, variable_value FROM performance_schema.session_variables WHERE variable_name LIKE "example_%";
#
diff --git a/mysql-test/suite/perfschema/include/show_transaction_gtid.inc b/mysql-test/suite/perfschema/include/show_transaction_gtid.inc
index 758354ea2b8..3ad4564dc0d 100644
--- a/mysql-test/suite/perfschema/include/show_transaction_gtid.inc
+++ b/mysql-test/suite/perfschema/include/show_transaction_gtid.inc
@@ -24,6 +24,6 @@ if ($current_result == '')
--let $current_result= none
}
---echo - history=$history_result current=$current_result
+--echo # - history=$history_result current=$current_result
--connection default
diff --git a/mysql-test/suite/perfschema/include/socket_check1.inc b/mysql-test/suite/perfschema/include/socket_check1.inc
index 29b00fc6abb..4f65e7d00bd 100644
--- a/mysql-test/suite/perfschema/include/socket_check1.inc
+++ b/mysql-test/suite/perfschema/include/socket_check1.inc
@@ -63,7 +63,7 @@
--echo # $title_prefix.$check_num Compare impact of statements
--echo # $stmt2
--echo # $stmt1
---echo $msg
+--echo # $msg
# Enable this when extending the checks for SQL statements.
if(0)
diff --git a/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc b/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc
index 6a6e2dc5ada..1e6c3a8dfcf 100644
--- a/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc
+++ b/mysql-test/suite/perfschema/include/transaction_nested_events_verifier.inc
@@ -17,11 +17,11 @@ let $wait_condition=
--source include/wait_condition.inc
if(!$success)
{
- --echo The activity of connection con1 did not finish.
+ --echo # The activity of connection con1 did not finish.
SELECT thread_id , PROCESSLIST_id, PROCESSLIST_STATE, PROCESSLIST_INFO
FROM performance_schema.threads
WHERE thread_id = @con1_thread_id;
- --echo Abort.
+ --echo # Abort.
exit;
}
@@ -47,8 +47,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
# set @base_event_id = 0;
# select @base_tx_event_id, @base_stmt_event_id, @base_event_id;
---echo EVENTS_TRANSACTIONS_CURRENT
---echo
+--echo #
+--echo # EVENTS_TRANSACTIONS_CURRENT
+--echo #
--replace_column 1 thread_id
@@ -66,9 +67,9 @@ FROM performance_schema.events_transactions_current
WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
---echo
---echo EVENTS_TRANSACTIONS_HISTORY_LONG
---echo
+--echo #
+--echo # EVENTS_TRANSACTIONS_HISTORY_LONG
+--echo #
--replace_column 1 thread_id
@@ -86,9 +87,9 @@ FROM performance_schema.events_transactions_history_long
WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
---echo
---echo EVENTS_STATEMENTS_HISTORY_LONG
---echo
+--echo #
+--echo # EVENTS_STATEMENTS_HISTORY_LONG
+--echo #
--replace_column 1 thread_id
@@ -105,11 +106,11 @@ FROM performance_schema.events_statements_history_long
WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
---echo
---echo ## Combined statement and transaction event history ordered by event id
---echo
---echo EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
---echo
+--echo #
+--echo ### Combined statement and transaction event history ordered by event id
+--echo #
+--echo #EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+--echo #
--replace_column 1 thread_id
@@ -134,11 +135,11 @@ FROM performance_schema.events_statements_history_long s
WHERE ((s.thread_id = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, r_event_id;
---echo
---echo ## Clear statement and transaction history
---echo CALL test.clear_history();
+--echo #
+--echo ### Clear statement and transaction history
+--echo # CALL test.clear_history();
CALL test.clear_history();
--enable_query_log
--echo ## Reset db.t1
DELETE FROM db.t1;
---echo
+--echo #
diff --git a/mysql-test/suite/perfschema/r/alter_table_progress.result b/mysql-test/suite/perfschema/r/alter_table_progress.result
index 96516993a5c..08c2c3a6145 100644
--- a/mysql-test/suite/perfschema/r/alter_table_progress.result
+++ b/mysql-test/suite/perfschema/r/alter_table_progress.result
@@ -57,7 +57,7 @@ select "After payload";
After payload
After payload
connection default;
-Dumping ALTER TABLE stages
+# Dumping ALTER TABLE stages
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
from performance_schema.events_stages_history_long
where (thread_id = @con1_thread_id)
diff --git a/mysql-test/suite/perfschema/r/connection_type_notwin.result b/mysql-test/suite/perfschema/r/connection_type_notwin.result
index f8b6bfd0358..d0415cf8df6 100644
--- a/mysql-test/suite/perfschema/r/connection_type_notwin.result
+++ b/mysql-test/suite/perfschema/r/connection_type_notwin.result
@@ -1,4 +1,4 @@
-"Default connection"
+# Default connection
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -21,7 +21,6 @@ SET GLOBAL general_log_file = '.../log/rewrite_general_con.log';
SET GLOBAL log_output = 'FILE,TABLE';
SET GLOBAL general_log= 'ON';
connect con1, localhost, root,,;
-"Connection con1"
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -31,7 +30,6 @@ PROCESSLIST_HOST localhost
CONNECTION_TYPE Socket
disconnect con1;
connect con2, "127.0.0.1", root,,test,$MASTER_MYPORT,;
-"Connection con2"
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -41,7 +39,6 @@ PROCESSLIST_HOST santa.claus.ipv4.example.com
CONNECTION_TYPE TCP/IP
disconnect con2;
connect con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL;
-"Connection con3"
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
diff --git a/mysql-test/suite/perfschema/r/connection_type_win.result b/mysql-test/suite/perfschema/r/connection_type_win.result
index 1852cefd483..8dc064babff 100644
--- a/mysql-test/suite/perfschema/r/connection_type_win.result
+++ b/mysql-test/suite/perfschema/r/connection_type_win.result
@@ -1,4 +1,4 @@
-"Default connection"
+# Default connection
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -20,7 +20,6 @@ SET GLOBAL general_log_file = '.../log/rewrite_general_con.log';
SET GLOBAL log_output = 'FILE,TABLE';
SET GLOBAL general_log= 'ON';
connect con1, localhost, root,,;
-"Connection con1"
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -30,7 +29,6 @@ PROCESSLIST_HOST santa.claus.ipv4.example.com
CONNECTION_TYPE TCP/IP
disconnect con1;
connect con2, "127.0.0.1", root,,test,$MASTER_MYPORT,;
-"Connection con2"
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -40,7 +38,6 @@ PROCESSLIST_HOST santa.claus.ipv4.example.com
CONNECTION_TYPE TCP/IP
disconnect con2;
connect con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL;
-"Connection con3"
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
diff --git a/mysql-test/suite/perfschema/r/dml_handler.result b/mysql-test/suite/perfschema/r/dml_handler.result
index 57d0f05cd8d..ce4ae6bf9a3 100644
--- a/mysql-test/suite/perfschema/r/dml_handler.result
+++ b/mysql-test/suite/perfschema/r/dml_handler.result
@@ -1,6 +1,6 @@
-
+#
# Create a temporary table of performance schema table names
-
+#
CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA='performance_schema'
@@ -8,10 +8,10 @@ WHERE TABLE_SCHEMA='performance_schema'
SELECT COUNT(*) FROM table_list INTO @table_count;
Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
-
+#
# For each table in the performance schema, attempt HANDLER...OPEN,
# which should fail with an error 1031, ER_ILLEGAL_HA.
-
+#
SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=80;
HANDLER performance_schema.user_variables_by_thread OPEN;
ERROR HY000: Storage engine PERFORMANCE_SCHEMA of the table `performance_schema`.`user_variables_by_thread` doesn't have this option
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 27b744977dd..884d5533a98 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -77,10 +77,10 @@ LOCK TABLES performance_schema.setup_instruments READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_instruments WRITE;
UNLOCK TABLES;
-
+#
# Bug#13813193 ASSERTION `TABLE->READ_SET ==
# &TABLE->DEF_READ_SET' FAILED / MYSQL_UPDATE
-
+#
UPDATE performance_schema.setup_instruments SET timed='NO'
ORDER BY RAND();
update performance_schema.setup_instruments
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 86cab03c4c6..d84d6a72239 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
@@ -33,7 +33,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -70,7 +70,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
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 f824c319afa..10861f5e352 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
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 33948013822..8e87d0dc50e 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
@@ -33,7 +33,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
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 096c5c3dbd5..3b39b09d3e1 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
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 f36e4604a7c..d14a73a8f46 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
@@ -33,7 +33,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
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 d84ffe2e9df..5cd714fba4f 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
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 ff2a93efec4..c52da0dc578 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
@@ -35,7 +35,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -72,7 +72,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
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 c300d6a50af..b889df4e451 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
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 1c34faa9457..31ffb4065b9 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
@@ -29,7 +29,7 @@ set global debug_dbug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddr
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -90,7 +90,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -120,7 +120,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -162,7 +162,7 @@ current_user()
plug_dest@santa.claus.ipv4.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
index 2751dbd7edb..360fbadf152 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
@@ -29,7 +29,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -89,7 +89,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -119,7 +119,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -149,7 +149,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -180,7 +180,7 @@ LAST_ERROR_SEEN set
flush hosts;
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -210,7 +210,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -245,7 +245,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -275,7 +275,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -305,7 +305,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -335,7 +335,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -365,7 +365,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -395,7 +395,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
index 18e437559e4..42030ed8ac0 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
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 3d41f013ba9..2ea779fd351 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
@@ -36,7 +36,7 @@ current_user()
quota@santa.claus.ipv4.example.com
disconnect con2a;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -73,7 +73,7 @@ current_user()
quota@santa.claus.ipv4.example.com
disconnect con2b;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -110,7 +110,7 @@ current_user()
quota@santa.claus.ipv4.example.com
disconnect con2c;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -140,7 +140,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -170,7 +170,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -211,7 +211,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -247,7 +247,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -283,7 +283,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -313,7 +313,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -343,7 +343,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -386,7 +386,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -422,7 +422,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -458,7 +458,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -488,7 +488,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -518,7 +518,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -567,7 +567,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -603,7 +603,7 @@ select current_user();
current_user()
quota@santa.claus.ipv4.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -633,7 +633,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -663,7 +663,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
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 bc7721aef30..60852eb2021 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
@@ -35,7 +35,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -72,7 +72,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -110,7 +110,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -147,7 +147,7 @@ current_user()
root@santa.claus.ipv4.example.com
disconnect con5;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
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 3896ed086ba..c453bc35cd5 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED NO
@@ -85,7 +85,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -115,7 +115,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
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 236bc12d9bf..1b07f4fcd16 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
@@ -33,7 +33,7 @@ current_user()
root@192.0.2.4
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@192.0.2.4
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
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 5479393c29b..63baa481d09 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
index 4c2a9d48a63..8d69d9c4d9a 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
@@ -28,7 +28,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -58,7 +58,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -88,7 +88,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -118,7 +118,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -148,7 +148,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -178,7 +178,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
index 267f346836d..33f3528b8b3 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
@@ -32,7 +32,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -62,7 +62,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -92,7 +92,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
@@ -122,7 +122,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 192.0.2.4
HOST santa.claus.ipv4.example.com
HOST_VALIDATED YES
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 4325cfec6dc..2b0f4ff7da6 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
@@ -33,7 +33,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -70,7 +70,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
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 12435dd54f5..12b27c8ecb5 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
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 57e14dfe913..5d8d7fd3f63 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
@@ -33,7 +33,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
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 654ed7759b1..c46ea3dc342 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
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 f68d90978e7..786f1b8a6c8 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
@@ -33,7 +33,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
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 e63c84bf352..8dfcdac1b44 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
@@ -23,7 +23,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -53,7 +53,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
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 50297797f6a..f2aa7fe02a2 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
@@ -35,7 +35,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -72,7 +72,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
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 549e83369df..2fda71b3c38 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
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 5312958bd91..09b965f443b 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
@@ -29,7 +29,7 @@ set global debug_dbug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddr
uninstall plugin test_plugin_server;
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR HY000: Plugin 'test_plugin_server' is not loaded
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -90,7 +90,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -120,7 +120,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -162,7 +162,7 @@ current_user()
plug_dest@santa.claus.ipv6.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
index 757285b1033..6030c566dfa 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
@@ -29,7 +29,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -59,7 +59,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -89,7 +89,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -119,7 +119,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -149,7 +149,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -180,7 +180,7 @@ LAST_ERROR_SEEN set
flush hosts;
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -210,7 +210,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -245,7 +245,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -275,7 +275,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -305,7 +305,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -335,7 +335,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
ERROR 08S01: Bad handshake
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -365,7 +365,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -395,7 +395,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
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 f2e25ab6ca1..c109fe8cff0 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
@@ -36,7 +36,7 @@ current_user()
quota@santa.claus.ipv6.example.com
disconnect con2a;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -73,7 +73,7 @@ current_user()
quota@santa.claus.ipv6.example.com
disconnect con2b;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -110,7 +110,7 @@ current_user()
quota@santa.claus.ipv6.example.com
disconnect con2c;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -140,7 +140,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -170,7 +170,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -211,7 +211,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -247,7 +247,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -283,7 +283,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -313,7 +313,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -343,7 +343,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -386,7 +386,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -422,7 +422,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -458,7 +458,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -488,7 +488,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -518,7 +518,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -567,7 +567,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -603,7 +603,7 @@ select current_user();
current_user()
quota@santa.claus.ipv6.example.com
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -633,7 +633,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -663,7 +663,7 @@ FIRST_ERROR_SEEN set
LAST_ERROR_SEEN set
Got one of the listed errors
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
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 357dfd3db3e..f9c1f736365 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
@@ -35,7 +35,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -72,7 +72,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -110,7 +110,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con4;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -147,7 +147,7 @@ current_user()
root@santa.claus.ipv6.example.com
disconnect con5;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
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 5befbd98087..675694d1fb9 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED NO
@@ -85,7 +85,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -115,7 +115,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
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 f899cb935e9..b8ae214fd7a 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
@@ -33,7 +33,7 @@ current_user()
root@2001:db8::6:6
disconnect con2;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -70,7 +70,7 @@ current_user()
root@2001:db8::6:6
disconnect con3;
connection default;
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
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 6d50530ffa0..b5f098a6a1f 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
@@ -24,7 +24,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
@@ -54,7 +54,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST NULL
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
index 670a3713d91..a6f04e0c6b6 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
@@ -28,7 +28,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -58,7 +58,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -88,7 +88,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -118,7 +118,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -148,7 +148,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -178,7 +178,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
index 9ec33df2fee..90c8d9cce39 100644
--- a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
@@ -32,7 +32,7 @@ SET @saved_dbug = @@GLOBAL.debug_dbug;
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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -62,7 +62,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -92,7 +92,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
@@ -122,7 +122,7 @@ 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"
+# Dumping performance_schema.host_cache
IP 2001:db8::6:6
HOST santa.claus.ipv6.example.com
HOST_VALIDATED YES
diff --git a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
index 6d15f2f5b25..6aad20ec488 100644
--- a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
+++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
@@ -39,7 +39,7 @@ Connection_errors_max_connections 0
Connection_errors_peer_address 1
Connection_errors_select 0
Connection_errors_tcpwrap 0
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
ERROR HY000: Can't get hostname for your address
connection default;
show global status like "connection_errors_%";
@@ -50,7 +50,7 @@ Connection_errors_max_connections 0
Connection_errors_peer_address 2
Connection_errors_select 0
Connection_errors_tcpwrap 0
-"Dumping performance_schema.host_cache"
+# Dumping performance_schema.host_cache
SET @@GLOBAL.debug_dbug = @saved_dbug;
flush status;
show global status like "connection_errors_%";
diff --git a/mysql-test/suite/perfschema/r/io_cache.result b/mysql-test/suite/perfschema/r/io_cache.result
index 4b742610a39..9a7f04dace7 100644
--- a/mysql-test/suite/perfschema/r/io_cache.result
+++ b/mysql-test/suite/perfschema/r/io_cache.result
@@ -1,6 +1,6 @@
-
+#
## Connection default
-
+#
connection default;
USE test;
DROP TABLE IF EXISTS t1;
@@ -13,9 +13,9 @@ SELECT @@global.binlog_stmt_cache_size;
SELECT * FROM performance_schema.setup_instruments WHERE name LIKE "%file/sql/io_cache%";
NAME ENABLED TIMED
wait/io/file/sql/io_cache YES YES
-
+#
## Connection con1
-
+#
connect con1, localhost, root,,;
USE test;
CREATE TABLE t1 (s1 INT, s2 VARCHAR(4096));
@@ -82,9 +82,9 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
8
disconnect con1;
-
+#
## Connection default
-
+#
connection default;
SELECT COUNT(*) FROM test.t1;
COUNT(*)
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index bed8d93af25..b859715e024 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -116,7 +116,7 @@ select mysql_errno, returned_sqlstate, message_text, errors, warnings
from performance_schema.events_statements_history where errors > 0;
mysql_errno returned_sqlstate message_text errors warnings
1146 42S02 Table 'test.t1' doesn't exist 1 0
-
+#
select mysql_errno, returned_sqlstate, message_text, errors, warnings from
performance_schema.events_statements_history_long where errors > 0;
mysql_errno returned_sqlstate message_text errors warnings
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
index cbaeec201e0..f4cf01406d3 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with EVENT performance_schema.user_event"
+# Testing mysql_upgrade with EVENT performance_schema.user_event
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
Warnings:
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_func.result b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
index b91cb5d14a8..92f2a18af2f 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with FUNCTION performance_schema.user_func"
+# Testing mysql_upgrade with FUNCTION performance_schema.user_func
create function test.user_func() returns integer
return 0;
update mysql.proc set db='performance_schema' where name='user_func';
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
index 651bc506eee..9452ec866f7 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
+# Testing mysql_upgrade with PROCEDURE performance_schema.user_proc
create procedure test.user_proc()
select "Not supposed to be here";
update mysql.proc set db='performance_schema' where name='user_proc';
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_table.result b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
index 5ff608a825f..0c7b024a71e 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with TABLE performance_schema.user_table"
+# Testing mysql_upgrade with TABLE performance_schema.user_table
create table test.user_table(a int);
use performance_schema;
show tables like "user_table";
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_view.result b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
index 14a1d8deae4..49928bbe8e3 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
@@ -1,4 +1,4 @@
-"Testing mysql_upgrade with VIEW performance_schema.user_view"
+# Testing mysql_upgrade with VIEW performance_schema.user_view
create view test.user_view as select "Not supposed to be here";
use performance_schema;
show tables like "user_view";
diff --git a/mysql-test/suite/perfschema/r/rpl_statements.result b/mysql-test/suite/perfschema/r/rpl_statements.result
index d72402bf691..2027456d978 100644
--- a/mysql-test/suite/perfschema/r/rpl_statements.result
+++ b/mysql-test/suite/perfschema/r/rpl_statements.result
@@ -1,13 +1,13 @@
include/master-slave.inc
[connection master]
-
+#
#
# STEP 1 - CREATE AND REPLICATE TEST TABLES
#
connection master;
-
-*** Create test tables
-
+#
+# *** Create test tables
+#
show global variables like 'binlog_format%';
Variable_name Value
binlog_format MIXED
@@ -17,73 +17,73 @@ from performance_schema.threads
where processlist_id = connection_id();
create table test.marker(s1 int) engine=innodb;
connection slave;
-
-*** Clear statement events
-
+#
+# *** Clear statement events
+#
#
# STEP 2 - REPLICATE ONE ROW ON MASTER TO GET REPLICATION THREAD ID ON SLAVE
#
connection master;
-
+#
insert into test.marker values (0);
-
+#
connection slave;
-
-*** Verify row, get replication thread id, clear statement events
-
+#
+# *** Verify row, get replication thread id, clear statement events
+#
select thread_id into @slave_thread_id from performance_schema.events_statements_history
where sql_text like '%marker%';
-*** Verify row inserted on master was replicated
+# *** Verify row inserted on master was replicated
select count(*) = 1 as 'Expect 1' from test.marker;
Expect 1
1
-*** Clear statement events
-
+# *** Clear statement events
+#
#
# STEP 3 - PERFORM DML STATEMENTS ON MASTER
#
connection master;
-
+#
show global variables like 'binlog_format%';
Variable_name Value
binlog_format MIXED
-*** Clear statement events
-
-*** Create/drop table, create/drop database
-
+# *** Clear statement events
+#
+# *** Create/drop table, create/drop database
+#
create database marker1_db;
create database marker2_db;
create table marker1_db.table1 (s1 int) engine=innodb;
create table marker2_db.table1 (s1 int) engine=innodb;
create table marker2_db.table2 (s1 int) engine=innodb;
-
-*** Transaction
+#
+# *** Transaction
start transaction;
insert into marker1_db.table1 values (1), (2), (3);
insert into marker2_db.table1 values (1), (2), (3);
commit;
-
-*** Alter
+#
+# *** Alter
alter table marker1_db.table1 add column (s2 varchar(32));
-
-*** Insert, Update
+#
+# *** Insert, Update
start transaction;
insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six');
update marker1_db.table1 set s1 = s1 + 1;
commit;
-
-*** Rollback
+#
+# *** Rollback
start transaction;
insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine');
rollback;
-
-*** Autocommit, Delete, Drop
+#
+# *** Autocommit, Delete, Drop
delete from marker1_db.table1 where s1 > 4;
drop table marker2_db.table1;
drop database marker2_db;
-
-*** Examine statements events that will be compared on the slave
-
+#
+# *** Examine statements events that will be compared on the slave
+#
select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from performance_schema.events_statements_history_long
where sql_text like '%marker%' order by event_id;
thread_id event_id event_name current_schema digest_text sql_text
@@ -101,13 +101,13 @@ thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM `marker1_db` . `table1` WHERE `s1` > ? delete from marker1_db.table1 where s1 > 4
[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE `marker2_db` . `table1` drop table marker2_db.table1
[THREAD_ID] [EVENT_ID] statement/sql/drop_db test DROP SCHEMA `marker2_db` drop database marker2_db
-
+#
#
# STEP 4 - REPLICATE STATEMENT EVENTS ON MASTER TO SLAVE
#
-
-*** Store statement events in holding table, then replicate
-
+#
+# *** Store statement events in holding table, then replicate
+#
#
# Create table to hold statement events for later comparison on the slave
#
@@ -115,14 +115,14 @@ create table test.master_events_statements_history_long as
(select thread_id, event_id, event_name, sql_text, digest, digest_text, current_schema, rows_affected
from performance_schema.events_statements_history_long
where (thread_id=@my_thread_id and digest_text like '%marker%'));
-
+#
#
# STEP 5 - VERIFY DML AND DDL STATEMENT EVENTS ON SLAVE
#
connection slave;
-
-*** List statement events from master
-
+#
+# *** List statement events from master
+#
select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from master_events_statements_history_long order by event_id;
thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/create_db test CREATE SCHEMA `marker1_db` create database marker1_db
@@ -139,9 +139,9 @@ thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM `marker1_db` . `table1` WHERE `s1` > ? delete from marker1_db.table1 where s1 > 4
[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE `marker2_db` . `table1` drop table marker2_db.table1
[THREAD_ID] [EVENT_ID] statement/sql/drop_db test DROP SCHEMA `marker2_db` drop database marker2_db
-
-*** List statement events on slave
-
+#
+# *** List statement events on slave
+#
select thread_id, event_id, rpad(event_name, 28, ' ') event_name, rpad(current_schema, 10, ' ') current_schema, rpad(digest_text, 72, ' ') digest_text, sql_text from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id and sql_text like '%marker%' order by event_id;
thread_id event_id event_name current_schema digest_text sql_text
@@ -158,11 +158,11 @@ thread_id event_id event_name current_schema digest_text sql_text
[THREAD_ID] [EVENT_ID] statement/sql/delete test DELETE FROM `marker1_db` . `table1` WHERE `s1` > ? delete from marker1_db.table1 where s1 > 4
[THREAD_ID] [EVENT_ID] statement/sql/drop_table test DROP TABLE `marker2_db` . `table1` DROP TABLE `marker2_db`.`table1` /* generated by server */
[THREAD_ID] [EVENT_ID] statement/sql/drop_db marker2_db DROP SCHEMA `marker2_db` drop database marker2_db
+#
+# *** Compare master and slave events
+#
-*** Compare master and slave events
-
-
-*** Event name comparison - expect 0 mismatches
+# *** Event name comparison - expect 0 mismatches
select thread_id, event_id, event_name, digest_text, sql_text from performance_schema.events_statements_history_long t1
where t1.thread_id = @slave_thread_id and
@@ -170,14 +170,14 @@ sql_text like '%marker%' and
not exists (select * from master_events_statements_history_long t2 where t2.event_name = t1.event_name);
thread_id event_id event_name digest_text sql_text
-*** Statement digest comparison - expect 1 mismatch for DROP TABLE
+# *** Statement digest comparison - expect 1 mismatch for DROP TABLE
select thread_id, event_id, event_name, digest, digest_text, sql_text from performance_schema.events_statements_history_long t1
where t1.thread_id = @slave_thread_id and
sql_text like '%marker%' and
not exists (select * from master_events_statements_history_long t2 where t2.digest = t1.digest);
thread_id event_id event_name digest digest_text sql_text
-
+#
#
# STEP 6 - DISABLE REPLICATED STATEMENT EVENTS ON SLAVE
#
@@ -186,38 +186,38 @@ update performance_schema.setup_instruments set enabled='no', timed='no'
select * from performance_schema.setup_instruments where name like '%statement/abstract/relay_log%';
NAME ENABLED TIMED
statement/abstract/relay_log NO NO
-
+#
#
# STEP 7 - UPDATE TABLES ON MASTER, REPLICATE
#
connection master;
-
-*** Clear statement events
-*** Update some tables, then replicate
-
+#
+# *** Clear statement events
+# *** Update some tables, then replicate
+#
insert into marker1_db.table1 values (999, '999'), (998, '998'), (997, '997');
-
+#
#
# STEP 8 - VERIFY TABLE UPDATES FROM MASTER, EXPECT NO STATEMENT EVENTS ON SLAVE
#
connection slave;
-
-*** Confirm rows were replicated
-
+#
+# *** Confirm rows were replicated
+#
select * from marker1_db.table1 where s1 > 900 order by s1;
s1 s2
997 997
998 998
999 999
-
-*** Confirm that are no statements events from the replication thread
-
+#
+# *** Confirm that are no statements events from the replication thread
+#
select * from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id;
THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE NESTING_EVENT_LEVEL
-
+#
#
# STEP 9 - CLEAN UP
#
-
+#
include/rpl_end.inc
diff --git a/mysql-test/suite/perfschema/r/show_aggregate.result b/mysql-test/suite/perfschema/r/show_aggregate.result
index 7b9e3889bc6..7b104a56ba0 100644
--- a/mysql-test/suite/perfschema/r/show_aggregate.result
+++ b/mysql-test/suite/perfschema/r/show_aggregate.result
@@ -1,13 +1,13 @@
-
-================================================================================
-SETUP
-================================================================================
+#
+# ================================================================================
+# SETUP
+# ================================================================================
SET @@session.sql_log_bin=OFF;
-
+#
# CREATE 3 CLIENTS, 3 CONNECTIONS, RESULTS TABLE
connection default;
USE test;
-
+#
# Create results table
CREATE TABLE test.status_results
(variable_name VARCHAR(64), start INT DEFAULT 0, stop INT DEFAULT 0, delta INT DEFAULT 0,
@@ -24,61 +24,61 @@ CREATE TABLE t1 (s1 int) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (2), (3), (3), (3);
CREATE TABLE t2 (s1 int) ENGINE=InnoDB;
CREATE TABLE t3 (s1 int) ENGINE=InnoDB;
-
+#
set @orig_sql_mode= @@sql_mode;
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
GRANT ALL ON *.* to 'user1'@localhost;
GRANT ALL ON *.* to 'user2'@localhost;
GRANT ALL ON *.* to 'user3'@localhost;
set sql_mode= @orig_sql_mode;
-
-================================================================================
-CONNECTION 1: DELETE 1, ROLLBACK x 1
-================================================================================
+#
+# ================================================================================
+# CONNECTION 1: DELETE 1, ROLLBACK x 1
+# ================================================================================
connect con1, localhost, user1,,;
SET @@session.sql_log_bin=OFF;
DELETE FROM t1 WHERE s1 = 1;
START TRANSACTION;
INSERT INTO t1 VALUES (1);
ROLLBACK;
-
-================================================================================
-CONNECTION 2: DELETE 2, ROLLBACK x 2
-================================================================================
+#
+# ================================================================================
+# CONNECTION 2: DELETE 2, ROLLBACK x 2
+# ================================================================================
connect con2, localhost, user2,,;
SET @@session.sql_log_bin=OFF;
DELETE FROM t1 WHERE s1 = 2;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (2);
ROLLBACK;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (2);
ROLLBACK;
-
-================================================================================
-CONNECTION 3: DELETE 3, ROLLBACK x 3
-================================================================================
+#
+# ================================================================================
+# CONNECTION 3: DELETE 3, ROLLBACK x 3
+# ================================================================================
connect con3, localhost, user3,,;
SET @@session.sql_log_bin=OFF;
DELETE FROM t1 WHERE s1 = 3;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (3);
ROLLBACK;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (3);
ROLLBACK;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (3);
ROLLBACK;
-
-================================================================================
-CONNECTION DEFAULT: Gather results, compare session and global status counts
-================================================================================
+#
+# ================================================================================
+# CONNECTION DEFAULT: Gather results, compare session and global status counts
+# ================================================================================
connection default;
# Get thread ids for each connection.
USE performance_schema;
@@ -93,7 +93,7 @@ UPDATE test.status_results sr, performance_schema.global_status sg
SET sr.stop = sg.variable_value
WHERE sr.variable_name = sg.variable_name
AND sg.variable_name IN ('handler_delete', 'handler_rollback');
-
+#
# Global deltas: END - START.
UPDATE test.status_results sr
SET sr.delta = sr.stop - sr.start;
@@ -106,21 +106,21 @@ SET sr.t1 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con1_id;
-
+#
# Thread results from CON2.
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
SET sr.t2 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con2_id;
-
+#
# Thread results from CON3.
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
SET sr.t3 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con3_id;
-
+#
# Thread totals for 3 connections.
UPDATE test.status_results sr
SET sr.thread = sr.t1 + sr.t2 + sr.t3;
@@ -133,35 +133,35 @@ SET sr.u1 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user1');
-
+#
# User2
UPDATE test.status_results sr, performance_schema.status_by_user sbu
SET sr.u2 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user2');
-
+#
# User3
UPDATE test.status_results sr, performance_schema.status_by_user sbu
SET sr.u3 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user3');
-
+#
# Status totals for 3 users.
UPDATE test.status_results sr
SET sr.user = sr.u1 + sr.u2 + sr.u3;
#===========================
# Status by host (localhost)
#===========================
-
+#
# host1 = localhost
UPDATE test.status_results sr, performance_schema.status_by_host sbh
SET sr.h1 = sbh.variable_value
WHERE sr.variable_name = sbh.variable_name
AND sbh.variable_name IN ('handler_delete', 'handler_rollback')
AND sbh.host IN ('localhost');
-
+#
# Status totals for 'localhost' only.
UPDATE test.status_results sr
SET sr.host = sr.h1 + sr.h2 + sr.h3;
@@ -174,29 +174,29 @@ SET sr.a1 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user1');
-
+#
# User2@localhost
UPDATE test.status_results sr, performance_schema.status_by_account sba
SET sr.a2 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user2');
-
+#
# User3@localhost
UPDATE test.status_results sr, performance_schema.status_by_account sba
SET sr.a3 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user3');
-
-
+#
+#
# Status totals for 3 accounts.
UPDATE test.status_results sr
SET sr.acct = sr.a1 + sr.a2 + sr.a3;
-
-================================================================================
-TEST 1: STATUS_BY_THREAD: Verify expected status counts per thread (1,2,3)
-================================================================================
+#
+# ================================================================================
+# TEST 1: STATUS_BY_THREAD: Verify expected status counts per thread (1,2,3)
+# ================================================================================
#
# Review per-thread status counts
#
@@ -215,11 +215,11 @@ thread_id Handler_rollback 3
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete');
THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
connect_1 Handler_delete 1 OK
-
+#
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete');
THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
connnect_2 Handler_delete 2 OK
-
+#
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete');
THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
connnect_3 Handler_delete 3 OK
@@ -232,18 +232,18 @@ ORDER BY variable_name;
variable_name t1 t2 t3 delta thread Expected
Handler_delete 1 2 3 6 6 OK
Handler_rollback 1 2 3 6 6 OK
-
-================================================================================
-TEST 2: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
-================================================================================
+#
+# ================================================================================
+# TEST 2: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+# ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
USER VARIABLE_NAME VARIABLE_VALUE Expected
user1 Handler_delete 1 OK
-
+#
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
USER VARIABLE_NAME VARIABLE_VALUE Expected
user2 Handler_delete 2 OK
-
+#
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
USER VARIABLE_NAME VARIABLE_VALUE Expected
user3 Handler_delete 3 OK
@@ -256,18 +256,18 @@ ORDER BY variable_name;
variable_name u1 u2 u3 delta user Expected
Handler_delete 1 2 3 6 6 OK
Handler_rollback 1 2 3 6 6 OK
-
-================================================================================
-TEST 3: STATUS_BY_ACCOUNT: Verify expected status counts per user, host (1,2,3)
-================================================================================
+#
+# ================================================================================
+# TEST 3: STATUS_BY_ACCOUNT: Verify expected status counts per user, host (1,2,3)
+# ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
user1 localhost Handler_delete 1 OK
-
+#
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
user2 localhost Handler_delete 2 OK
-
+#
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
user3 localhost Handler_delete 3 OK
@@ -280,9 +280,9 @@ ORDER BY variable_name;
variable_name a1 a2 a3 delta acct Expected
Handler_delete 1 2 3 6 6 OK
Handler_rollback 1 2 3 6 6 OK
-================================================================================
-TEST 4: STATUS_BY_HOST: Verify expected status counts per host (6)
-================================================================================
+# ================================================================================
+# TEST 4: STATUS_BY_HOST: Verify expected status counts per host (6)
+# ================================================================================
SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
HOST VARIABLE_NAME VARIABLE_VALUE Expected
localhost Handler_delete 6 OK
@@ -298,17 +298,17 @@ ORDER BY variable_name;
variable_name h1 h2 h3 delta host Expected
Handler_delete 6 0 0 6 6 OK
Handler_rollback 6 0 0 6 6 OK
-
-================================================================================
-DISCONNECT ALL USERS AND RUN THE TESTS AGAIN. RESULTS SHOULD NOT CHANGE.
-================================================================================
+#
+# ================================================================================
+# DISCONNECT ALL USERS AND RUN THE TESTS AGAIN. RESULTS SHOULD NOT CHANGE.
+# ================================================================================
connection default;
disconnect con1;
disconnect con2;
disconnect con3;
-
+#
USE test;
-
+#
# Clear results table, leave initial global_status counts
UPDATE test.status_results
SET stop=0, delta=0,
@@ -316,7 +316,7 @@ t1=0, t2=0, t3=0, thread=0,
u1=0, u2=0, u3=0, user=0,
h1=0, h2=0, h3=0, host=0,
a1=0, a2=0, a3=0, acct=0;
-
+#
#=================
# Global results
#=================
@@ -325,7 +325,7 @@ UPDATE test.status_results sr, performance_schema.global_status sg
SET sr.stop = sg.variable_value
WHERE sr.variable_name = sg.variable_name
AND sg.variable_name IN ('handler_delete', 'handler_rollback');
-
+#
# Global deltas: END - START.
UPDATE test.status_results sr
SET sr.delta = sr.stop - sr.start;
@@ -338,21 +338,21 @@ SET sr.t1 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con1_id;
-
+#
# Thread results from CON2.
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
SET sr.t2 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con2_id;
-
+#
# Thread results from CON3.
UPDATE test.status_results sr, performance_schema.status_by_thread sbt
SET sr.t3 = sbt.variable_value
WHERE sr.variable_name = sbt.variable_name
AND sbt.variable_name IN ('handler_delete', 'handler_rollback')
AND sbt.thread_id = @con3_id;
-
+#
# Thread totals for 3 connections.
UPDATE test.status_results sr
SET sr.thread = sr.t1 + sr.t2 + sr.t3;
@@ -365,35 +365,35 @@ SET sr.u1 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user1');
-
+#
# User2
UPDATE test.status_results sr, performance_schema.status_by_user sbu
SET sr.u2 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user2');
-
+#
# User3
UPDATE test.status_results sr, performance_schema.status_by_user sbu
SET sr.u3 = sbu.variable_value
WHERE sr.variable_name = sbu.variable_name
AND sbu.variable_name IN ('handler_delete', 'handler_rollback')
AND sbu.user IN ('user3');
-
+#
# Status totals for 3 users.
UPDATE test.status_results sr
SET sr.user = sr.u1 + sr.u2 + sr.u3;
#===========================
# Status by host (localhost)
#===========================
-
+#
# host1 = localhost
UPDATE test.status_results sr, performance_schema.status_by_host sbh
SET sr.h1 = sbh.variable_value
WHERE sr.variable_name = sbh.variable_name
AND sbh.variable_name IN ('handler_delete', 'handler_rollback')
AND sbh.host IN ('localhost');
-
+#
# Status totals for 'localhost' only.
UPDATE test.status_results sr
SET sr.host = sr.h1 + sr.h2 + sr.h3;
@@ -406,42 +406,42 @@ SET sr.a1 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user1');
-
+#
# User2@localhost
UPDATE test.status_results sr, performance_schema.status_by_account sba
SET sr.a2 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user2');
-
+#
# User3@localhost
UPDATE test.status_results sr, performance_schema.status_by_account sba
SET sr.a3 = sba.variable_value
WHERE sr.variable_name = sba.variable_name
AND sba.variable_name IN ('handler_delete', 'handler_rollback')
AND sba.user IN ('user3');
-
-
+#
+#
# Status totals for 3 accounts.
UPDATE test.status_results sr
SET sr.acct = sr.a1 + sr.a2 + sr.a3;
USE performance_schema;
-
-================================================================================
-TEST X: STATUS_BY_THREAD: Connections are gone--nothing to verify.
-================================================================================
-
-================================================================================
-TEST 5: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
-================================================================================
+#
+# ================================================================================
+# TEST X: STATUS_BY_THREAD: Connections are gone--nothing to verify.
+# ================================================================================
+#
+# ================================================================================
+# TEST 5: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+# ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
USER VARIABLE_NAME VARIABLE_VALUE Expected
user1 Handler_delete 1 OK
-
+#
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
USER VARIABLE_NAME VARIABLE_VALUE Expected
user2 Handler_delete 2 OK
-
+#
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
USER VARIABLE_NAME VARIABLE_VALUE Expected
user3 Handler_delete 3 OK
@@ -454,18 +454,18 @@ ORDER BY variable_name;
variable_name u1 u2 u3 delta user Expected
Handler_delete 1 2 3 6 6 OK
Handler_rollback 1 2 3 6 6 OK
-
-================================================================================
-TEST 6: STATUS_BY_ACCOUNT: Verify expected status counts per user:host (1,2,3)
-================================================================================
+#
+# ================================================================================
+# TEST 6: STATUS_BY_ACCOUNT: Verify expected status counts per user:host (1,2,3)
+# ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
user1 localhost Handler_delete 1 OK
-
+#
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
user2 localhost Handler_delete 2 OK
-
+#
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
USER HOST VARIABLE_NAME VARIABLE_VALUE Expected
user3 localhost Handler_delete 3 OK
@@ -478,9 +478,9 @@ ORDER BY variable_name;
variable_name a1 a2 a3 delta acct Expected
Handler_delete 1 2 3 6 6 OK
Handler_rollback 1 2 3 6 6 OK
-================================================================================
-TEST 7: STATUS_BY_HOST: Verify expected status counts per host (6)
-================================================================================
+# ================================================================================
+# TEST 7: STATUS_BY_HOST: Verify expected status counts per host (6)
+# ================================================================================
SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
HOST VARIABLE_NAME VARIABLE_VALUE Expected
localhost Handler_delete 6 OK
@@ -496,30 +496,30 @@ ORDER BY variable_name;
variable_name h1 h2 h3 delta host Expected
Handler_delete 6 0 0 6 6 OK
Handler_rollback 6 0 0 6 6 OK
-================================================================================
-TEST 8: FLUSH STATUS should clear account, host and user status
-================================================================================
-
+# ================================================================================
+# TEST 8: FLUSH STATUS should clear account, host and user status
+# ================================================================================
+#
FLUSH STATUS;
-
+#
SELECT * FROM status_by_account WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
USER HOST VARIABLE_NAME VARIABLE_VALUE
user1 localhost Handler_delete 0
user2 localhost Handler_delete 0
user3 localhost Handler_delete 0
-
+#
SELECT * FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
HOST VARIABLE_NAME VARIABLE_VALUE
localhost Handler_delete 0
-
+#
SELECT * FROM status_by_user WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
USER VARIABLE_NAME VARIABLE_VALUE
user1 Handler_delete 0
user2 Handler_delete 0
user3 Handler_delete 0
-================================================================================
-CLEANUP
-================================================================================
+# ================================================================================
+# CLEANUP
+# ================================================================================
DROP TABLE test.t1;
DROP TABLE test.t2;
DROP TABLE test.t3;
@@ -527,4 +527,4 @@ DROP TABLE test.status_results;
DROP USER 'user1'@localhost;
DROP USER 'user2'@localhost;
DROP USER 'user3'@localhost;
-
+#
diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result
index 304521b044f..b729b7b3840 100644
--- a/mysql-test/suite/perfschema/r/socket_connect.result
+++ b/mysql-test/suite/perfschema/r/socket_connect.result
@@ -11,21 +11,21 @@ SELECT @@port INTO @MY_MASTER_PORT;
# 1.0 Get the default connection object_instance_begin, thread id and verify
# the expected number of client connections.
#==============================================================================
-
+#
# 1.1 Confirm only one client connection
-
+#
SELECT COUNT(*) INTO @my_client_connections
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE "%client_connection%";
-
+#
# 1.2 Get the default THREAD_ID;
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 1.3 Get the default OBJECT_INSTANCE_BEGIN
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
@@ -33,27 +33,27 @@ WHERE THREAD_ID = @my_thread_id;
# 2.0 ESTABLISH TCP/IP CONNECTION 1
# Connect with IP = localhost (127.0.0.1 or ::1)
#==============================================================================
-
+#
# 2.1 Get the connection thread id
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 2.2 Get the connection object instance begin
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 2.3 Get the connection port
-
+#
SELECT PORT INTO @my_port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 2.4 Verify that the connection is 127.0.0.1 or ::1
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -62,44 +62,44 @@ AND PORT= @con1_port
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
Expect 1
1
-
+#
# 2.5 Verify that the same connection is in the summary instance table
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
Expect 1
1
-
+#
# Switch to connection default
-
+#
connection default;
#==============================================================================
# 3.0 ESTABLISH TCP/IP CONNECTION 2
# Connect with IP = localhost (127.0.0.1 or ::1)
#==============================================================================
-
+#
# 3.1 Get the connection thread id
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 3.2 Get the connection object instance begin
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 3.3 Get the connection port
-
+#
SELECT PORT INTO @my_port
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 3.4 Verify that the connection is 127.0.0.1 or ::1
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -108,18 +108,18 @@ AND PORT= @con2_port
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
Expect 1
1
-
+#
# 3.5 Verify that the same connection is in the summary instance table
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
Expect 1
1
-
+#
# 3.6 Verify that the connection is 127.0.0.1 or ::1
-
+#
SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -132,9 +132,9 @@ 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
-
+#
SELECT COUNT(*) = 2 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -142,9 +142,9 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1');
Expect 1
1
-
+#
# 4.2 Verify that there are two TCP/IP connections in the summary instance table
-
+#
SELECT COUNT(*) = 2 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -164,9 +164,9 @@ connection default;
#==============================================================================
# 6.0 Verify sockets were removed from the instance tables
#==============================================================================
-
+#
# 6.1 Verify that there are no TCP/IP connections in the socket instance table
-
-
+#
+#
# 6.2 Verify that there are no TCP/IP connections in the summary instance table
-
+#
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 455b6a2ad00..01e374ed94f 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
@@ -10,123 +10,123 @@ SELECT @@port INTO @MY_MASTER_PORT;
#==============================================================================
# 1.0 TEST INITIALIZATION
#==============================================================================
-
+#
# 1.1 Disable instrumentation of the default (this) connection
-
+#
connection default;
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 1.2 Get the default THREAD_ID;
-
+#
SELECT THREAD_ID INTO @my_thread_id
FROM performance_schema.threads
WHERE PROCESSLIST_ID = CONNECTION_ID();
-
+#
# 1.3 Get the default OBJECT_INSTANCE_BEGIN
-
+#
SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
FROM performance_schema.socket_instances
WHERE THREAD_ID = @my_thread_id;
-
+#
# 1.4 Create a test database
-
+#
CREATE SCHEMA mysqltest;
-
+#
# 1.5 Create a table to store summary values from socket_summary_by_instance
and socket_summary_by_event_name
-
+#
CREATE TABLE mysqltest.my_socket_summary AS
SELECT * FROM performance_schema.socket_summary_by_instance
WHERE 1 = 0;
-
+#
# 1.6 Drop object_instance_begin from my_socket_summary
-
+#
ALTER TABLE mysqltest.my_socket_summary
DROP COLUMN OBJECT_INSTANCE_BEGIN;
-
+#
# 1.7 Add an auto_inc column to my_socket_summary
-
+#
ALTER TABLE mysqltest.my_socket_summary
ADD COLUMN (n INT AUTO_INCREMENT, PRIMARY KEY(n));
-
+#
# 1.8 Create test tables
-
+#
CREATE TABLE mysqltest.t1 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
CREATE TABLE mysqltest.t2 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
#==============================================================================
# 2.0 ESTABLISH CLIENT CONNECTIONS
#==============================================================================
-
+#
# 2.1 Connection 1 (tcp/ip, 127.0.0.1 or ::1)
-
-
+#
+#
# 2.2 Connection 2 (localhost or unix domain socket)
-
+#
#==============================================================================
# 3.0 RUN THE TESTS
#==============================================================================
-
+#
# 3.1 Clear performance schema tables
-
+#
TRUNCATE performance_schema.socket_summary_by_instance;
TRUNCATE performance_schema.socket_summary_by_event_name;
-
+#
# 3.2 Get the 'before' sum of bytes written from socket_summary_by_instance
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;
-
+#
# 3.6 Verify that SUM_NUMBER_OF_BYTES_WRITE increased
-
-
+#
+#
# socket_summary_by_instance was updated
-
+#
#==============================================================================
# 4.0 VERIFY RESULTS
#==============================================================================
-
+#
# 4.1 Verify that the totals in socket_summary_by_event_name are
consistent with totals in socket_summary_by_instance
-
+#
#==============================================================================
# 5.0 Clean up
#==============================================================================
-
+#
# 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 424d24b1a3e..a70ff6149eb 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
@@ -140,47 +140,47 @@ connection default;
# 4.4.4 Compare impact of statements
# SELECT col2 FROM does_not_exist WHERE col1 = 0
# SELECT col2 FROM does_not_exist
-# One statement is longer than the other.
+# # One statement is longer than the other.
# Both statements fail with the same error message (table does not exist)
# 4.4.5 Compare impact of statements
# SELECT col2 FROM does_not_exist WHERE col1 A 0
# SELECT col2 FROM does_not_exist WHERE col1 = 0
-# Both statements have the same length and fail.
+# # Both statements have the same length and fail.
# The length of the error messages differs.
# 4.4.6 Compare impact of statements
# SELECT col2 FROM does_not_exist0123
# SELECT col2 FROM does_not_exist
-# Both statements fail (table does not exist).
+# # Both statements fail (table does not exist).
# The length of the statement and the length of the error messages differs.
# Reason for both differences is the length of the table name.
# 4.4.7 Compare impact of statements
# SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
-# Both statements get an empty result set.
+# # Both statements get an empty result set.
# The length of the statements and the length of the result sets differs.
# Reason for both differences is the length of the some column name.
# 4.4.8 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
-# Both statements differ in the statement length.
+# # Both statements differ in the statement length.
# One statement earns an empty result set.
# The other statement earns one row containing an empty string.
# 4.4.9 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
-# Both statements have the same length.
+# # Both statements have the same length.
# One statement earns an one row containing an empty string.
# The other statement earns one row containing a string 1 byte long.
# 4.4.10 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
-# Both statements have the same length.
+# # Both statements have the same length.
# One statement earns an one row containing an empty string.
# The other statement earns one row containing a string 1024 byte long.
# 4.4.11 Compare impact of statements
# SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2
# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
-# Both statements have the same length.
+# # Both statements have the same length.
# One statement earns an one row containing an empty string.
# The other statement earns two rows containing an empty string.
# 4.5 Check the differences caused by Connects
diff --git a/mysql-test/suite/perfschema/r/table_name.result b/mysql-test/suite/perfschema/r/table_name.result
index 3ee335991d8..1cca88baf2b 100644
--- a/mysql-test/suite/perfschema/r/table_name.result
+++ b/mysql-test/suite/perfschema/r/table_name.result
@@ -1,16 +1,16 @@
-
+#
#
# TEST 1: Normal tables prefixed with "#sql" and "sql".
#
USE test;
CREATE TABLE `#sql_1` (a int, b text);
INSERT INTO `#sql_1` VALUES(1,'one');
-
+#
CREATE TABLE `sql_1` (a int, b text);
INSERT INTO `sql_1` VALUES(1,'one');
-
+#
# Verify that the tables are treated as normal tables .
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
@@ -18,46 +18,46 @@ ORDER BY object_name;
object_type object_schema object_name
TABLE test #sql_1
TABLE test sql_1
-
+#
# Drop the tables, verify that the table objects are removed.
-
+#
DROP TABLE `#sql_1`;
DROP TABLE `sql_1`;
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 2: Temporary tables, no special prefix.
#
CREATE TEMPORARY TABLE sql_temp2_myisam (a int, b text) ENGINE=MYISAM;
INSERT INTO sql_temp2_myisam VALUES(1,'one');
-
+#
CREATE TEMPORARY TABLE sql_temp2_innodb (a int, b text) ENGINE=INNODB;
INSERT INTO sql_temp2_innodb VALUES(1,'one');
-
+#
# Confirm that the temporary tables are ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the tables, verify that the table objects are not created.
-
+#
DROP TABLE sql_temp2_myisam;
DROP TABLE sql_temp2_innodb;
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 3: Temporary tables with the "#sql" prefix.
#
@@ -66,78 +66,78 @@ CHECK TABLE `#sql_temp3_myisam`;
Table Op Msg_type Msg_text
test.#sql_temp3_myisam check status OK
INSERT INTO `#sql_temp3_myisam` VALUES(1,'one');
-
+#
CREATE TEMPORARY TABLE `#sql_temp3_innodb` (a int, b text) ENGINE=INNODB;
CHECK TABLE `#sql_temp3_innodb`;
Table Op Msg_type Msg_text
test.#sql_temp3_innodb check status OK
INSERT INTO `#sql_temp3_innodb` VALUES(1,'one');
-
+#
# Confirm that the temporary tables are ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the temporary tables.
-
+#
DROP TABLE `#sql_temp3_myisam`;
DROP TABLE `#sql_temp3_innodb`;
-
+#
# Confirm that the temporary tables are still ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 4: Special case: MyISAM temporary tables are recreated as non-temporary
# when they are truncated.
#
CREATE TEMPORARY TABLE `sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `sql_temp4_myisam` VALUES(1,'one');
-
+#
CREATE TEMPORARY TABLE `#sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `#sql_temp4_myisam` VALUES(1,'one');
-
+#
# Confirm that the MyISAM temporary tables are ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
# Truncate the MyISAM temporary tables, forcing them to be recreated as non-temporary.
-
+#
TRUNCATE TABLE `sql_temp4_myisam`;
TRUNCATE TABLE `#sql_temp4_myisam`;
-
+#
# Confirm that the recreated MyISAM tables are still regarded as temporary and ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the recreated MyISAM tables;
-
+#
DROP TABLE `sql_temp4_myisam`;
DROP TABLE `#sql_temp4_myisam`;
-
+#
# Confirm that the recreated temporary tables are still ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
#
# TEST 5: Generate temporary tables with ALTER MyISAM table.
#
@@ -145,21 +145,21 @@ USE test;
CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2), (3);
ALTER TABLE t1 ADD COLUMN (b int);
-
+#
# Confirm that the recreated temporary tables are still ignored.
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
object_type object_schema object_name
-
+#
# Drop the MyISAM table
-
+#
DROP TABLE t1;
-
+#
# Confirm that no tables remain;
-
+#
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
diff --git a/mysql-test/suite/perfschema/r/transaction.result b/mysql-test/suite/perfschema/r/transaction.result
index 56c50d14879..9a7eb5b3eb5 100644
--- a/mysql-test/suite/perfschema/r/transaction.result
+++ b/mysql-test/suite/perfschema/r/transaction.result
@@ -1,43 +1,43 @@
set global binlog_format=ROW;
-
-========================================================================
-STEP 1 - SETUP
-========================================================================
-
+#
+# ========================================================================
+# STEP 1 - SETUP
+# ========================================================================
+#
# Control thread
-
+#
connection default;
SET SESSION AUTOCOMMIT= 1;
SELECT thread_id INTO @my_thread_id
FROM performance_schema.threads
WHERE processlist_id = connection_id();
-
+#
# Connection 1
-
+#
connect con1, localhost, root,,;
SET SESSION AUTOCOMMIT= 0;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE;
connection default;
-
+#
# Create test tables, one transactional and one non-transactional
-
+#
connection default;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS nt1;
CREATE TABLE t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
CREATE TABLE nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
-
+#
# Disable all events from the control thread
-
-
+#
+#
# Clear transaction tables
-
+#
CALL clear_transaction_tables();
-
-========================================================================
+#
+# ========================================================================
# STEP 2 - BASIC TRANSACTION
-========================================================================
-
+# ========================================================================
+#
connection con1;
SELECT @@global.tx_isolation;
@@global.tx_isolation
@@ -57,19 +57,19 @@ SELECT @@autocommit;
SELECT @@binlog_format;
@@binlog_format
ROW
-
+#
# STEP 2.1 - START/COMMIT
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (101, 'COMMITTED');
COMMIT;
-
+#
# STEP 2.2 - ROLLBACK
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (102, 'ROLLED BACK');
ROLLBACK;
-
+#
## Expect 1 committed and 1 rolled back transaction
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
@@ -79,28 +79,28 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
+#
# STEP 2.3 - COMMIT AND CHAIN
-
+#
connection con1;
START TRANSACTION;
INSERT INTO t1 VALUES (103, 'COMMIT AND CHAIN');
COMMIT AND CHAIN;
INSERT INTO t1 VALUES (104, 'COMMIT AND CHAIN');
COMMIT;
-
+#
## Expect 2 committed transactions
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 2);
ACTUAL EXPECTED
2 2
CALL clear_transaction_tables();
-
-========================================================================
+#
+# ========================================================================
# STEP 3 - ISOLATION LEVEL
-========================================================================
-
-connection con1
+# ========================================================================
+#
+# connection con1
connection con1;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION;
@@ -122,7 +122,7 @@ INSERT INTO t1 VALUES (304, 'READ UNCOMMITTED');
COMMIT;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SET binlog_format= @binlog_save;
-
+#
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'SERIALIZABLE', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
@@ -137,15 +137,15 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '',
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
-========================================================================
+#
+# ========================================================================
# STEP 4 - ACCESS MODE
-========================================================================
+# ========================================================================
#
# STEP 4.1 - READ ONLY, TIMING ENABLED
#
-
-connection con1
+#
+# connection con1
connection con1;
SET SESSION TRANSACTION READ WRITE;
START TRANSACTION;
@@ -170,23 +170,23 @@ s1 s2
412 READ ONLY
413 READ ONLY
COMMIT;
-
+#
## Expect 1 read only, committed transaction in events_transactions_history
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ ONLY', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
+#
#
# STEP 4.2 - READ ONLY, TIMING DISABLED
#
-
+#
## Disable timing stats for 'transaction'
UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
-
+#
TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
-connection con1
+# connection con1
connection con1;
START TRANSACTION;
SELECT * FROM t1 ORDER BY s1;
@@ -203,29 +203,29 @@ s1 s2
412 READ ONLY
413 READ ONLY
COMMIT;
-
+#
SET SESSION TRANSACTION READ WRITE;
connection default;
-
+#
## Expect 1 event, 0 stats
SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
transaction 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0
-
+#
## Restore setup_instruments
UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
-
-========================================================================
+#
+# ========================================================================
# STEP 5 - IMPLICIT START
-========================================================================
+# ========================================================================
# When AUTOCOMMIT is disabled, the first statement following a committed
# transaction marks the start of a new transaction. Subsequent statements will
# be part of the transaction until it is committed.
-
+#
connection con1;
SET SESSION AUTOCOMMIT = 0;
INSERT INTO t1 VALUES (501, 'IMPLICIT START');
-
+#
## Expect 1 active transaction in events_transactions_current
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -234,7 +234,7 @@ ACTUAL EXPECTED
connection con1;
INSERT INTO t1 VALUES (502, 'IMPLICIT START');
COMMIT;
-
+#
## Expect one committed transaction in events_transactions_current and history
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -244,17 +244,17 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '',
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
-========================================================================
+#
+# ========================================================================
# STEP 6 - IMPLICIT COMMIT (DDL, ETC)
-========================================================================
+# ========================================================================
# Transactions are implicitly ended by DDL statements, locking statements
# and server administration commands.
-
+#
connection con1;
SET SESSION AUTOCOMMIT = 0;
INSERT INTO t1 VALUES (601, 'IMPLICIT COMMIT');
-
+#
## Expect one active transaction in events_transactions_current, zero events in history
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -267,7 +267,7 @@ connection con1;
INSERT INTO t1 VALUES (602, 'IMPLICIT COMMIT');
## Issue a DDL statement to force a commmit
CREATE TABLE t2 (s1 INT, s2 VARCHAR(64)) ENGINE=INNODB;
-
+#
## Expect 0 active transactions, 1 committed transaction
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 0);
@@ -281,52 +281,52 @@ ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
DROP TABLE test.t2;
-
-========================================================================
-STEP 7 - XA TRANSACTIONS
-========================================================================
+#
+# ========================================================================
+# STEP 7 - XA TRANSACTIONS
+# ========================================================================
#
# STEP 7.1 - XA START
#
connection con1;
XA START 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
-
+#
## Expect 1 active XA transaction, state ACTIVE
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'ACTIVE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
-
+#
# STEP 7.2 - XA END
-
+#
connection con1;
INSERT INTO t1 VALUES (701, 'XA');
XA END 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
-
+#
## Expect 1 active XA transaction, state IDLE
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'IDLE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
-
+#
#
# STEP 7.3 - XA PREPARE
#
connection con1;
XA PREPARE 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
-
+#
## Expect 1 active XA transaction, state PREPARED
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
-
+#
#
# STEP 7.4 - XA COMMIT
#
connection con1;
XA COMMIT 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
-
+#
## Expect 1 committed XA transaction, state COMMITTED in current and history
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -336,7 +336,7 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 123456
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
+#
#
# STEP 7.5 - XA ROLLBACK
#
@@ -345,7 +345,7 @@ XA START 'XA_CON1_002';
INSERT INTO t1 VALUES (702, 'XA');
XA END 'XA_CON1_002';
XA PREPARE 'XA_CON1_002';
-
+#
## Expect 1 active XA transaction, state PREPARED
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, 'XA_CON1_002', '', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -353,7 +353,7 @@ ACTUAL EXPECTED
1 1
connection con1;
XA ROLLBACK 'XA_CON1_002';
-
+#
## Expect 1 XA transaction, state ROLLBACK ONLY in current and history
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, 'XA_CON1_002', '', 'ROLLBACK ONLY', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -374,7 +374,7 @@ INSERT INTO t1 VALUES (703, 'XA LONG');
XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
-
+#
## Expect 1 committed XA transaction, state COMMITTED in current and history
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', 'BQUAL_6789012345678901234567890123456789012345678901234567890123', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -393,7 +393,7 @@ INSERT INTO t1 VALUES (704, 'XA LONG/BINARY');
XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
-
+#
## Expect 1 committed XA transaction, state COMMITTED in current and history
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', '0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -403,23 +403,23 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 123456
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
-========================================================================
+#
+# ========================================================================
# STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
-========================================================================
-
+# ========================================================================
+#
## MariaDB bug: MDEV-6012? MDEV-14436?
set @mariadb_bug=1;
connection con1;
SET SESSION AUTOCOMMIT = 0;
SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME STATE TRX_ID GTID XID_FORMAT_ID XID_GTRID XID_BQUAL XA_STATE SOURCE TIMER_START TIMER_END TIMER_WAIT ACCESS_MODE ISOLATION_LEVEL AUTOCOMMIT NUMBER_OF_SAVEPOINTS NUMBER_OF_ROLLBACK_TO_SAVEPOINT NUMBER_OF_RELEASE_SAVEPOINT OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE
-
+#
#
# STEP 8.1 - UPDATE NON-TRANSACTIONAL TABLE
#
INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
-
+#
## Expect 0 transactions in events_transactions_current
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
@@ -427,41 +427,41 @@ ACTUAL EXPECTED
1 1
connection con1;
COMMIT;
-
+#
## Expect 0 transactions in events_transactions_history
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
ACTUAL EXPECTED
1 1
-
+#
#
# STEP 8.2 - UPDATE TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
#
-
+#
## First non-transactional...
-
+#
connection con1;
INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
-
+#
## Expect 0 transactions in events_transactions_current
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
ACTUAL EXPECTED
1 1
-
+#
## Now transactional. Transaction should be started.
connection con1;
INSERT INTO t1 VALUES (802, 'TRANSACTIONAL');
-
+#
## Expect 1 transaction in events_transactions_current
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
-
+#
connection con1;
COMMIT;
-
+#
## Expect 1 committed transaction in events_transactions_current and history
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -471,10 +471,10 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '',
ACTUAL EXPECTED
2 2
CALL clear_transaction_tables();
-
-========================================================================
+#
+# ========================================================================
# STEP 9 - SAVEPOINTS
-========================================================================
+# ========================================================================
#
# STEP 9.1 - SAVEPOINT 1
#
@@ -482,13 +482,13 @@ connection con1;
START TRANSACTION;
INSERT INTO t1 VALUES (901, 'SAVEPOINT');
SAVEPOINT SVP001;
-
+#
## Expect 1 active transaction with 1 savepoint
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 1, 0, 0, 1);
ACTUAL EXPECTED
1 1
-
+#
#
# STEP 9.2 - SAVEPOINTS 2 and 3
#
@@ -501,25 +501,25 @@ INSERT INTO t1 VALUES (904, 'SAVEPOINT');
SELECT COUNT(*) FROM t1 WHERE s1 > 900;
COUNT(*)
4
-
+#
#
# STEP 9.3 - ROLLBACK TO SAVEPOINT 2
#
connection con1;
ROLLBACK TO SVP002;
-
+#
## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 0, 1);
ACTUAL EXPECTED
1 1
-
+#
#
# STEP 9.4 - RELEASE SAVEPOINT 1
#
connection con1;
RELEASE SAVEPOINT SVP001;
-
+#
## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
connection default;
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
@@ -530,50 +530,50 @@ ACTUAL EXPECTED
#
connection con1;
COMMIT;
-
+#
## Expect 1 committed transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
-========================================================================
+#
+# ========================================================================
# STEP 10 - GTIDs
-========================================================================
-GTIDs are tested in transaction_gtid.test.
-
-========================================================================
+# ========================================================================
+# GTIDs are tested in transaction_gtid.test.
+#
+# ========================================================================
# STEP 11 - MISCELLANY
-========================================================================
+# ========================================================================
#
# STEP 11.1 - TRUNCATE DURING ACTIVE TRANSACTION
#
-
+#
# Verify that truncating events_transactions_current during an active transaction
# does not leave an orphaned transaction event, and that the row index to
# events_transactions_history is reset to 0.
-
+#
connection con1;
START TRANSACTION;
INSERT INTO t1 VALUES (1110, 'INSERT 1110');
connection default;
TRUNCATE performance_schema.events_transactions_current;
connection con1;
-
+#
COMMIT;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (1111, 'INSERT 1111');
COMMIT;
-
+#
## Expect 1 transaction for connection 1
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', '', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
CALL clear_transaction_tables();
-
+#
#
# STEP 11.2 - DISABLE THREAD INSTRUMENTATION
#
@@ -581,93 +581,93 @@ connection default;
UPDATE performance_schema.setup_consumers
SET enabled = 'NO'
WHERE name = 'thread_instrumentation';
-
+#
TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
connection con1;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (1120, 'INSERT 1120');
COMMIT;
connection default;
-
+#
## Expect 1 event with non-zero summary stats
SELECT EVENT_NAME, COUNT_STAR, SUM_TIMER_WAIT, MIN_TIMER_WAIT, AVG_TIMER_WAIT, COUNT_READ_WRITE
FROM performance_schema.events_transactions_summary_global_by_event_name
WHERE count_star = 1 and sum_timer_wait != 0;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT COUNT_READ_WRITE
-
+#
## Disable timing stats for 'transaction'
UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
-
+#
TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
connection default;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (1121, 'INSERT 1121');
COMMIT;
connection default;
-
+#
## Expect 1 event, 0 stats
SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ_WRITE SUM_TIMER_READ_WRITE MIN_TIMER_READ_WRITE AVG_TIMER_READ_WRITE MAX_TIMER_READ_WRITE COUNT_READ_ONLY SUM_TIMER_READ_ONLY MIN_TIMER_READ_ONLY AVG_TIMER_READ_ONLY MAX_TIMER_READ_ONLY
transaction 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0
-
+#
## Restore setup_consumers and setup_instruments
UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name = 'thread_instrumentation';
UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
-
+#
DELETE FROM t1;
CALL clear_history();
-
+#
#
# STEP 11.3 - STATEMENT ROLLBACK - AUTOCOMMIT OFF - BINLOG FORMAT 'STATEMENT'
#
connection con1;
SET SESSION binlog_format = STATEMENT;
SET SESSION AUTOCOMMIT = 0;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (1130, 'INSERT 1130');
-
+#
## Expect binlog statement mode error
UPDATE t1, performance_schema.setup_instruments pfs
SET t1.s1 = 1, pfs.timed = 'NO';
-
+#
COMMIT;
-
+#
SET SESSION AUTOCOMMIT = 1;
-
+#
## Expect 1 committed transaction
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', 'NO', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
-
+#
DELETE FROM t1;
CALL clear_history();
-
+#
#
# STEP 11.4 - STATEMENT ROLLBACK - AUTOCOMMIT ON - BINLOG FORMAT 'STATEMENT'
#
connection con1;
SET SESSION binlog_format = STATEMENT;
SET SESSION AUTOCOMMIT = 1;
-
+#
## Expect binlog statement mode error
UPDATE t1, performance_schema.setup_instruments pfs
SET t1.s1 = 1, pfs.timed = 'NO';
-
+#
## Expect 1 rolled back transaction
connection default;
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '', '', '', '', '', '', 'YES', 0, 0, 0, 1);
ACTUAL EXPECTED
1 1
CALL clear_history();
-
-========================================================================
+#
+# ========================================================================
# CLEAN UP
-========================================================================
-
+# ========================================================================
+#
disconnect con1;
connection default;
DROP TABLE t1;
diff --git a/mysql-test/suite/perfschema/r/transaction_nested_events.result b/mysql-test/suite/perfschema/r/transaction_nested_events.result
index 62152f2c2cf..6fa3822f090 100644
--- a/mysql-test/suite/perfschema/r/transaction_nested_events.result
+++ b/mysql-test/suite/perfschema/r/transaction_nested_events.result
@@ -1,20 +1,20 @@
-
+#
#========================================================================
# STEP 1 - SETUP
#========================================================================
-
+#
## Setup control thread
-
+#
connection default;
SET SESSION AUTOCOMMIT= 1;
USE test;
DROP DATABASE IF EXISTS db;
-
+#
## Create test database, test tables, one transactional and one non-transactional
CREATE DATABASE db;
CREATE TABLE db.t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
CREATE TABLE db.nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
-
+#
## Setup connection 1
connect con1, localhost, root,,;
USE db;
@@ -23,19 +23,19 @@ SELECT thread_id INTO @my_thread_id
FROM performance_schema.threads
WHERE processlist_id = connection_id();
connection default;
-
+#
## Disable events from the control (default) connection
UPDATE performance_schema.threads SET instrumented = 'NO' WHERE processlist_id = CONNECTION_ID();
SET @all_threads= 0;
-
+#
## Enable only transaction and statement instruments
UPDATE performance_schema.setup_instruments SET enabled='NO', timed='NO';
UPDATE performance_schema.setup_instruments SET enabled='YES'
WHERE name LIKE ('statement/%') OR name = 'transaction';
-
+#
## Clear statement and transaction history
CALL test.clear_history();
-
+#
#========================================================================
# STEP 2 - BASIC TRANSACTION
#========================================================================
@@ -62,8 +62,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -79,9 +80,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -100,9 +101,9 @@ thread_id 2 2 transaction COMMITTED READ WRITE REPEATABLE
thread_id 4 4 transaction COMMITTED READ WRITE REPEATABLE READ YES 3 STATEMENT
thread_id 6 6 transaction COMMITTED READ WRITE REPEATABLE READ YES 5 STATEMENT
thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -120,11 +121,11 @@ thread_id 1 2 statement/sql/insert NULL
thread_id 3 4 statement/sql/insert NULL NULL NULL 0 INSERT INTO t1 VALUES (211, "INSERT 211")
thread_id 5 6 statement/sql/insert NULL NULL NULL 0 INSERT INTO t1 VALUES (212, "INSERT 212")
thread_id 7 8 statement/sql/update NULL NULL NULL 0 UPDATE t1 SET s1 = s1 + 1 WHERE s1 = 212
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -154,13 +155,13 @@ thread_id 5 6 statement/sql/insert NULL
thread_id 6 6 transaction 5 STATEMENT <transaction started>
thread_id 7 8 statement/sql/update NULL NULL UPDATE t1 SET s1 = s1 + 1 WHERE s1 = 212
thread_id 8 8 transaction 7 STATEMENT <transaction started>
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
#
# STEP 2.2 - EXPLICIT
#
@@ -184,8 +185,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -201,9 +203,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 2 5 transaction COMMITTED READ WRITE REPEATABLE READ NO 1 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -219,9 +221,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 2 5 transaction COMMITTED READ WRITE REPEATABLE READ NO 1 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -239,11 +241,11 @@ thread_id 1 2 statement/sql/begin NULL
thread_id 3 3 statement/sql/insert NULL 2 TRANSACTION 0 INSERT INTO t1 VALUES (220, "INSERT 220"), (221, "INSERT 221")
thread_id 4 4 statement/sql/update NULL 2 TRANSACTION 0 UPDATE t1 SET s2 = "UPDATE 221" WHERE s1 = 221
thread_id 5 5 statement/sql/commit NULL 2 TRANSACTION 0 COMMIT
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -270,13 +272,13 @@ thread_id 2 5 transaction 1
thread_id 3 3 statement/sql/insert 2 TRANSACTION INSERT INTO t1 VALUES (220, "INSERT 220"), (221, "INSERT 221")
thread_id 4 4 statement/sql/update 2 TRANSACTION UPDATE t1 SET s2 = "UPDATE 221" WHERE s1 = 221
thread_id 5 5 statement/sql/commit 2 TRANSACTION COMMIT
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
#========================================================================
# STEP 3 - TRANSACTIONS AND STORED PROCEDURES
#========================================================================
@@ -285,7 +287,7 @@ DELETE FROM db.t1;
#
connection con1;
CREATE PROCEDURE tp_update() UPDATE t1 SET s1 = s1 + 1;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (310, "INSERT 310");
INSERT INTO t1 VALUES (311, "INSERT 311");
@@ -308,8 +310,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -325,9 +328,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 3 10 transaction COMMITTED READ WRITE REPEATABLE READ NO 2 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -343,9 +346,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 3 10 transaction COMMITTED READ WRITE REPEATABLE READ NO 2 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -368,11 +371,11 @@ thread_id 7 7 statement/sql/insert NULL
thread_id 8 9 statement/sql/call_procedure NULL 3 TRANSACTION 0 CALL tp_update()
thread_id 9 9 statement/sp/stmt tp_update 8 STATEMENT 1 UPDATE t1 SET s1 = s1 + 1
thread_id 10 10 statement/sql/commit NULL 3 TRANSACTION 0 COMMIT
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -404,24 +407,24 @@ thread_id 7 7 statement/sql/insert 3
thread_id 8 9 statement/sql/call_proced 3 TRANSACTION CALL tp_update()
thread_id 9 9 statement/sp/stmt 8 STATEMENT UPDATE t1 SET s1 = s1 + 1
thread_id 10 10 statement/sql/commit 3 TRANSACTION COMMIT
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
#
# STEP 3.2 - TRANSACTION STARTED WITHIN STORED PROCEDURE
#
connection con1;
CREATE PROCEDURE tp_start() START TRANSACTION;
-
+#
CALL tp_start();
INSERT INTO t1 VALUES (320, "INSERT 320"),(321, "INSERT 321");
INSERT INTO t1 VALUES (322, "INSERT 322"),(323, "INSERT 323");
UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320;
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
320 INSERT 320
@@ -444,8 +447,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -461,9 +465,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 4 9 transaction COMMITTED READ WRITE REPEATABLE READ NO 3 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -479,9 +483,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 4 9 transaction COMMITTED READ WRITE REPEATABLE READ NO 3 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -503,11 +507,11 @@ thread_id 6 6 statement/sql/insert NULL
thread_id 7 7 statement/sql/update NULL 4 TRANSACTION 0 UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320
thread_id 8 8 statement/sql/select NULL 4 TRANSACTION 0 SELECT * FROM t1 ORDER BY s1
thread_id 9 9 statement/sql/commit NULL 4 TRANSACTION 0 COMMIT
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -538,37 +542,37 @@ thread_id 6 6 statement/sql/insert 4
thread_id 7 7 statement/sql/update 4 TRANSACTION UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320
thread_id 8 8 statement/sql/select 4 TRANSACTION SELECT * FROM t1 ORDER BY s1
thread_id 9 9 statement/sql/commit 4 TRANSACTION COMMIT
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
#
# STEP 3.3 - TRANSACTION ENDED WITHIN STORED PROCEDURE
#
connection con1;
CREATE PROCEDURE tp_rollback() ROLLBACK;
CREATE PROCEDURE tp_commit() COMMIT;
-
+#
## COMMIT within stored procedure
START TRANSACTION;
INSERT INTO t1 VALUES (330, "INSERT 330"),(331, "INSERT 331");
INSERT INTO t1 VALUES (332, "INSERT 332"),(333, "INSERT 333");
DELETE FROM t1 WHERE s1 > 331;
CALL tp_commit();
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
330 INSERT 330
331 INSERT 331
-
+#
## ROLLBACK within stored procedure
START TRANSACTION;
UPDATE t1 SET s1 = s1*2 WHERE s1 > 331;
CALL tp_rollback();
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
330 INSERT 330
@@ -588,8 +592,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -605,9 +610,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 18 18 transaction COMMITTED READ WRITE REPEATABLE READ YES 17 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -626,9 +631,9 @@ thread_id 4 9 transaction COMMITTED READ WRITE REPEATABLE
thread_id 11 11 transaction COMMITTED READ WRITE REPEATABLE READ YES 10 STATEMENT
thread_id 13 16 transaction ROLLED BACK READ WRITE REPEATABLE READ NO 12 STATEMENT
thread_id 18 18 transaction COMMITTED READ WRITE REPEATABLE READ YES 17 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -656,11 +661,11 @@ thread_id 14 14 statement/sql/update NULL
thread_id 15 16 statement/sql/call_procedure NULL 13 TRANSACTION 0 CALL tp_rollback()
thread_id 16 16 statement/sp/stmt tp_rollback 15 STATEMENT 1 ROLLBACK
thread_id 17 18 statement/sql/select NULL NULL NULL 0 SELECT * FROM t1 ORDER BY s1
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -700,17 +705,17 @@ thread_id 15 16 statement/sql/call_proced 13
thread_id 16 16 statement/sp/stmt 15 STATEMENT ROLLBACK
thread_id 17 18 statement/sql/select NULL NULL SELECT * FROM t1 ORDER BY s1
thread_id 18 18 transaction 17 STATEMENT <transaction started>
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
#========================================================================
# STEP 4 - TRANSACTIONS AND STORED FUNCTIONS
#========================================================================
-
+#
#
# STEP 4.1 - FUNCTION WITHIN A TRANSACTION
#
@@ -720,27 +725,27 @@ BEGIN
INSERT INTO t1 VALUES (x, "INSERT x"),(y, "INSERT y");
RETURN x+y;
END |
-
+#
## Clear history
connection default;
CALL test.clear_history();
connection con1;
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (410, "INSERT 410");
INSERT INTO t1 VALUES (411, "INSERT 411");
INSERT INTO t1 VALUES (412, "INSERT 412");
DELETE FROM t1 WHERE s1 > 410;
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
410 INSERT 410
-
+#
SELECT fn_add(413, 414);
fn_add(413, 414)
827
COMMIT;
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
410 INSERT 410
@@ -761,8 +766,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -778,9 +784,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 13 13 transaction COMMITTED READ WRITE REPEATABLE READ YES 12 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -797,9 +803,9 @@ ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 2 11 transaction COMMITTED READ WRITE REPEATABLE READ NO 1 STATEMENT
thread_id 13 13 transaction COMMITTED READ WRITE REPEATABLE READ YES 12 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -824,11 +830,11 @@ thread_id 9 9 statement/sp/stmt fn_add
thread_id 10 10 statement/sp/freturn fn_add 8 STATEMENT 1 NULL
thread_id 11 11 statement/sql/commit NULL 2 TRANSACTION 0 COMMIT
thread_id 12 13 statement/sql/select NULL NULL NULL 0 SELECT * FROM t1 ORDER BY s1
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -863,24 +869,24 @@ thread_id 10 10 statement/sp/freturn 8
thread_id 11 11 statement/sql/commit 2 TRANSACTION COMMIT
thread_id 12 13 statement/sql/select NULL NULL SELECT * FROM t1 ORDER BY s1
thread_id 13 13 transaction 12 STATEMENT <transaction started>
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
connection con1;
-
+#
## Again, but this time with a rollback
-
+#
START TRANSACTION;
SELECT fn_add(415, 416);
fn_add(415, 416)
831
-
+#
ROLLBACK;
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
connection default;
@@ -898,8 +904,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -915,9 +922,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -934,9 +941,9 @@ ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 2 6 transaction ROLLED BACK READ WRITE REPEATABLE READ NO 1 STATEMENT
thread_id 8 8 transaction COMMITTED READ WRITE REPEATABLE READ YES 7 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -956,11 +963,11 @@ thread_id 4 4 statement/sp/stmt fn_add
thread_id 5 5 statement/sp/freturn fn_add 3 STATEMENT 1 NULL
thread_id 6 6 statement/sql/rollback NULL 2 TRANSACTION 0 ROLLBACK
thread_id 7 8 statement/sql/select NULL NULL NULL 0 SELECT * FROM t1 ORDER BY s1
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -990,67 +997,67 @@ thread_id 5 5 statement/sp/freturn 3
thread_id 6 6 statement/sql/rollback 2 TRANSACTION ROLLBACK
thread_id 7 8 statement/sql/select NULL NULL SELECT * FROM t1 ORDER BY s1
thread_id 8 8 transaction 7 STATEMENT <transaction started>
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
#
# STEP 4.2 - TRANSACTION CANNOT BE STARTED OR ENDED WITHIN FUNCTION
#
connection con1;
CREATE FUNCTION fn_err1() RETURNS VARCHAR(10) BEGIN START TRANSACTION ; RETURN 'invalid' ; END|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
-
+#
## Expect 0 transactions
connection default;
SELECT COUNT(*) FROM performance_schema.events_transactions_history;
COUNT(*)
0
connection con1;
-
+#
## Expect stored function does not exist
-
+#
SELECT fn_err1();
ERROR 42000: FUNCTION db.fn_err1 does not exist
-
+#
## Expect 0 transactions
connection default;
SELECT COUNT(*) FROM performance_schema.events_transactions_history;
COUNT(*)
0
connection con1;
-
+#
CREATE FUNCTION fn_err2() RETURNS VARCHAR(10) BEGIN COMMIT; RETURN 'invalid' ; END|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
-
+#
## Expect stored function does not exist
-
+#
START TRANSACTION;
DELETE FROM t1 WHERE s1 > 320;
SELECT fn_err2();
ERROR 42000: FUNCTION db.fn_err2 does not exist
-
+#
## Expect 0 transactions
connection default;
SELECT COUNT(*) FROM performance_schema.events_transactions_history;
COUNT(*)
0
-
+#
## Clear transaction and statement tables
CALL test.clear_history();
#========================================================================
# STEP 5 - TRANSACTIONS AND TRIGGERS
#========================================================================
-
+#
#
# STEP 5.1 - FORCE STATEMENT ROLLBACK FROM TRIGGER
#
connection con1;
## Create a trigger to force statement rollback
-
+#
CREATE TRIGGER trigger_before_update BEFORE UPDATE ON t1
FOR EACH ROW
BEGIN
@@ -1058,15 +1065,15 @@ IF OLD.s1 >= 505 THEN
SIGNAL sqlstate '45001' SET message_text = "FORCE ERROR";
END IF;
END;|
-
+#
## Clear history
connection default;
CALL test.clear_history();
connection con1;
-
+#
## Insert multiple rows, then update. Trigger will force rollback the
## UPDATE statement, but the transaction should not roll back.
-
+#
START TRANSACTION;
INSERT INTO t1 VALUES (500, "INSERT 500");
INSERT INTO t1 VALUES (501, "INSERT 501");
@@ -1074,7 +1081,7 @@ INSERT INTO t1 VALUES (502, "INSERT 502");
INSERT INTO t1 VALUES (503, "INSERT 503");
INSERT INTO t1 VALUES (504, "INSERT 504");
INSERT INTO t1 VALUES (505, "INSERT 505");
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
500 INSERT 500
@@ -1083,14 +1090,14 @@ s1 s2
503 INSERT 503
504 INSERT 504
505 INSERT 505
-
+#
## Expect error when UPDATE hits record 505
-
+#
UPDATE t1 SET s1 = s1 * 2 WHERE s1 >= 500;
ERROR 45001: FORCE ERROR
-
+#
## Verify that INSERT succeeded, UPDATE failed and transaction did not rollback
-
+#
SELECT * FROM t1 ORDER BY s1;
s1 s2
500 INSERT 500
@@ -1100,7 +1107,7 @@ s1 s2
504 INSERT 504
505 INSERT 505
COMMIT;
-
+#
DROP TRIGGER trigger_before_update;
connection default;
#========================================================================
@@ -1117,8 +1124,9 @@ select if(@base_tx_event_id < @base_stmt_event_id,
@base_tx_event_id - 1,
@base_stmt_event_id - 1)
into @base_event_id;
-EVENTS_TRANSACTIONS_CURRENT
-
+#
+# EVENTS_TRANSACTIONS_CURRENT
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -1134,9 +1142,9 @@ WHERE ((THREAD_ID = @con1_thread_id) OR (@all_threads = 1))
ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 21 21 transaction COMMITTED READ WRITE REPEATABLE READ YES 20 STATEMENT
-
-EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+# EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -1153,9 +1161,9 @@ ORDER BY thread_id, event_id;
THREAD_ID R_EVENT_ID R_END_EVENT_ID EVENT_NAME STATE ACCESS_MODE ISOLATION_LEVEL AUTO R_NESTING_EVENT_ID NESTING_EVENT_TYPE
thread_id 2 19 transaction COMMITTED READ WRITE REPEATABLE READ NO 1 STATEMENT
thread_id 21 21 transaction COMMITTED READ WRITE REPEATABLE READ YES 20 STATEMENT
-
-EVENTS_STATEMENTS_HISTORY_LONG
-
+#
+# EVENTS_STATEMENTS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -1188,11 +1196,11 @@ thread_id 17 17 statement/sp/stmt trigger_befo
thread_id 18 18 statement/sql/select NULL 2 TRANSACTION 0 SELECT * FROM t1 ORDER BY s1
thread_id 19 19 statement/sql/commit NULL 2 TRANSACTION 0 COMMIT
thread_id 20 21 statement/sql/drop_trigger NULL NULL NULL 0 DROP TRIGGER trigger_before_update
-
-## Combined statement and transaction event history ordered by event id
-
-EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
-
+#
+### Combined statement and transaction event history ordered by event id
+#
+#EVENTS_STATEMENTS_HISTORY_LONG + EVENTS_TRANSACTIONS_HISTORY_LONG
+#
SELECT THREAD_ID,
LPAD(EVENT_ID - @base_event_id, 11, ' ') as R_EVENT_ID,
LPAD(END_EVENT_ID - @base_event_id, 11, ' ') as R_END_EVENT_ID,
@@ -1235,13 +1243,13 @@ thread_id 18 18 statement/sql/select 2
thread_id 19 19 statement/sql/commit 2 TRANSACTION COMMIT
thread_id 20 21 statement/sql/drop_trigge NULL NULL DROP TRIGGER trigger_before_update
thread_id 21 21 transaction 20 STATEMENT <transaction started>
-
-## Clear statement and transaction history
-CALL test.clear_history();
+#
+### Clear statement and transaction history
+# CALL test.clear_history();
CALL test.clear_history();
## Reset db.t1
DELETE FROM db.t1;
-
+#
# TODO: Detect statement events from scheduled event
#=======================================================================
# Cleanup
diff --git a/mysql-test/suite/perfschema/t/alter_table_progress.test b/mysql-test/suite/perfschema/t/alter_table_progress.test
index fbaf1281a30..d0a4055ad0e 100644
--- a/mysql-test/suite/perfschema/t/alter_table_progress.test
+++ b/mysql-test/suite/perfschema/t/alter_table_progress.test
@@ -120,7 +120,7 @@ select "After payload";
--connection default
---echo Dumping ALTER TABLE stages
+--echo # Dumping ALTER TABLE stages
# Print all stages for this ALTER TABLE statement
select EVENT_NAME, WORK_COMPLETED, WORK_ESTIMATED
diff --git a/mysql-test/suite/perfschema/t/connection_type_notwin.test b/mysql-test/suite/perfschema/t/connection_type_notwin.test
index 800fdb7ad51..07028e1fb81 100644
--- a/mysql-test/suite/perfschema/t/connection_type_notwin.test
+++ b/mysql-test/suite/perfschema/t/connection_type_notwin.test
@@ -4,7 +4,7 @@
--source include/have_debug.inc
--source include/have_perfschema.inc
---echo "Default connection"
+--echo # Default connection
--vertical_results
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
@@ -35,8 +35,6 @@ SET GLOBAL general_log= 'ON';
connect(con1, localhost, root,,);
---echo "Connection con1"
-
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -45,8 +43,6 @@ select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
connect(con2, "127.0.0.1", root,,test,$MASTER_MYPORT,);
---echo "Connection con2"
-
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -55,8 +51,6 @@ select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
connect(con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL);
---echo "Connection con3"
-
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
diff --git a/mysql-test/suite/perfschema/t/connection_type_win.test b/mysql-test/suite/perfschema/t/connection_type_win.test
index fa09fc7fe57..2beccdbc5e5 100644
--- a/mysql-test/suite/perfschema/t/connection_type_win.test
+++ b/mysql-test/suite/perfschema/t/connection_type_win.test
@@ -4,7 +4,7 @@
--source include/have_debug.inc
--source include/have_perfschema.inc
---echo "Default connection"
+--echo # Default connection
--vertical_results
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
@@ -34,8 +34,6 @@ SET GLOBAL general_log= 'ON';
connect(con1, localhost, root,,);
---echo "Connection con1"
-
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -44,8 +42,6 @@ select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
connect(con2, "127.0.0.1", root,,test,$MASTER_MYPORT,);
---echo "Connection con2"
-
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
@@ -54,8 +50,6 @@ select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
connect(con3, "127.0.0.1", rootssl,,test,$MASTER_MYPORT,,SSL);
---echo "Connection con3"
-
select NAME, PROCESSLIST_USER, PROCESSLIST_HOST, CONNECTION_TYPE
from performance_schema.threads
where PROCESSLIST_ID = connection_id();
diff --git a/mysql-test/suite/perfschema/t/dml_handler.test b/mysql-test/suite/perfschema/t/dml_handler.test
index f12cc82f22f..16810fcba82 100644
--- a/mysql-test/suite/perfschema/t/dml_handler.test
+++ b/mysql-test/suite/perfschema/t/dml_handler.test
@@ -12,9 +12,9 @@
# which should return error 1031, "Table storage engine for '<table name>'
# doesn't have this option."
#
---echo
+--echo #
--echo # Create a temporary table of performance schema table names
---echo
+--echo #
CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
@@ -25,10 +25,10 @@ SELECT COUNT(*) FROM table_list INTO @table_count;
let $count=`SELECT @table_count`;
---echo
+--echo #
--echo # For each table in the performance schema, attempt HANDLER...OPEN,
--echo # which should fail with an error 1031, ER_ILLEGAL_HA.
---echo
+--echo #
while ($count > 0)
{
diff --git a/mysql-test/suite/perfschema/t/dml_setup_instruments.test b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
index 0a8fba62d32..9d178ef201c 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_instruments.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_instruments.test
@@ -90,10 +90,10 @@ UNLOCK TABLES;
LOCK TABLES performance_schema.setup_instruments WRITE;
UNLOCK TABLES;
---echo
+--echo #
--echo # Bug#13813193 ASSERTION `TABLE->READ_SET ==
--echo # &TABLE->DEF_READ_SET' FAILED / MYSQL_UPDATE
---echo
+--echo #
UPDATE performance_schema.setup_instruments SET timed='NO'
ORDER BY RAND();
diff --git a/mysql-test/suite/perfschema/t/io_cache.test b/mysql-test/suite/perfschema/t/io_cache.test
index 9da633a5414..201d042530d 100644
--- a/mysql-test/suite/perfschema/t/io_cache.test
+++ b/mysql-test/suite/perfschema/t/io_cache.test
@@ -11,9 +11,9 @@
--source include/not_embedded.inc
--source include/no_protocol.inc
---echo
+--echo #
--echo ## Connection default
---echo
+--echo #
--connection default
--disable_warnings
USE test;
@@ -23,9 +23,9 @@ SELECT @@global.binlog_cache_size;
SELECT @@global.binlog_stmt_cache_size;
SELECT * FROM performance_schema.setup_instruments WHERE name LIKE "%file/sql/io_cache%";
---echo
+--echo #
--echo ## Connection con1
---echo
+--echo #
connect(con1, localhost, root,,);
USE test;
CREATE TABLE t1 (s1 INT, s2 VARCHAR(4096));
@@ -103,9 +103,9 @@ COMMIT;
SELECT COUNT(*) FROM t1;
--disconnect con1
---echo
+--echo #
--echo ## Connection default
---echo
+--echo #
--connection default
SELECT COUNT(*) FROM test.t1;
diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test
index b30722743b3..38972f42cef 100644
--- a/mysql-test/suite/perfschema/t/misc.test
+++ b/mysql-test/suite/perfschema/t/misc.test
@@ -204,7 +204,7 @@ select * from t1;
select mysql_errno, returned_sqlstate, message_text, errors, warnings
from performance_schema.events_statements_history where errors > 0;
---echo
+--echo #
select mysql_errno, returned_sqlstate, message_text, errors, warnings from
performance_schema.events_statements_history_long where errors > 0;
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_event.test b/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
index f16a073f212..809e5e05827 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_event.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with EVENT performance_schema.user_event"
+--echo # Testing mysql_upgrade with EVENT performance_schema.user_event
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_func.test b/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
index da2bc371308..8f3a1c0ea26 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_func.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func"
+--echo # Testing mysql_upgrade with FUNCTION performance_schema.user_func
create function test.user_func() returns integer
return 0;
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test b/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
index 99e0816ccbd..692507348e8 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_proc.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
+--echo # Testing mysql_upgrade with PROCEDURE performance_schema.user_proc
create procedure test.user_proc()
select "Not supposed to be here";
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_table.test b/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
index 897ec23c552..8c69f0055f2 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_table.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
+--echo # Testing mysql_upgrade with TABLE performance_schema.user_table
create table test.user_table(a int);
diff --git a/mysql-test/suite/perfschema/t/pfs_upgrade_view.test b/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
index 0c9af73a1d4..57a7cad2ac6 100644
--- a/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
+++ b/mysql-test/suite/perfschema/t/pfs_upgrade_view.test
@@ -9,7 +9,7 @@
let $MYSQLD_DATADIR= `SELECT @@datadir`;
---echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
+--echo # Testing mysql_upgrade with VIEW performance_schema.user_view
create view test.user_view as select "Not supposed to be here";
diff --git a/mysql-test/suite/perfschema/t/rpl_statements.test b/mysql-test/suite/perfschema/t/rpl_statements.test
index dd9d2bd1c89..c97cd61941c 100644
--- a/mysql-test/suite/perfschema/t/rpl_statements.test
+++ b/mysql-test/suite/perfschema/t/rpl_statements.test
@@ -49,16 +49,16 @@ let $column_list=
# Define instrument name for enable/disable instruments
let $pfs_instrument='%statement/%';
---echo
+--echo #
--echo #
--echo # STEP 1 - CREATE AND REPLICATE TEST TABLES
--echo #
connection master;
---echo
---echo *** Create test tables
---echo
+--echo #
+--echo # *** Create test tables
+--echo #
show global variables like 'binlog_format%';
@@ -72,26 +72,26 @@ create table test.marker(s1 int) engine=innodb;
sync_slave_with_master;
---echo
---echo *** Clear statement events
+--echo #
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo
+--echo #
--echo #
--echo # STEP 2 - REPLICATE ONE ROW ON MASTER TO GET REPLICATION THREAD ID ON SLAVE
--echo #
connection master;
---echo
+--echo #
insert into test.marker values (0);
---echo
+--echo #
sync_slave_with_master;
---echo
---echo *** Verify row, get replication thread id, clear statement events
---echo
+--echo #
+--echo # *** Verify row, get replication thread id, clear statement events
+--echo #
# TODO: Get slave thread id from threads using thread/sql/slave_sql event name
@@ -99,82 +99,82 @@ select thread_id into @slave_thread_id from performance_schema.events_statements
where sql_text like '%marker%';
let $slave_thread_id= `select @slave_thread_id`;
---echo *** Verify row inserted on master was replicated
+--echo # *** Verify row inserted on master was replicated
select count(*) = 1 as 'Expect 1' from test.marker;
---echo *** Clear statement events
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo
+--echo #
--echo #
--echo # STEP 3 - PERFORM DML STATEMENTS ON MASTER
--echo #
connection master;
---echo
+--echo #
show global variables like 'binlog_format%';
---echo *** Clear statement events
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo
---echo *** Create/drop table, create/drop database
---echo
+--echo #
+--echo # *** Create/drop table, create/drop database
+--echo #
create database marker1_db;
create database marker2_db;
create table marker1_db.table1 (s1 int) engine=innodb;
create table marker2_db.table1 (s1 int) engine=innodb;
create table marker2_db.table2 (s1 int) engine=innodb;
---echo
---echo *** Transaction
+--echo #
+--echo # *** Transaction
start transaction;
insert into marker1_db.table1 values (1), (2), (3);
insert into marker2_db.table1 values (1), (2), (3);
commit;
---echo
---echo *** Alter
+--echo #
+--echo # *** Alter
alter table marker1_db.table1 add column (s2 varchar(32));
---echo
---echo *** Insert, Update
+--echo #
+--echo # *** Insert, Update
start transaction;
insert into marker1_db.table1 values (4, 'four'), (5, 'five'), (6, 'six');
update marker1_db.table1 set s1 = s1 + 1;
commit;
---echo
---echo *** Rollback
+--echo #
+--echo # *** Rollback
start transaction;
insert into marker1_db.table1 values (7, 'seven'), (8, 'eight'), (9, 'nine');
rollback;
---echo
---echo *** Autocommit, Delete, Drop
+--echo #
+--echo # *** Autocommit, Delete, Drop
delete from marker1_db.table1 where s1 > 4;
drop table marker2_db.table1;
drop database marker2_db;
--source ../include/disable_instruments.inc
---echo
---echo *** Examine statements events that will be compared on the slave
---echo
+--echo #
+--echo # *** Examine statements events that will be compared on the slave
+--echo #
--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
eval select $column_list from performance_schema.events_statements_history_long
where sql_text like '%marker%' order by event_id;
---echo
+--echo #
--echo #
--echo # STEP 4 - REPLICATE STATEMENT EVENTS ON MASTER TO SLAVE
--echo #
---echo
---echo *** Store statement events in holding table, then replicate
---echo
+--echo #
+--echo # *** Store statement events in holding table, then replicate
+--echo #
--source ../include/disable_instruments.inc
@@ -189,7 +189,7 @@ create table test.master_events_statements_history_long as
--source ../include/enable_instruments.inc
---echo
+--echo #
--echo #
--echo # STEP 5 - VERIFY DML AND DDL STATEMENT EVENTS ON SLAVE
--echo #
@@ -198,24 +198,24 @@ sync_slave_with_master;
--source ../include/disable_instruments.inc
---echo
---echo *** List statement events from master
---echo
+--echo #
+--echo # *** List statement events from master
+--echo #
--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
eval select $column_list from master_events_statements_history_long order by event_id;
---echo
---echo *** List statement events on slave
---echo
+--echo #
+--echo # *** List statement events on slave
+--echo #
--replace_column 1 [THREAD_ID] 2 [EVENT_ID]
eval select $column_list from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id and sql_text like '%marker%' order by event_id;
---echo
---echo *** Compare master and slave events
---echo
+--echo #
+--echo # *** Compare master and slave events
+--echo #
# Note: The statement digest provides a more robust comparison than the
# event name. However, in some cases, e.g. DROP TABLE, the server generates
@@ -224,7 +224,7 @@ eval select $column_list from performance_schema.events_statements_history_long
# statements, so we use both methods to ensure coverage.
--echo
---echo *** Event name comparison - expect 0 mismatches
+--echo # *** Event name comparison - expect 0 mismatches
--echo
select thread_id, event_id, event_name, digest_text, sql_text from performance_schema.events_statements_history_long t1
@@ -233,7 +233,7 @@ select thread_id, event_id, event_name, digest_text, sql_text from performance_s
not exists (select * from master_events_statements_history_long t2 where t2.event_name = t1.event_name);
--echo
---echo *** Statement digest comparison - expect 1 mismatch for DROP TABLE
+--echo # *** Statement digest comparison - expect 1 mismatch for DROP TABLE
--echo
--replace_column 1 [THREAD_ID] 2 [EVENT_ID] 4 [DIGEST]
@@ -243,7 +243,7 @@ select thread_id, event_id, event_name, digest, digest_text, sql_text from perfo
sql_text like '%marker%' and
not exists (select * from master_events_statements_history_long t2 where t2.digest = t1.digest);
---echo
+--echo #
--echo #
--echo # STEP 6 - DISABLE REPLICATED STATEMENT EVENTS ON SLAVE
--echo #
@@ -255,49 +255,49 @@ update performance_schema.setup_instruments set enabled='no', timed='no'
select * from performance_schema.setup_instruments where name like '%statement/abstract/relay_log%';
---echo
+--echo #
--echo #
--echo # STEP 7 - UPDATE TABLES ON MASTER, REPLICATE
--echo #
connection master;
---echo
---echo *** Clear statement events
+--echo #
+--echo # *** Clear statement events
--source ../include/rpl_statements_truncate.inc
---echo *** Update some tables, then replicate
---echo
+--echo # *** Update some tables, then replicate
+--echo #
insert into marker1_db.table1 values (999, '999'), (998, '998'), (997, '997');
---echo
+--echo #
--echo #
--echo # STEP 8 - VERIFY TABLE UPDATES FROM MASTER, EXPECT NO STATEMENT EVENTS ON SLAVE
--echo #
sync_slave_with_master;
---echo
---echo *** Confirm rows were replicated
---echo
+--echo #
+--echo # *** Confirm rows were replicated
+--echo #
select * from marker1_db.table1 where s1 > 900 order by s1;
---echo
---echo *** Confirm that are no statements events from the replication thread
---echo
+--echo #
+--echo # *** Confirm that are no statements events from the replication thread
+--echo #
select * from performance_schema.events_statements_history_long
where thread_id = @slave_thread_id;
--source ../include/enable_instruments.inc
---echo
+--echo #
--echo #
--echo # STEP 9 - CLEAN UP
--echo #
---echo
+--echo #
--disable_query_log
--disable_warnings
diff --git a/mysql-test/suite/perfschema/t/show_aggregate.test b/mysql-test/suite/perfschema/t/show_aggregate.test
index 788979dc0f0..3f01de15b01 100644
--- a/mysql-test/suite/perfschema/t/show_aggregate.test
+++ b/mysql-test/suite/perfschema/t/show_aggregate.test
@@ -16,12 +16,12 @@
--enable_connect_log
---echo
---echo ================================================================================
---echo SETUP
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # SETUP
+--echo # ================================================================================
SET @@session.sql_log_bin=OFF;
---echo
+--echo #
--echo # CREATE 3 CLIENTS, 3 CONNECTIONS, RESULTS TABLE
connection default;
USE test;
@@ -31,7 +31,7 @@ USE test;
flush status;
--enable_query_log
---echo
+--echo #
--echo # Create results table
CREATE TABLE test.status_results
(variable_name VARCHAR(64), start INT DEFAULT 0, stop INT DEFAULT 0, delta INT DEFAULT 0,
@@ -50,7 +50,7 @@ CREATE TABLE t1 (s1 int) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2), (2), (3), (3), (3);
CREATE TABLE t2 (s1 int) ENGINE=InnoDB;
CREATE TABLE t3 (s1 int) ENGINE=InnoDB;
---echo
+--echo #
set @orig_sql_mode= @@sql_mode;
set sql_mode= (select replace(@@sql_mode,'NO_AUTO_CREATE_USER',''));
GRANT ALL ON *.* to 'user1'@localhost;
@@ -58,10 +58,10 @@ GRANT ALL ON *.* to 'user2'@localhost;
GRANT ALL ON *.* to 'user3'@localhost;
set sql_mode= @orig_sql_mode;
---echo
---echo ================================================================================
---echo CONNECTION 1: DELETE 1, ROLLBACK x 1
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION 1: DELETE 1, ROLLBACK x 1
+--echo # ================================================================================
connect(con1, localhost, user1,,);
SET @@session.sql_log_bin=OFF;
DELETE FROM t1 WHERE s1 = 1;
@@ -69,46 +69,46 @@ START TRANSACTION;
INSERT INTO t1 VALUES (1);
ROLLBACK;
---echo
---echo ================================================================================
---echo CONNECTION 2: DELETE 2, ROLLBACK x 2
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION 2: DELETE 2, ROLLBACK x 2
+--echo # ================================================================================
connect(con2, localhost, user2,,);
SET @@session.sql_log_bin=OFF;
DELETE FROM t1 WHERE s1 = 2;
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (2);
ROLLBACK;
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (2);
ROLLBACK;
---echo
---echo ================================================================================
---echo CONNECTION 3: DELETE 3, ROLLBACK x 3
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION 3: DELETE 3, ROLLBACK x 3
+--echo # ================================================================================
connect(con3, localhost, user3,,);
SET @@session.sql_log_bin=OFF;
DELETE FROM t1 WHERE s1 = 3;
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (3);
ROLLBACK;
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (3);
ROLLBACK;
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (3);
ROLLBACK;
---echo
---echo ================================================================================
---echo CONNECTION DEFAULT: Gather results, compare session and global status counts
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CONNECTION DEFAULT: Gather results, compare session and global status counts
+--echo # ================================================================================
connection default;
--echo # Get thread ids for each connection.
USE performance_schema;
@@ -122,10 +122,10 @@ SELECT thread_id INTO @con3_id FROM threads WHERE processlist_user IN ('user3');
#USE test;
#SELECT * FROM test.status_results;
---echo
---echo ================================================================================
---echo TEST 1: STATUS_BY_THREAD: Verify expected status counts per thread (1,2,3)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 1: STATUS_BY_THREAD: Verify expected status counts per thread (1,2,3)
+--echo # ================================================================================
--echo #
--echo # Review per-thread status counts
--echo #
@@ -138,10 +138,10 @@ SELECT * FROM status_by_thread WHERE thread_id IN (@con1_id, @con2_id, @con3_id)
--echo #
--replace_column 1 connect_1
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete');
---echo
+--echo #
--replace_column 1 connnect_2
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete');
---echo
+--echo #
--replace_column 1 connnect_3
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete');
@@ -152,14 +152,14 @@ SELECT variable_name, t1, t2, t3, delta, thread, IF(thread=delta,'OK','ERROR') E
FROM test.status_results
ORDER BY variable_name;
---echo
---echo ================================================================================
---echo TEST 2: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 2: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+--echo # ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
--echo #
@@ -169,14 +169,14 @@ SELECT variable_name, u1, u2, u3, delta, user, IF(user=delta,'OK','ERROR') Expec
FROM test.status_results
ORDER BY variable_name;
---echo
---echo ================================================================================
---echo TEST 3: STATUS_BY_ACCOUNT: Verify expected status counts per user, host (1,2,3)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 3: STATUS_BY_ACCOUNT: Verify expected status counts per user, host (1,2,3)
+--echo # ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
--echo #
@@ -186,9 +186,9 @@ SELECT variable_name, a1, a2, a3, delta, acct, IF(acct=delta,'OK','ERROR') Expec
FROM test.status_results
ORDER BY variable_name;
---echo ================================================================================
---echo TEST 4: STATUS_BY_HOST: Verify expected status counts per host (6)
---echo ================================================================================
+--echo # ================================================================================
+--echo # TEST 4: STATUS_BY_HOST: Verify expected status counts per host (6)
+--echo # ================================================================================
SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
--echo #
@@ -201,17 +201,17 @@ SELECT variable_name, h1, h2, h3, delta, host, IF(host=delta,'OK','ERROR') Expec
FROM test.status_results
ORDER BY variable_name;
---echo
---echo ================================================================================
---echo DISCONNECT ALL USERS AND RUN THE TESTS AGAIN. RESULTS SHOULD NOT CHANGE.
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # DISCONNECT ALL USERS AND RUN THE TESTS AGAIN. RESULTS SHOULD NOT CHANGE.
+--echo # ================================================================================
connection default;
disconnect con1;
disconnect con2;
disconnect con3;
---echo
+--echo #
USE test;
---echo
+--echo #
--echo # Clear results table, leave initial global_status counts
UPDATE test.status_results
SET stop=0, delta=0,
@@ -222,22 +222,22 @@ UPDATE test.status_results
#--echo DEBUG
#SELECT * FROM test.status_results;
---echo
+--echo #
--source ../include/show_aggregate.inc
USE performance_schema;
---echo
---echo ================================================================================
---echo TEST X: STATUS_BY_THREAD: Connections are gone--nothing to verify.
---echo ================================================================================
---echo
---echo ================================================================================
---echo TEST 5: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST X: STATUS_BY_THREAD: Connections are gone--nothing to verify.
+--echo # ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5: STATUS_BY_USER: Verify expected status counts per user (1,2,3)
+--echo # ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user1') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user2') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_user WHERE user IN ('user3') AND variable_name IN ('handler_delete');
--echo #
@@ -247,14 +247,14 @@ SELECT variable_name, u1, u2, u3, delta, user, IF(user=delta,'OK','ERROR') Expec
FROM test.status_results
ORDER BY variable_name;
---echo
---echo ================================================================================
---echo TEST 6: STATUS_BY_ACCOUNT: Verify expected status counts per user:host (1,2,3)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 6: STATUS_BY_ACCOUNT: Verify expected status counts per user:host (1,2,3)
+--echo # ================================================================================
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user1') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user2') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_account WHERE user IN ('user3') AND variable_name IN ('handler_delete');
--echo #
@@ -264,9 +264,9 @@ SELECT variable_name, a1, a2, a3, delta, acct, IF(acct=delta,'OK','ERROR') Expec
FROM test.status_results
ORDER BY variable_name;
---echo ================================================================================
---echo TEST 7: STATUS_BY_HOST: Verify expected status counts per host (6)
---echo ================================================================================
+--echo # ================================================================================
+--echo # TEST 7: STATUS_BY_HOST: Verify expected status counts per host (6)
+--echo # ================================================================================
SELECT *, IF (variable_value = 6,'OK','ERROR') AS Expected FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
--echo #
@@ -280,22 +280,22 @@ FROM test.status_results
ORDER BY variable_name;
---echo ================================================================================
---echo TEST 8: FLUSH STATUS should clear account, host and user status
---echo ================================================================================
---echo
+--echo # ================================================================================
+--echo # TEST 8: FLUSH STATUS should clear account, host and user status
+--echo # ================================================================================
+--echo #
FLUSH STATUS;
---echo
+--echo #
SELECT * FROM status_by_account WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT * FROM status_by_host WHERE host IN ('localhost') AND variable_name IN ('handler_delete');
---echo
+--echo #
SELECT * FROM status_by_user WHERE user IN ('user1', 'user2', 'user3') AND variable_name IN ('handler_delete');
---echo ================================================================================
---echo CLEANUP
---echo ================================================================================
+--echo # ================================================================================
+--echo # CLEANUP
+--echo # ================================================================================
DROP TABLE test.t1;
DROP TABLE test.t2;
DROP TABLE test.t3;
@@ -303,4 +303,4 @@ DROP TABLE test.status_results;
DROP USER 'user1'@localhost;
DROP USER 'user2'@localhost;
DROP USER 'user3'@localhost;
---echo
+--echo #
diff --git a/mysql-test/suite/perfschema/t/show_coverage.test b/mysql-test/suite/perfschema/t/show_coverage.test
index 31a24de7b6e..6a8d90d6058 100644
--- a/mysql-test/suite/perfschema/t/show_coverage.test
+++ b/mysql-test/suite/perfschema/t/show_coverage.test
@@ -9,23 +9,23 @@
--source include/no_protocol.inc
--source include/count_sessions.inc
---echo
+--echo #
--echo # TEST 1
--echo # Handling of SHOW STATUS/VARIABLES ... WHERE
--echo #
SHOW STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
--echo # TEST 2
--echo # CREATE..SELECT -- Expect correct ER_WARN_DEPRECATED_SYNTAX
--echo #
@@ -33,7 +33,7 @@ USE test;
CREATE TABLE t0 SELECT * FROM information_schema.global_status WHERE variable_name = 'COM_SELECT';
DROP TABLE t0;
---echo
+--echo #
--echo # TEST 3
--echo # Select status and system variable tables using ORDER BY to exercise the
--echo # rnd_pos() method
@@ -51,33 +51,33 @@ select * from status_by_host order by variable_name;
select * from status_by_account order by variable_name;
--enable_result_log
---echo
+--echo #
--echo # TEST 4
--echo # Handling of SHOW STATUS/VARIABLES ... WHERE
--echo #
SHOW STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
--echo # TEST 5
--echo # Confirm FLUSH STATUS resets counters for all threads.
--echo #
---echo
+--echo #
--echo # Create a new connection
--connect(con1, localhost, root,,)
---echo
+--echo #
--echo # Record thread id
let $thread_id= `SELECT THREAD_ID FROM performance_schema.threads WHERE PROCESSLIST_ID = CONNECTION_ID()`;
---echo
+--echo #
--echo # Increase bytes_received for new connection
USE test;
SHOW TABLES;
@@ -87,21 +87,21 @@ USE performance_schema;
eval SELECT $thread_id INTO @thread_id;
--enable_query_log
---echo
+--echo #
--echo # Record bytes_received for other connection
SELECT variable_value FROM status_by_thread
WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_before;
---echo
+--echo #
--echo # Reset status counters
FLUSH STATUS;
---echo
+--echo #
--echo # Record bytes_received after reset
SELECT variable_value FROM status_by_thread
WHERE variable_name = "bytes_received" and thread_id = @thread_id INTO @bytes_after;
---echo
+--echo #
--echo # Expect bytes_before > bytes_after
SELECT @bytes_before > @bytes_after AS 'Expect 1';
---echo
+--echo #
--echo # Expect bytes_after is zero
SELECT @bytes_after AS 'Expect 0';
@@ -109,19 +109,19 @@ disconnect con1;
--source include/wait_until_count_sessions.inc
---echo
+--echo #
--echo # TEST 6
--echo #
--echo # Bug#28291258 FLUSH STATUS ADDS TWICE TO GLOBAL VALUES
--echo #
---echo
+--echo #
--echo # Default connection
--let $initial_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
--source include/count_sessions.inc
---echo
+--echo #
--echo # First connection
--connect (con1, localhost, root,,)
@@ -131,13 +131,13 @@ disconnect con1;
--let $assert_text = Global value requested from the first session must not change
--source include/assert.inc
---echo
+--echo #
--echo # Generate a slow query
---echo
+--echo #
SET long_query_time = 2;
SELECT SLEEP(4);
SET long_query_time = @@global.long_query_time;
---echo
+--echo #
## Global value requested from the first session after SLEEP() must increase by 1
--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
@@ -153,7 +153,7 @@ SET long_query_time = @@global.long_query_time;
--disconnect con1
--source include/wait_until_count_sessions.inc
---echo
+--echo #
--echo # Default connection
--connection default
@@ -169,9 +169,9 @@ SET long_query_time = @@global.long_query_time;
--let $assert_text = Default session value must remain zero
--source include/assert.inc
---echo
+--echo #
FLUSH STATUS;
---echo
+--echo #
## Global value requested from the default session after FLUSH must remain the same
--let $current_global_value = query_get_value(SHOW GLOBAL STATUS LIKE 'Slow_queries', Value, 1)
diff --git a/mysql-test/suite/perfschema/t/show_misc.test b/mysql-test/suite/perfschema/t/show_misc.test
index 65241ab1c75..e557ef31e94 100644
--- a/mysql-test/suite/perfschema/t/show_misc.test
+++ b/mysql-test/suite/perfschema/t/show_misc.test
@@ -10,55 +10,55 @@ SHOW STATUS LIKE 'Last_query_cost';
flush status;
SHOW STATUS LIKE 'Created_tmp_tables';
---echo
---echo ================================================================================
---echo Bug#21789221 SHOW STATUS FAILS WITH LOCK TABLES AND SHOW_COMPATIBILITY_56=OFF
---echo ================================================================================
---echo Verify that SHOW STATUS and SHOW VARIABLES works under LOCK TABLES mode
---echo
+--echo #
+--echo # ================================================================================
+--echo # Bug#21789221 SHOW STATUS FAILS WITH LOCK TABLES AND SHOW_COMPATIBILITY_56=OFF
+--echo # ================================================================================
+--echo # Verify that SHOW STATUS and SHOW VARIABLES works under LOCK TABLES mode
+--echo #
CREATE TABLE test.t1 (s1 INT);
LOCK TABLE test.t1 READ;
---echo
+--echo #
SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
UNLOCK TABLES;
---echo
+--echo #
LOCK TABLE test.t1 WRITE;
---echo
+--echo #
SHOW GLOBAL STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION STATUS WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW GLOBAL VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
SHOW SESSION VARIABLES WHERE VARIABLE_NAME LIKE "foo";
---echo
+--echo #
UNLOCK TABLES;
DROP TABLE test.t1;
---echo
---echo ================================================================================
---echo Bug#28515475 BOGUS DATA WHEN ORDERING RESULTS FROM VARIABLES_BY_THREAD
---echo ================================================================================
---echo Verify the results from "WHERE variable_name IN(...)", particularly for those
---echo variables that are listed after the deprecated variable gtid_executed.
---echo The ORDER BY also forces an additional code path through rnd_pos().
---echo
+--echo #
+--echo # ================================================================================
+--echo # Bug#28515475 BOGUS DATA WHEN ORDERING RESULTS FROM VARIABLES_BY_THREAD
+--echo # ================================================================================
+--echo # Verify the results from "WHERE variable_name IN(...)", particularly for those
+--echo # variables that are listed after the deprecated variable gtid_executed.
+--echo # The ORDER BY also forces an additional code path through rnd_pos().
+--echo #
SELECT variable_name FROM performance_schema.variables_by_thread
WHERE variable_name IN ('interactive_timeout','net_read_timeout','net_write_timeout','wait_timeout')
ORDER BY variable_name;
---echo
---echo ================================================================================
---echo CLEAN UP
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CLEAN UP
+--echo # ================================================================================
diff --git a/mysql-test/suite/perfschema/t/show_plugin.test b/mysql-test/suite/perfschema/t/show_plugin.test
index 53ef699468c..7109c3140c6 100644
--- a/mysql-test/suite/perfschema/t/show_plugin.test
+++ b/mysql-test/suite/perfschema/t/show_plugin.test
@@ -28,46 +28,46 @@
--enable_connect_log
---echo
---echo ================================================================================
---echo SETUP
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # SETUP
+--echo # ================================================================================
--echo # Save the initial number of concurrent sessions
--source include/count_sessions.inc
---echo
+--echo #
--echo # Verify EXAMPLE plugin is not loaded
SELECT COUNT(*) = 0 AS "Expect 1" FROM information_schema.plugins WHERE plugin_name = "EXAMPLE";
---echo
+--echo #
--echo # Create one session to force local and global system variables
--connect(con0, localhost, root,,)
--connection default
---echo
---echo ================================================================================
---echo TEST 1- NO PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 1- NO PLUGIN VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
-
---echo ================================================================================
---echo TEST 2 - PLUGIN LOAD, UNLOAD, RELOAD
---echo ================================================================================
---echo ================================================================================
---echo 2.1 - INSTALL PLUGIN
---echo ================================================================================
+--echo #
+
+--echo # ================================================================================
+--echo # TEST 2 - PLUGIN LOAD, UNLOAD, RELOAD
+--echo # ================================================================================
+--echo # ================================================================================
+--echo # 2.1 - INSTALL PLUGIN
+--echo # ================================================================================
INSTALL PLUGIN example SONAME 'ha_example';
---echo
---echo ================================================================================
---echo 2.1a - FORCE SYNC OF LOCAL AND GLOBAL SYSTEM VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.1a - FORCE SYNC OF LOCAL AND GLOBAL SYSTEM VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
--disconnect con0
---echo
---echo ================================================================================
---echo 2.2 - SET PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.2 - SET PLUGIN VARS
+--echo # ================================================================================
--echo # GLOBAL
SET GLOBAL example_ulong_var = 100;
SET GLOBAL example_enum_var = e1;
@@ -76,35 +76,35 @@ SET GLOBAL example_double_thdvar = 101.9991;
--echo # SESSION
SET SESSION example_double_thdvar = 102.9992;
---echo
---echo ================================================================================
---echo 2.3 - VERIFY UPDATED PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.3 - VERIFY UPDATED PLUGIN VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
---echo ================================================================================
---echo 2.4 - UNINSTALL PLUGIN
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.4 - UNINSTALL PLUGIN
+--echo # ================================================================================
UNINSTALL PLUGIN example;
---echo
---echo ================================================================================
---echo 2.5 - VERIFY NO PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.5 - VERIFY NO PLUGIN VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
---echo ================================================================================
---echo 2.6 - REINSTALL PLUGIN
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.6 - REINSTALL PLUGIN
+--echo # ================================================================================
--echo # Reinstall EXAMPLE plugin
INSTALL PLUGIN example SONAME 'ha_example';
---echo
---echo ================================================================================
---echo 2.7 - SET PLUGIN VARS AGAIN
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.7 - SET PLUGIN VARS AGAIN
+--echo # ================================================================================
--echo # GLOBAL
SET GLOBAL example_ulong_var = 200;
SET GLOBAL example_enum_var = e2;
@@ -113,38 +113,38 @@ SET GLOBAL example_double_thdvar = 201.8881;
--echo # SESSION
SET SESSION example_double_thdvar = 202.8882;
---echo
---echo ================================================================================
---echo 2.8 - VERIFY PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.8 - VERIFY PLUGIN VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
---echo ================================================================================
---echo 2.9 - UNINSTALL PLUGIN
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.9 - UNINSTALL PLUGIN
+--echo # ================================================================================
UNINSTALL PLUGIN example;
---echo
---echo ================================================================================
---echo 2.10 - VERIFY NO PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 2.10 - VERIFY NO PLUGIN VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
---echo ================================================================================
---echo TEST 3 - SESSION PLUGIN VARS ON MULTIPLE CONNECTIONS
---echo ================================================================================
---echo
---echo ================================================================================
---echo 3.1 - INSTALL PLUGIN
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 3 - SESSION PLUGIN VARS ON MULTIPLE CONNECTIONS
+--echo # ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.1 - INSTALL PLUGIN
+--echo # ================================================================================
INSTALL PLUGIN example SONAME 'ha_example';
---echo
---echo ================================================================================
---echo 3.2 - SET GLOBAL AND DEFAULT CONNECTION VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.2 - SET GLOBAL AND DEFAULT CONNECTION VARS
+--echo # ================================================================================
--connection default
SET GLOBAL example_ulong_var = 300;
SET GLOBAL example_enum_var = e1;
@@ -152,35 +152,35 @@ SET GLOBAL example_double_var = 301.0000;
SET GLOBAL example_double_thdvar = 302.0000;
SET SESSION example_double_thdvar = 300.0000;
---echo
---echo ================================================================================
---echo 3.3 - CONNECT 3 CLIENTS, SET LOCAL PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.3 - CONNECT 3 CLIENTS, SET LOCAL PLUGIN VARS
+--echo # ================================================================================
--connect(con1, localhost, root,,)
SET SESSION example_double_thdvar = 300.1111;
---echo
+--echo #
--connect(con2, localhost, root,,)
SET SESSION example_double_thdvar = 300.2222;
---echo
+--echo #
--connect(con3, localhost, root,,)
SET SESSION example_double_thdvar = 300.3333;
---echo
+--echo #
--connection default
---echo
---echo ================================================================================
---echo 3.4 - VERIFY GLOBAL AND SESSION PLUGIN VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.4 - VERIFY GLOBAL AND SESSION PLUGIN VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
+--echo #
--echo # Variables by thread
SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
WHERE variable_name LIKE "example_%" ORDER BY variable_value;
---echo
---echo ================================================================================
---echo 3.5 - DISCONNECT CLIENTS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.5 - DISCONNECT CLIENTS
+--echo # ================================================================================
--connection con1
--disconnect con1
--source include/wait_until_disconnected.inc
@@ -195,61 +195,61 @@ WHERE variable_name LIKE "example_%" ORDER BY variable_value;
--connection default
---echo
---echo ================================================================================
---echo 3.6 - VERIFY SESSION VARS ARE REMOVED
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.6 - VERIFY SESSION VARS ARE REMOVED
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
+--echo #
--echo # Variables by thread
SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
WHERE variable_name LIKE "example_%" ORDER BY variable_value;
---echo
---echo ================================================================================
---echo 3.7 - RECONNECT 3 CLIENTS, SET SESSION VARS FOR EACH
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.7 - RECONNECT 3 CLIENTS, SET SESSION VARS FOR EACH
+--echo # ================================================================================
--connect(con1, localhost, root,,)
SET SESSION example_double_thdvar = 311.1111;
---echo
+--echo #
--connect(con2, localhost, root,,)
SET SESSION example_double_thdvar = 322.2222;
---echo
+--echo #
--connect(con3, localhost, root,,)
SET SESSION example_double_thdvar = 333.3333;
---echo
+--echo #
--connection default
---echo
---echo ================================================================================
---echo 3.8 - VERIFY GLOBAL AND SESSION VARS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.8 - VERIFY GLOBAL AND SESSION VARS
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
+--echo #
--echo # Variables by thread
SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
WHERE variable_name LIKE "example_%" ORDER BY variable_value;
---echo
---echo ================================================================================
---echo 3.9 - UNINSTALL PLUGIN, LEAVE CLIENTS CONNECTED
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.9 - UNINSTALL PLUGIN, LEAVE CLIENTS CONNECTED
+--echo # ================================================================================
UNINSTALL PLUGIN example;
---echo
---echo ================================================================================
---echo 3.10 - VERIFY SESSION VARS ARE REMOVED
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.10 - VERIFY SESSION VARS ARE REMOVED
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
+--echo #
--echo # VARIABLES BY THREAD
SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
WHERE variable_name LIKE "example_%" ORDER BY variable_value;
---echo
---echo ================================================================================
---echo 3.11 - DISCONNECT CLIENTS
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.11 - DISCONNECT CLIENTS
+--echo # ================================================================================
--connection con1
--disconnect con1
--source include/wait_until_disconnected.inc
@@ -264,27 +264,27 @@ WHERE variable_name LIKE "example_%" ORDER BY variable_value;
--connection default
---echo
---echo ================================================================================
---echo 3.12 - VERIFY CLIENTS ARE REMOVED
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # 3.12 - VERIFY CLIENTS ARE REMOVED
+--echo # ================================================================================
--source ../include/show_plugin_verifier.inc
---echo
+--echo #
--echo # VARIABLES BY THREAD
SELECT variable_name, variable_value FROM performance_schema.variables_by_thread
WHERE variable_name LIKE "example_%" ORDER BY variable_value;
---echo
---echo ================================================================================
---echo TEST 4 - BUG#18008907: DEADLOCK WITH CHANGE_USER, SHOW VARIABLES, INSTALL PLUGIN
---echo ================================================================================
---echo
---echo
---echo ================================================================================
---echo TEST 5 - BUG#22225549 MYSQL_CHANGE_USER/MYSQL_RESET_CONNECTION + SET INNODB...
+--echo #
+--echo # ================================================================================
+--echo # TEST 4 - BUG#18008907: DEADLOCK WITH CHANGE_USER, SHOW VARIABLES, INSTALL PLUGIN
+--echo # ================================================================================
+--echo #
+--echo #
+--echo # ================================================================================
+--echo # TEST 5 - BUG#22225549 MYSQL_CHANGE_USER/MYSQL_RESET_CONNECTION + SET INNODB...
--echo Update to plugin-defined session variable triggers resync with global
--echo variables and deadlocks on THD::LOCK_thd_sysvar.
---echo ================================================================================
+--echo # ================================================================================
#
# The deadlock occurs when plugin-defined session variables are resynced with the global
# variables. To force a resync, change the user and update a session variable from a
@@ -293,29 +293,29 @@ WHERE variable_name LIKE "example_%" ORDER BY variable_value;
select @@session.innodb_strict_mode;
let $innodb_strict_mode_save = `select @@session.innodb_strict_mode`;
select user(), current_user();
---echo change_user root
+--echo # change_user root
--change_user root
--echo #
--echo # Trigger a resync of session variables with global variables.
--echo #
set @@session.innodb_strict_mode=off;
---echo
+--echo #
--echo # Restore
---echo
+--echo #
eval set @@session.innodb_strict_mode=$innodb_strict_mode_save;
select @@session.innodb_strict_mode;
---echo
---echo ================================================================================
---echo CLEAN UP
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CLEAN UP
+--echo # ================================================================================
--connection default
---echo
+--echo #
---echo
+--echo #
--disable_connect_log
---echo
+--echo #
--echo # Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc
diff --git a/mysql-test/suite/perfschema/t/show_sanity.test b/mysql-test/suite/perfschema/t/show_sanity.test
index cc54d1af744..029e1d9033e 100644
--- a/mysql-test/suite/perfschema/t/show_sanity.test
+++ b/mysql-test/suite/perfschema/t/show_sanity.test
@@ -130,185 +130,185 @@ set @my_host='localhost';
# Debug
# select connection_id(), @my_tid, @my_user, @my_host;
# show plugins
---echo
---echo ================================================================================
---echo SHOW_COMPATIBILITY_56 = ON
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # SHOW_COMPATIBILITY_56 = ON
+--echo # ================================================================================
set global show_compatibility_56 = on;
---echo
+--echo #
--echo # STEP 1-1
insert into test.sanity
select "5.6", "I_S.GLOBAL_VARIABLES", variable_name
from information_schema.global_variables;
---echo
+--echo #
--echo # STEP 1-2
insert into test.sanity
select "5.6", "I_S.SESSION_VARIABLES", variable_name
from information_schema.session_variables;
---echo
+--echo #
--echo # STEP 1-3
insert into test.sanity
select "5.6", "P_S.GLOBAL_VARIABLES", variable_name
from performance_schema.global_variables;
---echo
+--echo #
--echo # STEP 1-4
insert into test.sanity
select "5.6", "P_S.VARIABLES_BY_THREAD", variable_name
from performance_schema.variables_by_thread
where thread_id = @my_tid;
---echo
+--echo #
--echo # STEP 1-5
insert into test.sanity
select "5.6", "P_S.SESSION_VARIABLES", variable_name
from performance_schema.session_variables;
---echo
+--echo #
--echo # STEP 1-6
insert into test.sanity
select "5.6", "I_S.GLOBAL_STATUS", variable_name
from information_schema.global_status;
---echo
+--echo #
--echo # STEP 1-7
insert into test.sanity
select "5.6", "I_S.SESSION_STATUS", variable_name
from information_schema.session_status;
---echo
+--echo #
--echo # STEP 1-8
insert into test.sanity
select "5.6", "P_S.GLOBAL_STATUS", variable_name
from performance_schema.global_status;
---echo
+--echo #
--echo # STEP 1-9
--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
select *
from performance_schema.status_by_thread;
---echo
+--echo #
--echo # STEP 1-10
insert into test.sanity
select "5.6", "P_S.SESSION_STATUS", variable_name
from performance_schema.session_status;
---echo
+--echo #
--echo # STEP 1-11
--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
select *
from performance_schema.status_by_account;
---echo
+--echo #
--echo # STEP 1-12
--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
select *
from performance_schema.status_by_user;
---echo
+--echo #
--echo # STEP 1-13
--echo # EMPTY, NO WARNINGS (not available in 5.6 mode)
select *
from performance_schema.status_by_host;
---echo
---echo ================================================================================
---echo SHOW_COMPATIBILITY_56 = OFF
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # SHOW_COMPATIBILITY_56 = OFF
+--echo # ================================================================================
set global show_compatibility_56 = off;
---echo
+--echo #
--echo # STEP 2-1
--echo # FAILS WITH ERROR
--error ER_FEATURE_DISABLED_SEE_DOC
select *
from information_schema.global_variables;
---echo
+--echo #
--echo # STEP 2-2
--echo # FAILS WITH ERROR
--error ER_FEATURE_DISABLED_SEE_DOC
select *
from information_schema.session_variables;
---echo
+--echo #
--echo # STEP 2-3
insert into test.sanity
select "5.7", "P_S.GLOBAL_VARIABLES", variable_name
from performance_schema.global_variables;
---echo
+--echo #
--echo # STEP 2-4
insert into test.sanity
select "5.7", "P_S.VARIABLES_BY_THREAD", variable_name
from performance_schema.variables_by_thread
where thread_id = @my_tid;
---echo
+--echo #
--echo # STEP 2-5
insert into test.sanity
select "5.7", "P_S.SESSION_VARIABLES", variable_name
from performance_schema.session_variables;
---echo
+--echo #
--echo # STEP 2-6
--echo # FAILS WITH ERROR
--error ER_FEATURE_DISABLED_SEE_DOC
select *
from information_schema.global_status;
---echo
+--echo #
--echo # STEP 2-7
--echo # FAILS WITH ERROR
--error ER_FEATURE_DISABLED_SEE_DOC
select *
from information_schema.session_status;
---echo
+--echo #
--echo # STEP 2-8
insert into test.sanity
select "5.7", "P_S.GLOBAL_STATUS", variable_name
from performance_schema.global_status;
---echo
+--echo #
--echo # STEP 2-9
insert into test.sanity
select "5.7", "P_S.STATUS_BY_THREAD", variable_name
from performance_schema.status_by_thread
where thread_id = @my_tid;
---echo
+--echo #
--echo # STEP 2-10
insert into test.sanity
select "5.7", "P_S.SESSION_STATUS", variable_name
from performance_schema.session_status;
---echo
+--echo #
--echo # STEP 2-11
insert into test.sanity
select "5.7", "P_S.STATUS_BY_ACCOUNT", variable_name
from performance_schema.status_by_account
where `user` = @my_user and `host` = @my_host;
---echo
+--echo #
--echo # STEP 2-12
insert into test.sanity
select "5.7", "P_S.STATUS_BY_USER", variable_name
from performance_schema.status_by_user
where `user` = @my_user;
---echo
+--echo #
--echo # STEP 2-13
insert into test.sanity
select "5.7", "P_S.STATUS_BY_HOST", variable_name
from performance_schema.status_by_host
where `host` = @my_host;
---echo
+--echo #
--echo # STEP 2-14
--echo # Known global variables in 5.6 that should not display in session queries.
--echo # These should be global-only system variables.
@@ -725,7 +725,7 @@ insert into test.sanity values
;
--enable_query_log
---echo
+--echo #
--echo # STEP 2-15
--echo # Known global status in 5.6 that should not exist in session queries.
--echo # These should be global-only status variables.
@@ -895,7 +895,7 @@ insert into test.sanity values
;
--enable_query_log
---echo
+--echo #
--echo # STEP 2-15A
--echo # COM counters appear in I_S.SESSION_STATUS, but not in P_S.SESSION_STATUS
--disable_query_log
@@ -1051,7 +1051,7 @@ insert into test.sanity values
--enable_query_log
---echo
+--echo #
--echo # STEP 2-15B
--echo # These slave status counters appear in I_S.SESSION_STATUS, but not in P_S.SESSION_STATUS
insert into test.sanity values
@@ -1062,7 +1062,7 @@ insert into test.sanity values
("JUNK: SLAVE-ONLY", "I_S.SESSION_STATUS", "SLAVE_RUNNING")
;
---echo
+--echo #
--echo # STEP 2-16
--echo # Known session-only status in 5.6 that should not exist in global queries.
insert into test.sanity values
@@ -1071,7 +1071,7 @@ insert into test.sanity values
("JUNK: SESSION-ONLY", "I_S.GLOBAL_STATUS", "LAST_QUERY_PARTIAL_PLANS")
;
---echo
+--echo #
--echo # STEP 2-16A
--echo # COM counters appear in I_S.GLOBAL_STATUS but not in P_S.GLOBAL_STATUS
--disable_query_log
@@ -1227,7 +1227,7 @@ insert into test.sanity values
--enable_query_log
---echo
+--echo #
--echo # STEP 2-16B
--echo # These slave status counters appear in I_S.GLOBAL_STATUS, but not in P_S.GLOBAL_STATUS
insert into test.sanity values
@@ -1238,7 +1238,7 @@ insert into test.sanity values
("JUNK: SLAVE-ONLY", "I_S.GLOBAL_STATUS", "SLAVE_RUNNING")
;
---echo
+--echo #
--echo # STEP 2-17
--echo # Status variables that should not exist in queries that aggregate across threads.
--echo # Criteria: Session-only OR non-aggregatable.
@@ -1263,12 +1263,12 @@ insert into test.sanity values
#Debug
#select * from test.sanity order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 1A
---echo Present in 5.6 P_S.GLOBAL_VARIABLES (1-3)
---echo Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 1A
+--echo # Present in 5.6 P_S.GLOBAL_VARIABLES (1-3)
+--echo # Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "P_S.GLOBAL_VARIABLES"
@@ -1278,12 +1278,12 @@ select * from test.sanity
and source = "I_S.GLOBAL_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 1B
---echo Present in 5.7 P_S.GLOBAL_VARIABLES (2-3)
---echo Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 1B
+--echo # Present in 5.7 P_S.GLOBAL_VARIABLES (2-3)
+--echo # Missing in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.GLOBAL_VARIABLES"
@@ -1293,12 +1293,12 @@ select * from test.sanity
and source = "I_S.GLOBAL_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 2A
---echo Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
---echo Missing in 5.6 P_S.GLOBAL_VARIABLES (1-3)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 2A
+--echo # Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # Missing in 5.6 P_S.GLOBAL_VARIABLES (1-3)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.GLOBAL_VARIABLES"
@@ -1308,12 +1308,12 @@ select * from test.sanity
and source = "P_S.GLOBAL_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 2B
---echo Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
---echo Missing in 5.7 P_S.GLOBAL_VARIABLES (2-3)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 2B
+--echo # Present in 5.6 I_S.GLOBAL_VARIABLES (1-1)
+--echo # Missing in 5.7 P_S.GLOBAL_VARIABLES (2-3)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.GLOBAL_VARIABLES"
@@ -1323,12 +1323,12 @@ select * from test.sanity
and source = "P_S.GLOBAL_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 3A
---echo Present in 5.6 P_S.SESSION_VARIABLES (1-5)
---echo Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 3A
+--echo # Present in 5.6 P_S.SESSION_VARIABLES (1-5)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "P_S.SESSION_VARIABLES"
@@ -1338,12 +1338,12 @@ select * from test.sanity
and source = "I_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 3B
---echo Present in 5.7 P_S.SESSION_VARIABLES (2-5)
---echo Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 3B
+--echo # Present in 5.7 P_S.SESSION_VARIABLES (2-5)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_VARIABLES"
@@ -1353,12 +1353,12 @@ select * from test.sanity
and source = "I_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 4A
---echo Present in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo Missing in 5.6 P_S.SESSION_VARIABLES (1-5)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 4A
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.6 P_S.SESSION_VARIABLES (1-5)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.SESSION_VARIABLES"
@@ -1368,12 +1368,12 @@ select * from test.sanity
and source = "P_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 4B
---echo Present in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo Missing in 5.7 P_S.SESSION_VARIABLES (2-5)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 4B
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.7 P_S.SESSION_VARIABLES (2-5)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.SESSION_VARIABLES"
@@ -1383,12 +1383,12 @@ select * from test.sanity
and source = "P_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 5A
---echo Present in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
---echo Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5A
+--echo # Present in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "P_S.VARIABLES_BY_THREAD"
@@ -1398,12 +1398,12 @@ select * from test.sanity
and source = "I_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 5B
---echo Present in 5.7 P_S.VARIABLES_BY_THREAD (2-4)
---echo Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5B
+--echo # Present in 5.7 P_S.VARIABLES_BY_THREAD (2-4)
+--echo # Missing in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.VARIABLES_BY_THREAD"
@@ -1413,13 +1413,13 @@ select * from test.sanity
and source = "I_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 5C
---echo Present in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo Missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
---echo EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5C
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+--echo # EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.SESSION_VARIABLES"
@@ -1433,13 +1433,13 @@ select * from test.sanity
and source = "I_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 5D
---echo Present in 5.6 I_S.SESSION_VARIABLES (1-2)
---echo Missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
---echo EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5D
+--echo # Present in 5.6 I_S.SESSION_VARIABLES (1-2)
+--echo # Missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
+--echo # EXPECT NOTHING BESIDE KNOWN GLOBAL VARIABLES (2-14)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.SESSION_VARIABLES"
@@ -1453,12 +1453,12 @@ select * from test.sanity
and source = "I_S.SESSION_VARIABLES")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 5E
---echo KNOWN GLOBAL VARIABLES (2-14)
---echo Expect missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5E
+--echo # KNOWN GLOBAL VARIABLES (2-14)
+--echo # Expect missing in 5.6 P_S.VARIABLES_BY_THREAD (1-4)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "JUNK: GLOBAL-ONLY"
and source = "I_S.SESSION_VARIABLES"
@@ -1468,12 +1468,12 @@ select * from test.sanity
and source = "P_S.VARIABLES_BY_THREAD")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 5F
---echo KNOWN GLOBAL VARIABLES (2-14)
---echo Expect missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 5F
+--echo # KNOWN GLOBAL VARIABLES (2-14)
+--echo # Expect missing in 5.7 P_S.VARIABLES_BY_THREAD (2-5)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "JUNK: GLOBAL-ONLY"
and source = "I_S.SESSION_VARIABLES"
@@ -1483,13 +1483,13 @@ select * from test.sanity
and source = "P_S.VARIABLES_BY_THREAD")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 6A
---echo Present in 5.7 P_S.GLOBAL_STATUS (2-8)
---echo Missing in 5.6 I_S.GLOBAL_STATUS (1-6)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 6A
+--echo # Present in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # Missing in 5.6 I_S.GLOBAL_STATUS (1-6)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.GLOBAL_STATUS"
@@ -1499,13 +1499,13 @@ select * from test.sanity
and source = "I_S.GLOBAL_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 6B
---echo Present in 5.7 P_S.GLOBAL_STATUS (2-8)
---echo Missing in 5.6 P_S.GLOBAL_STATUS (1-8)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 6B
+--echo # Present in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # Missing in 5.6 P_S.GLOBAL_STATUS (1-8)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.GLOBAL_STATUS"
@@ -1515,13 +1515,13 @@ select * from test.sanity
and source = "P_S.GLOBAL_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 6C
---echo Present in 5.6 P_S.GLOBAL_STATUS (1-8)
---echo Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 6C
+--echo # Present in 5.6 P_S.GLOBAL_STATUS (1-8)
+--echo # Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "P_S.GLOBAL_STATUS"
@@ -1531,13 +1531,13 @@ select * from test.sanity
and source = "P_S.GLOBAL_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 7
---echo Present in 5.6 I_S.GLOBAL_STATUS (1-6)
---echo Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
---echo EXPECT NOTHING AFTER REMOVING KNOWN SESSION-ONLY, COM COUNTERS AND SLAVE-ONLY (2-16 & 2-16A & 2-16B)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 7
+--echo # Present in 5.6 I_S.GLOBAL_STATUS (1-6)
+--echo # Missing in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # EXPECT NOTHING AFTER REMOVING KNOWN SESSION-ONLY, COM COUNTERS AND SLAVE-ONLY (2-16 & 2-16A & 2-16B)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.GLOBAL_STATUS"
@@ -1551,15 +1551,15 @@ select * from test.sanity
and source = "P_S.GLOBAL_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 8
---echo KNOWN SESSION-ONLY (2-16)
---echo KNOWN COM COUNTERS (2-16A)
---echo KNOWN SLAVE-ONLY (2-16B)
---echo Status variables that should NOT be present in 5.7 P_S.GLOBAL_STATUS (2-8)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 8
+--echo # KNOWN SESSION-ONLY (2-16)
+--echo # KNOWN COM COUNTERS (2-16A)
+--echo # KNOWN SLAVE-ONLY (2-16B)
+--echo # Status variables that should NOT be present in 5.7 P_S.GLOBAL_STATUS (2-8)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.GLOBAL_STATUS"
@@ -1569,13 +1569,13 @@ select * from test.sanity
and source = "I_S.GLOBAL_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 9A
---echo Present in 5.7 P_S.SESSION_STATUS (2-10)
---echo Missing in 5.6 I_S.SESSION_STATUS (1-7)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 9A
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.6 I_S.SESSION_STATUS (1-7)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_STATUS"
@@ -1585,13 +1585,13 @@ select * from test.sanity
and source = "I_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 9B
---echo Present in 5.7 P_S.SESSION_STATUS (2-10)
---echo Missing in 5.6 P_S.SESSION_STATUS (1-10)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 9B
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.6 P_S.SESSION_STATUS (1-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_STATUS"
@@ -1601,13 +1601,13 @@ select * from test.sanity
and source = "P_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 9C
---echo Present in 5.6 P_S.SESSION_STATUS (1-10)
---echo Missing in 5.7 P_S.SESSION_STATUS (2-10)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 9C
+--echo # Present in 5.6 P_S.SESSION_STATUS (1-10)
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "P_S.SESSION_STATUS"
@@ -1617,13 +1617,13 @@ select * from test.sanity
and source = "P_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 10
---echo Present in 5.6 I_S.SESSION_STATUS (1-7)
---echo Missing in 5.7 P_S.SESSION_STATUS (2-10)
---echo EXPECT NOTHING AFTER REMOVING KNOWN COM COUNTERS AND SLAVE-ONLY (2-15A & 2-15B)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 10
+--echo # Present in 5.6 I_S.SESSION_STATUS (1-7)
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING AFTER REMOVING KNOWN COM COUNTERS AND SLAVE-ONLY (2-15A & 2-15B)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.6"
and source = "I_S.SESSION_STATUS"
@@ -1637,14 +1637,14 @@ select * from test.sanity
and source = "P_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 11
---echo KNOWN COM COUNTERS (2-15A)
---echo KNOWN SLAVE-ONLY (2-15B)
---echo Status variables that should NOT be present in 5.7 P_S.SESSION_STATUS (2-10)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 11
+--echo # KNOWN COM COUNTERS (2-15A)
+--echo # KNOWN SLAVE-ONLY (2-15B)
+--echo # Status variables that should NOT be present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_STATUS"
@@ -1654,13 +1654,13 @@ select * from test.sanity
and source = "I_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 12
---echo Present in 5.7 P_S.SESSION_STATUS (2-10)
---echo Missing in 5.7 P_S.STATUS_BY_THREAD
---echo EXPECT NOTHING AFTER REMOVING KNOWN GLOBAL-ONLY (2-15)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 12
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_THREAD
+--echo # EXPECT NOTHING AFTER REMOVING KNOWN GLOBAL-ONLY (2-15)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_STATUS"
@@ -1674,13 +1674,13 @@ select * from test.sanity
and source = "I_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 13
---echo Present in 5.7 P_S.STATUS_BY_THREAD
---echo Missing in 5.7 P_S.SESSION_STATUS (2-10)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 13
+--echo # Present in 5.7 P_S.STATUS_BY_THREAD
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.STATUS_BY_THREAD"
@@ -1690,15 +1690,15 @@ select * from test.sanity
and source = "P_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 14
---echo Present in 5.7 P_S.SESSION_STATUS (2-10)
---echo Missing in 5.7 P_S.STATUS_BY_ACCOUNT
---echo EXPECT NOTHING AFTER REMOVING
---echo - KNOWN GLOBAL-ONLY (2-15)
---echo - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 14
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_ACCOUNT
+--echo # EXPECT NOTHING AFTER REMOVING
+--echo # - KNOWN GLOBAL-ONLY (2-15)
+--echo # - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_STATUS"
@@ -1716,13 +1716,13 @@ select * from test.sanity
and source = "P_S.STATUS_BY_ACCOUNT")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 15
---echo Present in 5.7 P_S.STATUS_BY_ACCOUNT
---echo Missing in 5.7 P_S.SESSION_STATUS (2-10)
---echo EXPECT NOTHING
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 15
+--echo # Present in 5.7 P_S.STATUS_BY_ACCOUNT
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # EXPECT NOTHING
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.STATUS_BY_ACCOUNT"
@@ -1732,12 +1732,12 @@ select * from test.sanity
and source = "P_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 16
---echo KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
---echo Status variables that should NOT be present in 5.7 P_S.STATUS_BY_ACCOUNT
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 16
+--echo # KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # Status variables that should NOT be present in 5.7 P_S.STATUS_BY_ACCOUNT
+--echo # ================================================================================
select * from performance_schema.status_by_account
where upper(variable_name) in (
select upper(variable_name) from test.sanity
@@ -1745,15 +1745,15 @@ select * from performance_schema.status_by_account
and source = "NO AGGREGATE")
order by variable_name;
---echo
---echo ================================================================================
---echo TEST 17
---echo Present in 5.7 P_S.SESSION_STATUS (2-10)
---echo Missing in 5.7 P_S.STATUS_BY_USER
---echo EXPECT NOTHING AFTER REMOVING
---echo - KNOWN GLOBAL-ONLY (2-15)
---echo - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 17
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_USER
+--echo # EXPECT NOTHING AFTER REMOVING
+--echo # - KNOWN GLOBAL-ONLY (2-15)
+--echo # - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_STATUS"
@@ -1771,12 +1771,12 @@ select * from test.sanity
and source = "P_S.STATUS_BY_USER")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 18
---echo Present in 5.7 P_S.STATUS_BY_USER
---echo Missing in 5.7 P_S.SESSION_STATUS (2-10)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 18
+--echo # Present in 5.7 P_S.STATUS_BY_USER
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.STATUS_BY_USER"
@@ -1786,12 +1786,12 @@ select * from test.sanity
and source = "P_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 19
---echo KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
---echo Status variables that should NOT be present in 5.7 P_S.STATUS_BY_USER
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 19
+--echo # KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # Status variables that should NOT be present in 5.7 P_S.STATUS_BY_USER
+--echo # ================================================================================
select * from performance_schema.status_by_user
where upper(variable_name) in (
select upper(variable_name) from test.sanity
@@ -1799,15 +1799,15 @@ select * from performance_schema.status_by_user
and source = "NO AGGREGATE")
order by variable_name;
---echo
---echo ================================================================================
---echo TEST 20
---echo Present in 5.7 P_S.SESSION_STATUS (2-10)
---echo Missing in 5.7 P_S.STATUS_BY_HOST
---echo EXPECT NOTHING AFTER REMOVING
---echo - KNOWN GLOBAL-ONLY (2-15)
---echo - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 20
+--echo # Present in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # Missing in 5.7 P_S.STATUS_BY_HOST
+--echo # EXPECT NOTHING AFTER REMOVING
+--echo # - KNOWN GLOBAL-ONLY (2-15)
+--echo # - STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.SESSION_STATUS"
@@ -1825,12 +1825,12 @@ select * from test.sanity
and source = "P_S.STATUS_BY_HOST")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 21
---echo Present in 5.7 P_S.STATUS_BY_HOST
---echo Missing in 5.7 P_S.SESSION_STATUS (2-10)
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 21
+--echo # Present in 5.7 P_S.STATUS_BY_HOST
+--echo # Missing in 5.7 P_S.SESSION_STATUS (2-10)
+--echo # ================================================================================
select * from test.sanity
where show_mode = "5.7"
and source = "P_S.STATUS_BY_HOST"
@@ -1840,12 +1840,12 @@ select * from test.sanity
and source = "P_S.SESSION_STATUS")
order by show_mode, source, variable_name;
---echo
---echo ================================================================================
---echo TEST 22
---echo KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
---echo Status variables that should NOT be present in 5.7 P_S.STATUS_BY_HOST
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # TEST 22
+--echo # KNOWN STATUS VARS THAT CAN'T BE AGGREGATED (2-17)
+--echo # Status variables that should NOT be present in 5.7 P_S.STATUS_BY_HOST
+--echo # ================================================================================
select * from performance_schema.status_by_host
where upper(variable_name) in (
select upper(variable_name) from test.sanity
@@ -1853,10 +1853,10 @@ select * from performance_schema.status_by_host
and source = "NO AGGREGATE")
order by variable_name;
---echo
---echo ================================================================================
---echo CLEAN UP
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CLEAN UP
+--echo # ================================================================================
set @@global.show_compatibility_56 = @show_compatibility_56_save;
drop table test.sanity;
diff --git a/mysql-test/suite/perfschema/t/socket_connect.test b/mysql-test/suite/perfschema/t/socket_connect.test
index b4579605eb5..4ae9608cd0e 100644
--- a/mysql-test/suite/perfschema/t/socket_connect.test
+++ b/mysql-test/suite/perfschema/t/socket_connect.test
@@ -57,9 +57,9 @@ let $ip_localhost=
--echo # 1.0 Get the default connection object_instance_begin, thread id and verify
--echo # the expected number of client connections.
--echo #==============================================================================
---echo
+--echo #
--echo # 1.1 Confirm only one client connection
---echo
+--echo #
eval $count_client_connections;
if (`SELECT @my_client_connections != 1`)
@@ -70,15 +70,15 @@ if (`SELECT @my_client_connections != 1`)
exit;
}
---echo
+--echo #
--echo # 1.2 Get the default THREAD_ID;
---echo
+--echo #
eval $get_thread_id;
let $default_thread_id= `SELECT @my_thread_id`;
---echo
+--echo #
--echo # 1.3 Get the default OBJECT_INSTANCE_BEGIN
---echo
+--echo #
eval $get_object_instance_begin;
let $default_object_instance_begin= `SELECT @my_object_instance_begin`;
--disable_query_log
@@ -99,19 +99,19 @@ if ($my_socket_debug)
--connect (con1,$my_localhost,root,,test,,$MASTER_MYPORT)
--enable_query_log
---echo
+--echo #
--echo # 2.1 Get the connection thread id
---echo
+--echo #
eval $get_thread_id;
---echo
+--echo #
--echo # 2.2 Get the connection object instance begin
---echo
+--echo #
eval $get_object_instance_begin;
---echo
+--echo #
--echo # 2.3 Get the connection port
---echo
+--echo #
eval $get_port;
--disable_query_log
@@ -134,9 +134,9 @@ if ($my_socket_debug)
--echo # Con1 name2 = $con1_name2
}
---echo
+--echo #
--echo # 2.4 Verify that the connection is 127.0.0.1 or ::1
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -144,17 +144,17 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND PORT= @con1_port
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
---echo
+--echo #
--echo # 2.5 Verify that the same connection is in the summary instance table
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
---echo
+--echo #
--echo # Switch to connection default
---echo
+--echo #
--connection default
--echo #==============================================================================
@@ -165,19 +165,19 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--connect (con2,$my_localhost,root,,test,,$MASTER_MYPORT)
--enable_query_log
---echo
+--echo #
--echo # 3.1 Get the connection thread id
---echo
+--echo #
eval $get_thread_id;
---echo
+--echo #
--echo # 3.2 Get the connection object instance begin
---echo
+--echo #
eval $get_object_instance_begin;
---echo
+--echo #
--echo # 3.3 Get the connection port
---echo
+--echo #
eval $get_port;
--disable_query_log
@@ -200,9 +200,9 @@ if ($my_socket_debug)
--echo # con2 name2 = $con2_name2
}
---echo
+--echo #
--echo # 3.4 Verify that the connection is 127.0.0.1 or ::1
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
@@ -211,17 +211,17 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND PORT= @con2_port
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
---echo
+--echo #
--echo # 3.5 Verify that the same connection is in the summary instance table
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
---echo
+--echo #
--echo # 3.6 Verify that the connection is 127.0.0.1 or ::1
---echo
+--echo #
eval SELECT COUNT(*) = 1 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -234,18 +234,18 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo #==============================================================================
--connection default
---echo
+--echo #
--echo # 4.1 Verify that there are two TCP/IP connections in the socket instance table
---echo
+--echo #
eval SELECT COUNT(*) = 2 AS 'Expect 1'
FROM performance_schema.socket_instances
WHERE EVENT_NAME LIKE '%client_connection%'
AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
AND $ip_localhost;
---echo
+--echo #
--echo # 4.2 Verify that there are two TCP/IP connections in the summary instance table
---echo
+--echo #
eval SELECT COUNT(*) = 2 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
WHERE EVENT_NAME LIKE '%client_connection%'
@@ -270,9 +270,9 @@ WHERE EVENT_NAME LIKE '%client_connection%'
--echo # 6.0 Verify sockets were removed from the instance tables
--echo #==============================================================================
---echo
+--echo #
--echo # 6.1 Verify that there are no TCP/IP connections in the socket instance table
---echo
+--echo #
let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_instances
@@ -281,9 +281,9 @@ WHERE EVENT_NAME LIKE '%client_connection%'
AND $ip_localhost;
--source include/wait_condition.inc
---echo
+--echo #
--echo # 6.2 Verify that there are no TCP/IP connections in the summary instance table
---echo
+--echo #
let $wait_condition=
SELECT COUNT(*) = 0 AS 'Expect 1'
FROM performance_schema.socket_summary_by_instance
diff --git a/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test b/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
index 5fe60a01e62..4a6ee2b6277 100644
--- a/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
+++ b/mysql-test/suite/perfschema/t/socket_summary_by_event_name_func.test
@@ -139,22 +139,22 @@ WHERE t_inst.event_name LIKE '%client%'
--echo #==============================================================================
--echo # 1.0 TEST INITIALIZATION
--echo #==============================================================================
---echo
+--echo #
--echo # 1.1 Disable instrumentation of the default (this) connection
---echo
+--echo #
--connection default
UPDATE performance_schema.threads
SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
---echo
+--echo #
--echo # 1.2 Get the default THREAD_ID;
---echo
+--echo #
eval $get_thread_id;
let $default_thread_id= `SELECT @my_thread_id`;
---echo
+--echo #
--echo # 1.3 Get the default OBJECT_INSTANCE_BEGIN
---echo
+--echo #
eval $get_object_instance_begin;
let $default_object_instance_begin= `SELECT @my_object_instance_begin`;
@@ -168,50 +168,50 @@ if ($my_socket_debug)
--echo # Default thread id = $default_thread_id
}
---echo
+--echo #
--echo # 1.4 Create a test database
---echo
+--echo #
CREATE SCHEMA mysqltest;
---echo
+--echo #
--echo # 1.5 Create a table to store summary values from socket_summary_by_instance
--echo and socket_summary_by_event_name
---echo
+--echo #
CREATE TABLE mysqltest.my_socket_summary AS
SELECT * FROM performance_schema.socket_summary_by_instance
WHERE 1 = 0;
---echo
+--echo #
--echo # 1.6 Drop object_instance_begin from my_socket_summary
---echo
+--echo #
ALTER TABLE mysqltest.my_socket_summary
DROP COLUMN OBJECT_INSTANCE_BEGIN;
---echo
+--echo #
--echo # 1.7 Add an auto_inc column to my_socket_summary
---echo
+--echo #
ALTER TABLE mysqltest.my_socket_summary
ADD COLUMN (n INT AUTO_INCREMENT, PRIMARY KEY(n));
---echo
+--echo #
--echo # 1.8 Create test tables
---echo
+--echo #
CREATE TABLE mysqltest.t1 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
CREATE TABLE mysqltest.t2 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
--echo #==============================================================================
--echo # 2.0 ESTABLISH CLIENT CONNECTIONS
--echo #==============================================================================
---echo
+--echo #
--echo # 2.1 Connection 1 (tcp/ip, 127.0.0.1 or ::1)
---echo
+--echo #
--disable_query_log
--connect (con1,$my_localhost,root,,,,$MASTER_MYPORT)
--enable_query_log
---echo
+--echo #
--echo # 2.2 Connection 2 (localhost or unix domain socket)
---echo
+--echo #
--disable_query_log
--connect (con2,localhost,root,,,,)
--enable_query_log
@@ -219,47 +219,47 @@ CREATE TABLE mysqltest.t2 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n
--echo #==============================================================================
--echo # 3.0 RUN THE TESTS
--echo #==============================================================================
---echo
+--echo #
--echo # 3.1 Clear performance schema tables
---echo
+--echo #
TRUNCATE performance_schema.socket_summary_by_instance;
TRUNCATE performance_schema.socket_summary_by_event_name;
---echo
+--echo #
--echo # 3.2 Get the 'before' sum of bytes written from socket_summary_by_instance
--echo for later comparison to the 'after' byte count as a simple confirmation
--echo that the table was updated.
---echo
+--echo #
--connection default
eval $get_write_count;
let $my_count_before= `SELECT @my_write_count`;
---echo
+--echo #
--echo # 3.3 From connection 1, insert one a 1K row of data into t1
---echo
+--echo #
--connection con1
USE mysqltest;
INSERT INTO t1 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t1 (s1) SELECT s1 FROM t1;
---echo
+--echo #
--echo # 3.4 From connection 2, insert one a 1K row of data into t2
---echo
+--echo #
--connection con2
USE mysqltest;
INSERT INTO t2 (s1) VALUES (REPEAT('a', 1024));
INSERT INTO t2 (s1) SELECT s1 FROM t2;
---echo
+--echo #
--echo # 3.5 Get the 'after' sum of bytes written from socket_summary_by_instance
---echo
+--echo #
--connection default
eval $get_write_count;
let $my_count_after= `SELECT @my_write_count`;
---echo
+--echo #
--echo # 3.6 Verify that SUM_NUMBER_OF_BYTES_WRITE increased
---echo
+--echo #
if ($my_count_before >= $my_count_after)
{
@@ -274,17 +274,17 @@ if ($my_count_before >= $my_count_after)
exit;
}
---echo
+--echo #
--echo # socket_summary_by_instance was updated
---echo
+--echo #
--echo #==============================================================================
--echo # 4.0 VERIFY RESULTS
--echo #==============================================================================
---echo
+--echo #
--echo # 4.1 Verify that the totals in socket_summary_by_event_name are
--echo consistent with totals in socket_summary_by_instance
---echo
+--echo #
--disable_query_log
eval $compare_tables_and_verify;
@@ -311,23 +311,23 @@ if (`SELECT @tables_match = 0`)
--echo # 5.0 Clean up
--echo #==============================================================================
---echo
+--echo #
--echo # 5.1 Disconnect con1
---echo
+--echo #
--connection con1
--disconnect con1
--source include/wait_until_disconnected.inc
---echo
+--echo #
--echo # 5.2 Disconnect con2
---echo
+--echo #
--connection con2
--disconnect con2
--source include/wait_until_disconnected.inc
---echo
+--echo #
--echo # 5.3 Drop mysqltest
---echo
+--echo #
--connection default
DROP DATABASE mysqltest;
diff --git a/mysql-test/suite/perfschema/t/status_reprepare.test b/mysql-test/suite/perfschema/t/status_reprepare.test
index 94a8f120633..6393655bfa3 100644
--- a/mysql-test/suite/perfschema/t/status_reprepare.test
+++ b/mysql-test/suite/perfschema/t/status_reprepare.test
@@ -4,10 +4,10 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
---echo
---echo ================================================================================
---echo SETUP
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # SETUP
+--echo # ================================================================================
# Create a new connection, to get clean statistics
connect(con1, localhost, root,,);
@@ -50,10 +50,10 @@ SELECT VARIABLE_VALUE INTO @count_global_reprepare_after
# Should increment by 1
SELECT @count_global_reprepare_after - @count_global_reprepare_before;
---echo
---echo ================================================================================
---echo CLEANUP
---echo ================================================================================
+--echo #
+--echo # ================================================================================
+--echo # CLEANUP
+--echo # ================================================================================
DROP TABLE test.t1;
diff --git a/mysql-test/suite/perfschema/t/table_name.test b/mysql-test/suite/perfschema/t/table_name.test
index e80185e8b87..aca713c3987 100644
--- a/mysql-test/suite/perfschema/t/table_name.test
+++ b/mysql-test/suite/perfschema/t/table_name.test
@@ -17,7 +17,7 @@
--source include/have_innodb.inc
--source include/not_embedded.inc
---echo
+--echo #
--echo #
--echo # TEST 1: Normal tables prefixed with "#sql" and "sql".
--echo #
@@ -25,129 +25,129 @@ USE test;
CREATE TABLE `#sql_1` (a int, b text);
# INSERT forces path through get_table_share()
INSERT INTO `#sql_1` VALUES(1,'one');
---echo
+--echo #
CREATE TABLE `sql_1` (a int, b text);
INSERT INTO `sql_1` VALUES(1,'one');
---echo
+--echo #
--echo # Verify that the tables are treated as normal tables .
---echo
+--echo #
--sorted_result
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo # Drop the tables, verify that the table objects are removed.
---echo
+--echo #
DROP TABLE `#sql_1`;
DROP TABLE `sql_1`;
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 2: Temporary tables, no special prefix.
--echo #
CREATE TEMPORARY TABLE sql_temp2_myisam (a int, b text) ENGINE=MYISAM;
INSERT INTO sql_temp2_myisam VALUES(1,'one');
---echo
+--echo #
CREATE TEMPORARY TABLE sql_temp2_innodb (a int, b text) ENGINE=INNODB;
INSERT INTO sql_temp2_innodb VALUES(1,'one');
---echo
+--echo #
--echo # Confirm that the temporary tables are ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo # Drop the tables, verify that the table objects are not created.
---echo
+--echo #
DROP TABLE sql_temp2_myisam;
DROP TABLE sql_temp2_innodb;
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 3: Temporary tables with the "#sql" prefix.
--echo #
CREATE TEMPORARY TABLE `#sql_temp3_myisam` (a int, b text) ENGINE=MYISAM;
CHECK TABLE `#sql_temp3_myisam`;
INSERT INTO `#sql_temp3_myisam` VALUES(1,'one');
---echo
+--echo #
CREATE TEMPORARY TABLE `#sql_temp3_innodb` (a int, b text) ENGINE=INNODB;
CHECK TABLE `#sql_temp3_innodb`;
INSERT INTO `#sql_temp3_innodb` VALUES(1,'one');
---echo
+--echo #
--echo # Confirm that the temporary tables are ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo # Drop the temporary tables.
---echo
+--echo #
DROP TABLE `#sql_temp3_myisam`;
DROP TABLE `#sql_temp3_innodb`;
---echo
+--echo #
--echo # Confirm that the temporary tables are still ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 4: Special case: MyISAM temporary tables are recreated as non-temporary
--echo # when they are truncated.
--echo #
CREATE TEMPORARY TABLE `sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `sql_temp4_myisam` VALUES(1,'one');
---echo
+--echo #
CREATE TEMPORARY TABLE `#sql_temp4_myisam` (a int, b text) ENGINE=MYISAM;
INSERT INTO `#sql_temp4_myisam` VALUES(1,'one');
---echo
+--echo #
--echo # Confirm that the MyISAM temporary tables are ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo # Truncate the MyISAM temporary tables, forcing them to be recreated as non-temporary.
---echo
+--echo #
TRUNCATE TABLE `sql_temp4_myisam`;
TRUNCATE TABLE `#sql_temp4_myisam`;
---echo
+--echo #
--echo # Confirm that the recreated MyISAM tables are still regarded as temporary and ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo # Drop the recreated MyISAM tables;
---echo
+--echo #
DROP TABLE `sql_temp4_myisam`;
DROP TABLE `#sql_temp4_myisam`;
---echo
+--echo #
--echo # Confirm that the recreated temporary tables are still ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo #
--echo # TEST 5: Generate temporary tables with ALTER MyISAM table.
--echo #
@@ -156,21 +156,21 @@ CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2), (3);
# Force a path throug mysql_alter_table() and ha_create_table().
ALTER TABLE t1 ADD COLUMN (b int);
---echo
+--echo #
--echo # Confirm that the recreated temporary tables are still ignored.
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
ORDER BY object_name;
---echo
+--echo #
--echo # Drop the MyISAM table
---echo
+--echo #
DROP TABLE t1;
---echo
+--echo #
--echo # Confirm that no tables remain;
---echo
+--echo #
SELECT object_type, object_schema, object_name
FROM performance_schema.objects_summary_global_by_type
WHERE object_schema="test"
diff --git a/mysql-test/suite/perfschema/t/transaction.test b/mysql-test/suite/perfschema/t/transaction.test
index 99ddc1eca46..b616460374e 100644
--- a/mysql-test/suite/perfschema/t/transaction.test
+++ b/mysql-test/suite/perfschema/t/transaction.test
@@ -16,22 +16,22 @@
--enable_query_log
set global binlog_format=ROW;
---echo
---echo ========================================================================
---echo STEP 1 - SETUP
---echo ========================================================================
+--echo #
+--echo # ========================================================================
+--echo # STEP 1 - SETUP
+--echo # ========================================================================
---echo
+--echo #
--echo # Control thread
---echo
+--echo #
--connection default
SET SESSION AUTOCOMMIT= 1;
eval $get_thread_id;
let $default_thread_id= `SELECT @my_thread_id`;
---echo
+--echo #
--echo # Connection 1
---echo
+--echo #
connect(con1, localhost, root,,);
--disable_query_log
eval $get_thread_id;
@@ -41,9 +41,9 @@ SET SESSION AUTOCOMMIT= 0;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE;
--disable_parsing
---echo
+--echo #
--echo # Connection 2
---echo
+--echo #
connect(con2, localhost, root,,);
--disable_query_log
eval $get_thread_id;
@@ -59,9 +59,9 @@ eval SET @con1_thread_id= $con1_thread_id;
#eval SET @con2_thread_id= $con2_thread_id;
--enable_query_log
---echo
+--echo #
--echo # Create test tables, one transactional and one non-transactional
---echo
+--echo #
--connection default
--disable_warnings
@@ -71,24 +71,24 @@ DROP TABLE IF EXISTS nt1;
CREATE TABLE t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
CREATE TABLE nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
---echo
+--echo #
--echo # Disable all events from the control thread
---echo
+--echo #
--disable_query_log
UPDATE performance_schema.threads
SET instrumented='NO' WHERE processlist_id = CONNECTION_ID();
--enable_query_log
---echo
+--echo #
--echo # Clear transaction tables
---echo
+--echo #
CALL clear_transaction_tables();
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 2 - BASIC TRANSACTION
---echo ========================================================================
---echo
+--echo # ========================================================================
+--echo #
--connection con1
SELECT @@global.tx_isolation;
SELECT @@global.autocommit;
@@ -97,30 +97,30 @@ SELECT @@tx_isolation;
SELECT @@autocommit;
SELECT @@binlog_format;
---echo
+--echo #
--echo # STEP 2.1 - START/COMMIT
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (101, 'COMMITTED');
COMMIT;
---echo
+--echo #
--echo # STEP 2.2 - ROLLBACK
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (102, 'ROLLED BACK');
ROLLBACK;
---echo
+--echo #
--echo ## Expect 1 committed and 1 rolled back transaction
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
CALL clear_transaction_tables();
---echo
+--echo #
--echo # STEP 2.3 - COMMIT AND CHAIN
---echo
+--echo #
--connection con1
START TRANSACTION;
INSERT INTO t1 VALUES (103, 'COMMIT AND CHAIN');
@@ -128,18 +128,18 @@ COMMIT AND CHAIN;
INSERT INTO t1 VALUES (104, 'COMMIT AND CHAIN');
COMMIT;
---echo
+--echo #
--echo ## Expect 2 committed transactions
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 2);
CALL clear_transaction_tables();
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 3 - ISOLATION LEVEL
---echo ========================================================================
---echo
---echo connection con1
+--echo # ========================================================================
+--echo #
+--echo # connection con1
--connection con1
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION;
@@ -167,7 +167,7 @@ COMMIT;
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
SET binlog_format= @binlog_save;
---echo
+--echo #
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'SERIALIZABLE', 'NO', 0, 0, 0, 1);
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
@@ -175,15 +175,15 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '',
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', 'READ UNCOMMITTED', 'NO', 0, 0, 0, 1);
CALL clear_transaction_tables();
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 4 - ACCESS MODE
---echo ========================================================================
+--echo # ========================================================================
--echo #
--echo # STEP 4.1 - READ ONLY, TIMING ENABLED
--echo #
---echo
---echo connection con1
+--echo #
+--echo # connection con1
--connection con1
SET SESSION TRANSACTION READ WRITE;
START TRANSACTION;
@@ -198,51 +198,51 @@ START TRANSACTION;
SELECT * FROM t1 ORDER BY s1;
COMMIT;
---echo
+--echo #
--echo ## Expect 1 read only, committed transaction in events_transactions_history
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ ONLY', 'REPEATABLE READ', 'NO', 0, 0, 0, 1);
CALL clear_transaction_tables();
---echo
+--echo #
--echo #
--echo # STEP 4.2 - READ ONLY, TIMING DISABLED
--echo #
---echo
+--echo #
--echo ## Disable timing stats for 'transaction'
UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
---echo
+--echo #
TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
---echo connection con1
+--echo # connection con1
--connection con1
START TRANSACTION;
SELECT * FROM t1 ORDER BY s1;
COMMIT;
---echo
+--echo #
SET SESSION TRANSACTION READ WRITE;
--connection default
---echo
+--echo #
--echo ## Expect 1 event, 0 stats
SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
---echo
+--echo #
--echo ## Restore setup_instruments
UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 5 - IMPLICIT START
---echo ========================================================================
+--echo # ========================================================================
--echo # When AUTOCOMMIT is disabled, the first statement following a committed
--echo # transaction marks the start of a new transaction. Subsequent statements will
--echo # be part of the transaction until it is committed.
---echo
+--echo #
--connection con1
SET SESSION AUTOCOMMIT = 0;
INSERT INTO t1 VALUES (501, 'IMPLICIT START');
---echo
+--echo #
--echo ## Expect 1 active transaction in events_transactions_current
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -251,25 +251,25 @@ CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', ''
INSERT INTO t1 VALUES (502, 'IMPLICIT START');
COMMIT;
---echo
+--echo #
--echo ## Expect one committed transaction in events_transactions_current and history
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
CALL clear_transaction_tables();
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 6 - IMPLICIT COMMIT (DDL, ETC)
---echo ========================================================================
+--echo # ========================================================================
--echo # Transactions are implicitly ended by DDL statements, locking statements
--echo # and server administration commands.
---echo
+--echo #
--connection con1
SET SESSION AUTOCOMMIT = 0;
INSERT INTO t1 VALUES (601, 'IMPLICIT COMMIT');
---echo
+--echo #
--echo ## Expect one active transaction in events_transactions_current, zero events in history
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -281,7 +281,7 @@ INSERT INTO t1 VALUES (602, 'IMPLICIT COMMIT');
--echo ## Issue a DDL statement to force a commmit
CREATE TABLE t2 (s1 INT, s2 VARCHAR(64)) ENGINE=INNODB;
---echo
+--echo #
--echo ## Expect 0 active transactions, 1 committed transaction
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 0);
@@ -290,54 +290,54 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '',
CALL clear_transaction_tables();
DROP TABLE test.t2;
---echo
---echo ========================================================================
---echo STEP 7 - XA TRANSACTIONS
---echo ========================================================================
+--echo #
+--echo # ========================================================================
+--echo # STEP 7 - XA TRANSACTIONS
+--echo # ========================================================================
--echo #
--echo # STEP 7.1 - XA START
--echo #
--connection con1
XA START 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
---echo
+--echo #
--echo ## Expect 1 active XA transaction, state ACTIVE
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'ACTIVE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
---echo
+--echo #
--echo # STEP 7.2 - XA END
---echo
+--echo #
--connection con1
INSERT INTO t1 VALUES (701, 'XA');
XA END 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
---echo
+--echo #
--echo ## Expect 1 active XA transaction, state IDLE
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'IDLE', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
---echo
+--echo #
--echo #
--echo # STEP 7.3 - XA PREPARE
--echo #
--connection con1
XA PREPARE 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
---echo
+--echo #
--echo ## Expect 1 active XA transaction, state PREPARED
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
---echo
+--echo #
--echo #
--echo # STEP 7.4 - XA COMMIT
--echo #
--connection con1
XA COMMIT 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 1234567890;
---echo
+--echo #
--echo ## Expect 1 committed XA transaction, state COMMITTED in current and history
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'XA_CON1_GTRID_001', 'XA_CON1_BQUAL_001', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -345,7 +345,7 @@ CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 123456
CALL clear_transaction_tables();
---echo
+--echo #
--echo #
--echo # STEP 7.5 - XA ROLLBACK
--echo #
@@ -355,7 +355,7 @@ INSERT INTO t1 VALUES (702, 'XA');
XA END 'XA_CON1_002';
XA PREPARE 'XA_CON1_002';
---echo
+--echo #
--echo ## Expect 1 active XA transaction, state PREPARED
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, 'XA_CON1_002', '', 'PREPARED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -363,7 +363,7 @@ CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, 'XA_CO
--connection con1
XA ROLLBACK 'XA_CON1_002';
---echo
+--echo #
--echo ## Expect 1 XA transaction, state ROLLBACK ONLY in current and history
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, 'XA_CON1_002', '', 'ROLLBACK ONLY', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -381,7 +381,7 @@ XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123','B
XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123','BQUAL_6789012345678901234567890123456789012345678901234567890123',1234567890;
---echo
+--echo #
--echo ## Expect 1 committed XA transaction, state COMMITTED in current and history
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', 'BQUAL_6789012345678901234567890123456789012345678901234567890123', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
@@ -397,18 +397,18 @@ INSERT INTO t1 VALUES (704, 'XA LONG/BINARY');
XA END 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
XA PREPARE 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
XA COMMIT 'GTRID_6789012345678901234567890123456789012345678901234567890123',0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233,1234567890;
---echo
+--echo #
--echo ## Expect 1 committed XA transaction, state COMMITTED in current and history
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', '0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 1234567890, 'GTRID_6789012345678901234567890123456789012345678901234567890123', '0x425155414C5FA5A53839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233', 'COMMITTED', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
CALL clear_transaction_tables();
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 8 - TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
---echo ========================================================================
---echo
+--echo # ========================================================================
+--echo #
--echo ## MariaDB bug: MDEV-6012? MDEV-14436?
set @mariadb_bug=1;
@@ -422,13 +422,13 @@ set @mariadb_bug=1;
SET SESSION AUTOCOMMIT = 0;
SELECT * FROM performance_schema.events_transactions_current ORDER BY event_id;
---echo
+--echo #
--echo #
--echo # STEP 8.1 - UPDATE NON-TRANSACTIONAL TABLE
--echo #
INSERT INTO nt1 VALUES (801, 'NON-TRANSACTIONAL');
---echo
+--echo #
--echo ## Expect 0 transactions in events_transactions_current
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
@@ -436,52 +436,52 @@ CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '',
--connection con1
COMMIT;
---echo
+--echo #
--echo ## Expect 0 transactions in events_transactions_history
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
---echo
+--echo #
--echo #
--echo # STEP 8.2 - UPDATE TRANSACTIONAL AND NON-TRANSACTIONAL TABLES
--echo #
---echo
+--echo #
--echo ## First non-transactional...
---echo
+--echo #
--connection con1
INSERT INTO nt1 VALUES (802, 'NON-TRANSACTIONAL');
---echo
+--echo #
--echo ## Expect 0 transactions in events_transactions_current
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', '', 0, '', '', '', '', '', '', '', 0, 0, 0, @mariadb_bug);
---echo
+--echo #
--echo ## Now transactional. Transaction should be started.
--connection con1
INSERT INTO t1 VALUES (802, 'TRANSACTIONAL');
---echo
+--echo #
--echo ## Expect 1 transaction in events_transactions_current
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
## Commit
---echo
+--echo #
--connection con1
COMMIT;
---echo
+--echo #
--echo ## Expect 1 committed transaction in events_transactions_current and history
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1+@mariadb_bug);
CALL clear_transaction_tables();
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 9 - SAVEPOINTS
---echo ========================================================================
+--echo # ========================================================================
--echo #
--echo # STEP 9.1 - SAVEPOINT 1
--echo #
@@ -490,12 +490,12 @@ START TRANSACTION;
INSERT INTO t1 VALUES (901, 'SAVEPOINT');
SAVEPOINT SVP001;
---echo
+--echo #
--echo ## Expect 1 active transaction with 1 savepoint
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 1, 0, 0, 1);
---echo
+--echo #
--echo #
--echo # STEP 9.2 - SAVEPOINTS 2 and 3
--echo #
@@ -507,26 +507,26 @@ SAVEPOINT SVP003;
INSERT INTO t1 VALUES (904, 'SAVEPOINT');
SELECT COUNT(*) FROM t1 WHERE s1 > 900;
---echo
+--echo #
--echo #
--echo # STEP 9.3 - ROLLBACK TO SAVEPOINT 2
--echo #
--connection con1
ROLLBACK TO SVP002;
---echo
+--echo #
--echo ## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 0, 1);
---echo
+--echo #
--echo #
--echo # STEP 9.4 - RELEASE SAVEPOINT 1
--echo #
--connection con1
RELEASE SAVEPOINT SVP001;
---echo
+--echo #
--echo ## Expect 1 active transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
--connection default
CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
@@ -537,50 +537,50 @@ CALL transaction_verifier(0, @con1_thread_id, 'transaction', 'ACTIVE', 0, '', ''
--connection con1
COMMIT;
---echo
+--echo #
--echo ## Expect 1 committed transaction with 3 savepoints, 1 rollback to savepoint, 1 release savepoint
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', 'READ WRITE', '', 'NO', 3, 1, 1, 1);
CALL clear_transaction_tables();
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 10 - GTIDs
---echo ========================================================================
---echo GTIDs are tested in transaction_gtid.test.
+--echo # ========================================================================
+--echo # GTIDs are tested in transaction_gtid.test.
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # STEP 11 - MISCELLANY
---echo ========================================================================
+--echo # ========================================================================
--echo #
--echo # STEP 11.1 - TRUNCATE DURING ACTIVE TRANSACTION
--echo #
---echo
+--echo #
--echo # Verify that truncating events_transactions_current during an active transaction
--echo # does not leave an orphaned transaction event, and that the row index to
--echo # events_transactions_history is reset to 0.
---echo
+--echo #
--connection con1
START TRANSACTION;
INSERT INTO t1 VALUES (1110, 'INSERT 1110');
--connection default
TRUNCATE performance_schema.events_transactions_current;
--connection con1
---echo
+--echo #
COMMIT;
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (1111, 'INSERT 1111');
COMMIT;
---echo
+--echo #
--echo ## Expect 1 transaction for connection 1
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', '', 0, 0, 0, 1);
CALL clear_transaction_tables();
---echo
+--echo #
--echo #
--echo # STEP 11.2 - DISABLE THREAD INSTRUMENTATION
--echo #
@@ -588,49 +588,49 @@ CALL clear_transaction_tables();
UPDATE performance_schema.setup_consumers
SET enabled = 'NO'
WHERE name = 'thread_instrumentation';
---echo
+--echo #
TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
--connection con1
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (1120, 'INSERT 1120');
COMMIT;
--connection default
---echo
+--echo #
--echo ## Expect 1 event with non-zero summary stats
--replace_column 3 sum_timer_wait 4 min_timer_wait 5 avg_timer_wait
SELECT EVENT_NAME, COUNT_STAR, SUM_TIMER_WAIT, MIN_TIMER_WAIT, AVG_TIMER_WAIT, COUNT_READ_WRITE
FROM performance_schema.events_transactions_summary_global_by_event_name
WHERE count_star = 1 and sum_timer_wait != 0;
---echo
+--echo #
--echo ## Disable timing stats for 'transaction'
UPDATE performance_schema.setup_instruments SET timed = 'NO' WHERE name = 'transaction';
---echo
+--echo #
TRUNCATE performance_schema.events_transactions_summary_global_by_event_name;
--connection default
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (1121, 'INSERT 1121');
COMMIT;
--connection default
---echo
+--echo #
--echo ## Expect 1 event, 0 stats
SELECT * FROM performance_schema.events_transactions_summary_global_by_event_name;
---echo
+--echo #
--echo ## Restore setup_consumers and setup_instruments
UPDATE performance_schema.setup_consumers SET enabled = 'YES' WHERE name = 'thread_instrumentation';
UPDATE performance_schema.setup_instruments SET enabled = 'YES' WHERE name = 'transaction';
---echo
+--echo #
DELETE FROM t1;
CALL clear_history();
---echo
+--echo #
--echo #
--echo # STEP 11.3 - STATEMENT ROLLBACK - AUTOCOMMIT OFF - BINLOG FORMAT 'STATEMENT'
--echo #
@@ -643,28 +643,28 @@ SET SESSION AUTOCOMMIT = 0;
# Force a statement rollback by attempting to update a transactional table
# and a non-replicatable table with binlog_format = STATEMENT.
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (1130, 'INSERT 1130');
---echo
+--echo #
--echo ## Expect binlog statement mode error
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
UPDATE t1, performance_schema.setup_instruments pfs
SET t1.s1 = 1, pfs.timed = 'NO';
---echo
+--echo #
COMMIT;
---echo
+--echo #
SET SESSION AUTOCOMMIT = 1;
---echo
+--echo #
--echo ## Expect 1 committed transaction
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'COMMITTED', 0, '', '', '', '', '', '', 'NO', 0, 0, 0, 1);
---echo
+--echo #
DELETE FROM t1;
CALL clear_history();
---echo
+--echo #
--echo #
--echo # STEP 11.4 - STATEMENT ROLLBACK - AUTOCOMMIT ON - BINLOG FORMAT 'STATEMENT'
--echo #
@@ -676,13 +676,13 @@ SET SESSION AUTOCOMMIT = 1;
#
# Force a statement rollback by attempting to update a transactional table
# and a non-replicatable table with binlog_format = STATEMENT.
---echo
+--echo #
--echo ## Expect binlog statement mode error
--error 0, ER_BINLOG_STMT_MODE_AND_NO_REPL_TABLES
UPDATE t1, performance_schema.setup_instruments pfs
SET t1.s1 = 1, pfs.timed = 'NO';
---echo
+--echo #
--echo ## Expect 1 rolled back transaction
--connection default
CALL transaction_verifier(1, @con1_thread_id, 'transaction', 'ROLLED BACK', 0, '', '', '', '', '', '', 'YES', 0, 0, 0, 1);
@@ -690,26 +690,26 @@ CALL clear_history();
--disable_parsing
# TODO: Add wait timer
---echo
+--echo #
--echo #
--echo # STEP 11.5 - DROPPED CONNECTION DURING TRANSACTION
--echo #
--connection con2
START TRANSACTION;
INSERT INTO t1 VALUES (1150, 'DROP CONNECTION');
---echo
+--echo #
--echo ## Expect 1 active transaction for connection 2
--connection default
CALL transaction_verifier(0, @con2_thread_id, 'transaction', 'ACTIVE', 0, '', '', '', '', 'READ WRITE', '', 'NO', 0, 0, 0, 1);
---echo
+--echo #
--echo ## Drop connection
--connection con2
--disconnect con2
--source include/wait_until_disconnected.inc
--connection default
---echo
+--echo #
--echo ## Expect 0 transactions for connection 2
CALL transaction_verifier(0, @con2_thread_id, '', '', 0, '', '', '', '', '', '', '', 0, 0, 0, 0);
CALL transaction_verifier(1, @con2_thread_id, '', '', 0, '', '', '', '', '', '', '', 0, 0, 0, 0);
@@ -717,11 +717,11 @@ CALL clear_transaction_tables();
--enable_parsing
---echo
---echo ========================================================================
+--echo #
+--echo # ========================================================================
--echo # CLEAN UP
---echo ========================================================================
---echo
+--echo # ========================================================================
+--echo #
--disconnect con1
##--disconnect con2
diff --git a/mysql-test/suite/perfschema/t/transaction_gtid.test b/mysql-test/suite/perfschema/t/transaction_gtid.test
index 450d799880d..c97c042b943 100644
--- a/mysql-test/suite/perfschema/t/transaction_gtid.test
+++ b/mysql-test/suite/perfschema/t/transaction_gtid.test
@@ -57,7 +57,7 @@
--let $rpl_server_count= 1
--source include/rpl_init.inc
---echo ==== Configure ====
+--echo # ==== Configure ====
--connection default
@@ -75,7 +75,7 @@ CREATE TABLE t1 (a INT);
--let $auxiliary_file= suite/perfschema/include/show_transaction_gtid.inc
--let $quiet= 1
---echo ==== Test ====
+--echo # ==== Test ====
--let $n= 1
while ($n <= 4) {
@@ -182,7 +182,7 @@ while ($n <= 4) {
--inc $n
}
---echo ==== Clean up ====
+--echo # ==== Clean up ====
DROP TABLE t1;
# DROP TABLE t_1, t_2, t_3, t_4;
diff --git a/mysql-test/suite/perfschema/t/transaction_nested_events.test b/mysql-test/suite/perfschema/t/transaction_nested_events.test
index 9d441b5d2c3..c6cab52525b 100644
--- a/mysql-test/suite/perfschema/t/transaction_nested_events.test
+++ b/mysql-test/suite/perfschema/t/transaction_nested_events.test
@@ -17,27 +17,27 @@
--source ../include/transaction_setup.inc
--enable_query_log
---echo
+--echo #
--echo #========================================================================
--echo # STEP 1 - SETUP
--echo #========================================================================
---echo
+--echo #
--echo ## Setup control thread
---echo
+--echo #
--connection default
SET SESSION AUTOCOMMIT= 1;
--disable_warnings
USE test;
DROP DATABASE IF EXISTS db;
--enable_warnings
---echo
+--echo #
--echo ## Create test database, test tables, one transactional and one non-transactional
CREATE DATABASE db;
CREATE TABLE db.t1 (s1 int, s2 varchar(64)) ENGINE=INNODB;
CREATE TABLE db.nt1 (s1 int, s2 varchar(64)) ENGINE=MYISAM;
---echo
+--echo #
--echo ## Setup connection 1
connect(con1, localhost, root,,);
USE db;
@@ -50,24 +50,24 @@ let $con1_thread_id= `SELECT @my_thread_id`;
eval SET @con1_thread_id= $con1_thread_id;
--enable_query_log
---echo
+--echo #
--echo ## Disable events from the control (default) connection
UPDATE performance_schema.threads SET instrumented = 'NO' WHERE processlist_id = CONNECTION_ID();
# Use this to select events from all threads
eval SET @all_threads= 0;
---echo
+--echo #
--echo ## Enable only transaction and statement instruments
UPDATE performance_schema.setup_instruments SET enabled='NO', timed='NO';
UPDATE performance_schema.setup_instruments SET enabled='YES'
WHERE name LIKE ('statement/%') OR name = 'transaction';
---echo
+--echo #
--echo ## Clear statement and transaction history
CALL test.clear_history();
---echo
+--echo #
--echo #========================================================================
--echo # STEP 2 - BASIC TRANSACTION
--echo #========================================================================
@@ -103,7 +103,7 @@ COMMIT;
--echo #
--connection con1
CREATE PROCEDURE tp_update() UPDATE t1 SET s1 = s1 + 1;
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (310, "INSERT 310");
INSERT INTO t1 VALUES (311, "INSERT 311");
@@ -120,12 +120,12 @@ COMMIT;
--echo #
--connection con1
CREATE PROCEDURE tp_start() START TRANSACTION;
---echo
+--echo #
CALL tp_start();
INSERT INTO t1 VALUES (320, "INSERT 320"),(321, "INSERT 321");
INSERT INTO t1 VALUES (322, "INSERT 322"),(323, "INSERT 323");
UPDATE t1 SET s1 = s1 + 1 WHERE s1 > 320;
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
COMMIT;
@@ -139,22 +139,22 @@ COMMIT;
CREATE PROCEDURE tp_rollback() ROLLBACK;
CREATE PROCEDURE tp_commit() COMMIT;
---echo
+--echo #
--echo ## COMMIT within stored procedure
START TRANSACTION;
INSERT INTO t1 VALUES (330, "INSERT 330"),(331, "INSERT 331");
INSERT INTO t1 VALUES (332, "INSERT 332"),(333, "INSERT 333");
DELETE FROM t1 WHERE s1 > 331;
CALL tp_commit();
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
---echo
+--echo #
--echo ## ROLLBACK within stored procedure
START TRANSACTION;
UPDATE t1 SET s1 = s1*2 WHERE s1 > 331;
CALL tp_rollback();
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
## Verify and reset
@@ -163,7 +163,7 @@ SELECT * FROM t1 ORDER BY s1;
--echo #========================================================================
--echo # STEP 4 - TRANSACTIONS AND STORED FUNCTIONS
--echo #========================================================================
---echo
+--echo #
--echo #
--echo # STEP 4.1 - FUNCTION WITHIN A TRANSACTION
--echo #
@@ -176,38 +176,38 @@ RETURN x+y;
END |
DELIMITER ;|
---echo
+--echo #
--echo ## Clear history
--connection default
CALL test.clear_history();
--connection con1
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (410, "INSERT 410");
INSERT INTO t1 VALUES (411, "INSERT 411");
INSERT INTO t1 VALUES (412, "INSERT 412");
DELETE FROM t1 WHERE s1 > 410;
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
---echo
+--echo #
SELECT fn_add(413, 414);
COMMIT;
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
## Verify and reset
--source ../include/transaction_nested_events_verifier.inc
--connection con1
---echo
+--echo #
--echo ## Again, but this time with a rollback
---echo
+--echo #
START TRANSACTION;
SELECT fn_add(415, 416);
---echo
+--echo #
ROLLBACK;
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
## Verify and reset
@@ -222,57 +222,57 @@ DELIMITER |;
CREATE FUNCTION fn_err1() RETURNS VARCHAR(10) BEGIN START TRANSACTION ; RETURN 'invalid' ; END|
DELIMITER ;|
---echo
+--echo #
--echo ## Expect 0 transactions
--connection default
SELECT COUNT(*) FROM performance_schema.events_transactions_history;
--connection con1
---echo
+--echo #
--echo ## Expect stored function does not exist
---echo
+--echo #
--error ER_SP_DOES_NOT_EXIST
SELECT fn_err1();
---echo
+--echo #
--echo ## Expect 0 transactions
--connection default
SELECT COUNT(*) FROM performance_schema.events_transactions_history;
--connection con1
---echo
+--echo #
DELIMITER |;
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
CREATE FUNCTION fn_err2() RETURNS VARCHAR(10) BEGIN COMMIT; RETURN 'invalid' ; END|
DELIMITER ;|
---echo
+--echo #
--echo ## Expect stored function does not exist
---echo
+--echo #
START TRANSACTION;
DELETE FROM t1 WHERE s1 > 320;
--error ER_SP_DOES_NOT_EXIST
SELECT fn_err2();
---echo
+--echo #
--echo ## Expect 0 transactions
--connection default
SELECT COUNT(*) FROM performance_schema.events_transactions_history;
---echo
+--echo #
--echo ## Clear transaction and statement tables
CALL test.clear_history();
--echo #========================================================================
--echo # STEP 5 - TRANSACTIONS AND TRIGGERS
--echo #========================================================================
---echo
+--echo #
--echo #
--echo # STEP 5.1 - FORCE STATEMENT ROLLBACK FROM TRIGGER
--echo #
--connection con1
--echo ## Create a trigger to force statement rollback
---echo
+--echo #
DELIMITER |;
CREATE TRIGGER trigger_before_update BEFORE UPDATE ON t1
FOR EACH ROW
@@ -283,16 +283,16 @@ BEGIN
END;|
DELIMITER ;|
---echo
+--echo #
--echo ## Clear history
--connection default
CALL test.clear_history();
--connection con1
---echo
+--echo #
--echo ## Insert multiple rows, then update. Trigger will force rollback the
--echo ## UPDATE statement, but the transaction should not roll back.
---echo
+--echo #
START TRANSACTION;
INSERT INTO t1 VALUES (500, "INSERT 500");
INSERT INTO t1 VALUES (501, "INSERT 501");
@@ -300,19 +300,19 @@ INSERT INTO t1 VALUES (502, "INSERT 502");
INSERT INTO t1 VALUES (503, "INSERT 503");
INSERT INTO t1 VALUES (504, "INSERT 504");
INSERT INTO t1 VALUES (505, "INSERT 505");
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
---echo
+--echo #
--echo ## Expect error when UPDATE hits record 505
---echo
+--echo #
--error ER_SIGNAL_EXCEPTION
UPDATE t1 SET s1 = s1 * 2 WHERE s1 >= 500;
---echo
+--echo #
--echo ## Verify that INSERT succeeded, UPDATE failed and transaction did not rollback
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
COMMIT;
---echo
+--echo #
DROP TRIGGER trigger_before_update;
## Verify and reset
@@ -328,9 +328,9 @@ DROP TRIGGER trigger_before_update;
# Check that the event_scheduler is really running
#--source include/running_event_scheduler.inc
---echo
+--echo #
--echo ## Create a one-time event that will insert, update, commit and rollback.
---echo
+--echo #
DELIMITER |;
CREATE EVENT trx_event ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 5 SECOND DO
BEGIN
@@ -348,23 +348,23 @@ BEGIN
END;|
DELIMITER ;|
---echo
+--echo #
--echo ## Clear history
--connection default
CALL test.clear_history();
--connection con1
---echo
+--echo #
--echo ## Wait a few seconds for scheduled event to execute and finish.
# Check based on the expected content in t1.
let $wait_condition= SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
---echo
+--echo #
--echo ## Confirm that the scheduled event completed and the content of t1 is right.
---echo
+--echo #
SELECT * FROM t1 ORDER BY s1;
---echo
+--echo #
--echo ## Verify and reset
---echo
+--echo #
eval SET @all_threads= 1;
--source ../include/transaction_nested_events_verifier.inc
eval SET @all_threads= 0;