1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge branch '10.6' into 10.11

This commit is contained in:
Sergei Golubchik
2024-04-22 11:00:03 +02:00
418 changed files with 7074 additions and 2930 deletions

View File

@ -274,7 +274,6 @@ execute dump_users;
execute dump_hosts;
--disconnect con1
--disconnect con5
--connection default
@ -283,6 +282,8 @@ let $wait_condition=
select count(*) = 0 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user1';
--source include/wait_condition.inc
--disconnect con5
let $wait_condition=
select count(*) = 1 from performance_schema.threads
where `TYPE`='FOREGROUND' and PROCESSLIST_USER= 'user4';

View File

@ -32,7 +32,7 @@ SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
DELIMITER |;
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -2507,8 +2507,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -2507,8 +2507,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -1903,8 +1903,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -1653,8 +1653,8 @@ user4 2 2
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -1343,8 +1343,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -1093,8 +1093,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -2257,8 +2257,8 @@ user4 2 2
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -1947,8 +1947,8 @@ execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
localhost 6 6
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -1697,8 +1697,8 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
execute dump_hosts;
HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
disconnect con1;
disconnect con5;
connection default;
disconnect con5;
"================== con1/con5 disconnected =================="
"================== Step 10 =================="
call dump_thread();

View File

@ -94,7 +94,7 @@ test t_60905 NULL 5 5 0 1
DROP TABLE t_60905;
show global variables like "performance_schema_max_thread_instances";
Variable_name Value
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
explain select * from performance_schema.threads;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE threads ALL NULL NULL NULL NULL 256

View File

@ -261,7 +261,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -63,7 +63,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 1
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 0
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 0

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 0
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 0
performance_schema_max_table_lock_stat 0
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 0
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 0
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
@ -188,7 +188,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -141,7 +141,7 @@ performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_table_lock_stat 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 200
performance_schema_max_thread_instances 400
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100

View File

@ -145,7 +145,7 @@ Bollywood
# Event
SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|
@ -165,7 +165,7 @@ statement/sql/call_procedure CALL SampleProc1(30,40,50) NULL NULL 0
statement/sql/call_procedure CALL SampleProc2("Jwalamukhi",34) NULL NULL 0
statement/sql/call_procedure CALL SampleProc3() NULL NULL 0
statement/sql/call_procedure CALL SampleProc4() NULL NULL 0
statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END NULL NULL 0

View File

@ -145,7 +145,7 @@ Bollywood
# Event
SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|
@ -182,7 +182,7 @@ statement/sql/call_procedure CALL SampleProc1(30,40,50) stored_programs NULL NUL
statement/sql/call_procedure CALL SampleProc2("Jwalamukhi",34) stored_programs NULL NULL NULL NULL 0
statement/sql/call_procedure CALL SampleProc3() stored_programs NULL NULL NULL NULL 0
statement/sql/call_procedure CALL SampleProc4() stored_programs NULL NULL NULL NULL 0
statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
statement/sql/create_event CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END stored_programs NULL NULL NULL NULL 0
@ -553,7 +553,7 @@ Bollywood
# Event
SET GLOBAL event_scheduler=ON;
CREATE TABLE table_t(a INT);
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND DO
CREATE EVENT e1 ON SCHEDULE EVERY 2 SECOND ON COMPLETION NOT PRESERVE DO
BEGIN
INSERT INTO table_t VALUES(1);
END|

View File

@ -24,27 +24,22 @@ events_waits_history_long YES
global_instrumentation YES
thread_instrumentation YES
statements_digest YES
# Switch to (con1, localhost, user1, , )
connect con1, localhost, user1, , ;
update performance_schema.threads
set INSTRUMENTED='YES', HISTORY='YES'
where PROCESSLIST_ID = connection_id();
# Switch to (con2, localhost, user2, , )
connect con2, localhost, user2, , ;
update performance_schema.threads
set INSTRUMENTED='YES', HISTORY='NO'
where PROCESSLIST_ID = connection_id();
# Switch to (con3, localhost, user3, , )
connect con3, localhost, user3, , ;
update performance_schema.threads
set INSTRUMENTED='NO', HISTORY='YES'
where PROCESSLIST_ID = connection_id();
# Switch to (con4, localhost, user4, , )
connect con4, localhost, user4, , ;
update performance_schema.threads
set INSTRUMENTED='NO', HISTORY='NO'
where PROCESSLIST_ID = connection_id();
# Switch to connection default
connection default;
truncate table performance_schema.events_transactions_current;
truncate table performance_schema.events_transactions_history;
@ -58,7 +53,6 @@ truncate table performance_schema.events_stages_history_long;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
# Switch to connection con1
connection con1;
XA START 'XA_CON1', 'XA_BQUAL', 12;
select "Hi from con1";
@ -67,7 +61,6 @@ Hi from con1
XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
# Switch to connection con2
connection con2;
XA START 'XA_CON2', 'XA_BQUAL', 12;
select "Hi from con2";
@ -76,7 +69,6 @@ Hi from con2
XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
# Switch to connection con3
connection con3;
XA START 'XA_CON3', 'XA_BQUAL', 12;
select "Hi from con3";
@ -85,7 +77,6 @@ Hi from con3
XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
# Switch to connection con4
connection con4;
XA START 'XA_CON4', 'XA_BQUAL', 12;
select "Hi from con4";
@ -95,72 +86,124 @@ XA END 'XA_CON4', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
connection default;
"=========================== Transactions user 1"
########################### Transactions user 1 - 1
select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
"=========================== Transactions user 2"
########################### Transactions user 2 - 1
select /*2-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON2 XA_BQUAL
select /*2-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Transactions user 3"
########################### Transactions user 3 - 1
select /*3-1*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Transactions user 4"
########################### Transactions user 4 - 1
select /*4-1*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Statements user 1"
########################### Statements user 1 - 1
select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
"=========================== Statements user 2"
########################### Statements user 2 - 1
select /*2-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
select /*2-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Statements user 3"
########################### Statements user 3 - 1
select /*3-1*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Statements user 4"
########################### Statements user 4 - 1
select /*4-1*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Stages user 1"
########################### Stages user 1 - 1
select /*1-1*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/Starting cleanup
stage/sql/Freeing items
@ -172,6 +215,8 @@ stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/starting
stage/sql/Query end
@ -215,55 +260,96 @@ stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
"=========================== Stages user 2"
########################### Stages user 2 - 1
select /*2-1*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
select /*2-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Stages user 3"
########################### Stages user 3 - 1
select /*3-1*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Stages user 4"
########################### Stages user 4 - 1
select /*4-1*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Waits user 1"
########################### Waits user 1 - 1
select /*1-1*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
select /*1-1*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
has_waits
1
select /*1-1*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
has_waits
1
"=========================== Waits user 2"
########################### Waits user 2 - 1
select /*2-1*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
select /*2-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Waits user 3"
########################### Waits user 3 - 1
select /*3-1*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Waits user 4"
########################### Waits user 4 - 1
select /*4-1*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
# Switch to connection default, disable consumers
connection default;
update performance_schema.setup_consumers
set enabled='NO' where name like "%history%";
@ -296,7 +382,6 @@ truncate table performance_schema.events_stages_history_long;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
# Switch to connection con1
connection con1;
XA START 'XA_CON1', 'XA_BQUAL', 12;
select "Hi from con1";
@ -305,7 +390,6 @@ Hi from con1
XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
# Switch to connection con2
connection con2;
XA START 'XA_CON2', 'XA_BQUAL', 12;
select "Hi from con2";
@ -314,7 +398,6 @@ Hi from con2
XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
# Switch to connection con3
connection con3;
XA START 'XA_CON3', 'XA_BQUAL', 12;
select "Hi from con3";
@ -323,7 +406,6 @@ Hi from con3
XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
# Switch to connection con4
connection con4;
XA START 'XA_CON4', 'XA_BQUAL', 12;
select "Hi from con4";
@ -333,117 +415,212 @@ XA END 'XA_CON4', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
connection default;
"=========================== Transactions user 1"
########################### Transactions user 1 - 2
select /*1-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
select /*1-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
count(*)
0
select /*1-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
count(*)
0
"=========================== Transactions user 2"
########################### Transactions user 2 - 2
select /*2-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON2 XA_BQUAL
select /*2-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Transactions user 3"
########################### Transactions user 3 - 2
select /*3-2*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Transactions user 4"
########################### Transactions user 4 - 2
select /*4-2*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Statements user 1"
########################### Statements user 1 - 2
select /*1-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
select /*1-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id;
count(*)
0
select /*1-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id;
count(*)
0
"=========================== Statements user 2"
########################### Statements user 2 - 2
select /*2-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
select /*2-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Statements user 3"
########################### Statements user 3 - 2
select /*3-2*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Statements user 4"
########################### Statements user 4 - 2
select /*4-2*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Stages user 1"
########################### Stages user 1 - 2
select /*1-2*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
select /*1-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id;
count(*)
0
select /*1-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id;
count(*)
0
"=========================== Stages user 2"
########################### Stages user 2 - 2
select /*2-2*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
select /*2-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Stages user 3"
########################### Stages user 3 - 2
select /*3-2*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Stages user 4"
########################### Stages user 4 - 2
select /*4-2*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Waits user 1"
########################### Waits user 1 - 2
select /*1-2*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
has_waits
0
select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
has_waits
0
"=========================== Waits user 2"
########################### Waits user 2 - 2
select /*2-2*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
select /*2-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Waits user 3"
########################### Waits user 3 - 2
select /*3-2*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Waits user 4"
########################### Waits user 4 - 2
select /*4-2*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
# Switch to connection default, enable consumers
connection default;
update performance_schema.setup_consumers
set enabled='YES' where name like "%history%";
@ -476,7 +653,6 @@ truncate table performance_schema.events_stages_history_long;
truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
# Switch to connection con1
connection con1;
XA START 'XA_CON1', 'XA_BQUAL', 12;
select "Hi from con1";
@ -485,7 +661,6 @@ Hi from con1
XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
# Switch to connection con2
connection con2;
XA START 'XA_CON2', 'XA_BQUAL', 12;
select "Hi from con2";
@ -494,7 +669,6 @@ Hi from con2
XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
# Switch to connection con3
connection con3;
XA START 'XA_CON3', 'XA_BQUAL', 12;
select "Hi from con3";
@ -503,7 +677,6 @@ Hi from con3
XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
# Switch to connection con4
connection con4;
XA START 'XA_CON4', 'XA_BQUAL', 12;
select "Hi from con4";
@ -513,72 +686,124 @@ XA END 'XA_CON4', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON4', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
connection default;
"=========================== Transactions user 1"
########################### Transactions user 1 - 3
select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON1 XA_BQUAL
"=========================== Transactions user 2"
########################### Transactions user 2 - 3
select /*2-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
XID_FORMAT_ID XID_GTRID XID_BQUAL
12 XA_CON2 XA_BQUAL
select /*2-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Transactions user 3"
########################### Transactions user 3 - 3
select /*3-3*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Transactions user 4"
########################### Transactions user 4 - 3
select /*4-3*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Statements user 1"
########################### Statements user 1 - 3
select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_start XA START 'XA_CON1', 'XA_BQUAL', 12
statement/sql/select select "Hi from con1"
statement/sql/xa_end XA END 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_prepare XA PREPARE 'XA_CON1', 'XA_BQUAL', 12
statement/sql/xa_commit XA COMMIT 'XA_CON1', 'XA_BQUAL', 12
"=========================== Statements user 2"
########################### Statements user 2 - 3
select /*2-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME SQL_TEXT
statement/sql/xa_commit XA COMMIT 'XA_CON2', 'XA_BQUAL', 12
select /*2-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Statements user 3"
########################### Statements user 3 - 3
select /*3-3*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Statements user 4"
########################### Statements user 4 - 3
select /*4-3*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Stages user 1"
########################### Stages user 1 - 3
select /*1-3*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/Starting cleanup
stage/sql/Freeing items
@ -590,6 +815,8 @@ stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
stage/sql/starting
stage/sql/Query end
@ -633,55 +860,96 @@ stage/sql/Query end
stage/sql/Starting cleanup
stage/sql/Freeing items
stage/sql/Reset for next command
"=========================== Stages user 2"
########################### Stages user 2 - 3
select /*2-3*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
select /*2-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Stages user 3"
########################### Stages user 3 - 3
select /*3-3*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Stages user 4"
########################### Stages user 4 - 3
select /*4-3*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
"=========================== Waits user 1"
########################### Waits user 1 - 3
select /*1-3*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
select /*1-3*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
has_waits
1
select /*1-3*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
has_waits
1
"=========================== Waits user 2"
########################### Waits user 2 - 3
select /*2-3*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
EVENT_NAME
idle
select /*2-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
count(*)
0
select /*2-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
count(*)
0
"=========================== Waits user 3"
########################### Waits user 3 - 3
select /*3-3*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
count(*)
0
select /*3-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
count(*)
0
"=========================== Waits user 4"
########################### Waits user 4 - 3
select /*4-3*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
count(*)
0
select /*4-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
count(*)
0
# Switch to connection default
connection default;
revoke all privileges, grant option from user1@localhost;
revoke all privileges, grant option from user2@localhost;

View File

@ -14,7 +14,7 @@ let $error_log= $MYSQLTEST_VARDIR/log/my_restart.err;
let SEARCH_FILE= $error_log;
# Stop the server
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
--exec echo "wait" > $restart_file
--write_line wait $restart_file
--shutdown_server
--source include/wait_until_disconnected.inc
--error 7
@ -62,7 +62,7 @@ let SEARCH_PATTERN= Can.t change dir to .*bad_option_h_param;
--remove_file $error_log
# Write file to make mysql-test-run.pl start up the server again
--exec echo "restart" > $restart_file
--write_line restart $restart_file
# Turn on reconnect
--enable_reconnect

View File

@ -175,6 +175,7 @@ DROP TABLE t_60905;
#
show global variables like "performance_schema_max_thread_instances";
replace_result 512 256;
explain select * from performance_schema.threads;
#

View File

@ -23,7 +23,7 @@ DROP TABLE performance_schema.processlist;
SHOW CREATE TABLE performance_schema.processlist;
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
--exec echo "wait" > $restart_file
--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@ -93,7 +93,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--error ER_BAD_FIELD_ERROR
SHOW PROCESSLIST;
--exec echo "wait" > $restart_file
--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@ -166,7 +166,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
# Works and returns no data, innodb table is empty.
SHOW PROCESSLIST;
--exec echo "wait" > $restart_file
--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@ -231,7 +231,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
# Works and returns no data, innodb table is empty.
SHOW PROCESSLIST;
--exec echo "wait" > $restart_file
--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##
@ -306,7 +306,7 @@ SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
--replace_column 3 [HOST:PORT] 6 [TIME]
SHOW PROCESSLIST;
--exec echo "wait" > $restart_file
--write_line wait $restart_file
--echo ##
--echo ## Server shutdown
--echo ##

View File

@ -69,7 +69,7 @@ SELECT * FROM performance_schema.setup_instruments
WHERE name like "%wait/io/table/sql/handler%";
# Write file to make mysql-test-run.pl wait for the server to stop
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Restart the server
--echo #
@ -79,7 +79,7 @@ WHERE name like "%wait/io/table/sql/handler%";
--echo # Restart server with wait/io/table/sql/handler disabled
--exec echo "restart:--loose-performance-schema-instrument=%wait/io/table/sql/%=off" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--write_line "restart:--loose-performance-schema-instrument=%wait/io/table/sql/%=off" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Turn on reconnect
--echo # Enable reconnect

View File

@ -19,10 +19,10 @@
--source include/have_perfschema.inc
let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
--exec echo "wait" > $restart_file
--write_line wait $restart_file
--shutdown_server
--source include/wait_until_disconnected.inc
--exec echo "restart:--performance_schema_max_program_instances=7 --performance_schema_max_statement_stack=2 --thread_stack=655360">$restart_file
--write_line "restart:--performance_schema_max_program_instances=7 --performance_schema_max_statement_stack=2 --thread_stack=655360" $restart_file
--enable_reconnect
--source include/wait_until_connected_again.inc

View File

@ -23,7 +23,6 @@ flush privileges;
select * from performance_schema.setup_consumers;
--echo # Switch to (con1, localhost, user1, , )
connect (con1, localhost, user1, , );
update performance_schema.threads
@ -33,7 +32,6 @@ update performance_schema.threads
let $con1_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
--echo # Switch to (con2, localhost, user2, , )
connect (con2, localhost, user2, , );
update performance_schema.threads
@ -43,7 +41,6 @@ update performance_schema.threads
let $con2_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
--echo # Switch to (con3, localhost, user3, , )
connect (con3, localhost, user3, , );
update performance_schema.threads
@ -53,7 +50,6 @@ update performance_schema.threads
let $con3_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
--echo # Switch to (con4, localhost, user4, , )
connect (con4, localhost, user4, , );
update performance_schema.threads
@ -63,7 +59,6 @@ update performance_schema.threads
let $con4_thread_id= `select THREAD_ID from performance_schema.threads
where PROCESSLIST_ID = connection_id()`;
--echo # Switch to connection default
--connection default
truncate table performance_schema.events_transactions_current;
@ -79,7 +74,6 @@ truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
--echo # Switch to connection con1
--connection con1
XA START 'XA_CON1', 'XA_BQUAL', 12;
@ -88,7 +82,6 @@ XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
--echo # Switch to connection con2
--connection con2
XA START 'XA_CON2', 'XA_BQUAL', 12;
@ -97,7 +90,6 @@ XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
--echo # Switch to connection con3
--connection con3
XA START 'XA_CON3', 'XA_BQUAL', 12;
@ -106,7 +98,6 @@ XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
--echo # Switch to connection con4
--connection con4
XA START 'XA_CON4', 'XA_BQUAL', 12;
@ -117,165 +108,150 @@ XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
--connection default
--disable_query_log
echo ########################### Transactions user 1 - 1;
echo "=========================== Transactions user 1";
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
evalp select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
evalp select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
evalp select /*1-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Transactions user 2";
echo ########################### Transactions user 2 - 1;
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
evalp select /*2-1*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*2-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*2-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Transactions user 3";
echo ########################### Transactions user 3 - 1;
eval select count(*) from performance_schema.events_transactions_current
evalp select /*3-1*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*3-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*3-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Transactions user 4";
echo ########################### Transactions user 4 - 1;
eval select count(*) from performance_schema.events_transactions_current
evalp select /*4-1*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*4-1*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*4-1*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Statements user 1";
echo ########################### Statements user 1 - 1;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
evalp select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
echo "=========================== Statements user 2";
echo ########################### Statements user 2 - 1;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_statements_history
evalp select /*2-1*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*2-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Statements user 3";
echo ########################### Statements user 3 - 1;
eval select count(*) from performance_schema.events_statements_current
evalp select /*3-1*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_statements_history
evalp select /*3-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*3-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Statements user 4";
echo ########################### Statements user 4 - 1;
eval select count(*) from performance_schema.events_statements_current
evalp select /*4-1*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_statements_history
evalp select /*4-1*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*4-1*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Stages user 1";
echo ########################### Stages user 1 - 1;
eval select EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
evalp select /*1-1*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-1*/ EVENT_NAME from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
echo "=========================== Stages user 2";
echo ########################### Stages user 2 - 1;
eval select EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_stages_history
evalp select /*2-1*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*2-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Stages user 3";
echo ########################### Stages user 3 - 1;
eval select count(*) from performance_schema.events_stages_current
evalp select /*3-1*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_stages_history
evalp select /*3-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*3-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Stages user 4";
echo ########################### Stages user 4 - 1;
eval select count(*) from performance_schema.events_stages_current
evalp select /*4-1*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_stages_history
evalp select /*4-1*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*4-1*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Waits user 1";
echo ########################### Waits user 1 - 1;
eval select EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select (count(*) > 5) as has_waits from performance_schema.events_waits_history
evalp select /*1-1*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-1*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
eval select (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
evalp select /*1-1*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Waits user 2";
echo ########################### Waits user 2 - 1;
eval select EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_waits_history
evalp select /*2-1*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*2-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Waits user 3";
echo ########################### Waits user 3 - 1;
eval select count(*) from performance_schema.events_waits_current
evalp select /*3-1*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_waits_history
evalp select /*3-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*3-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Waits user 4";
echo ########################### Waits user 4 - 1;
eval select count(*) from performance_schema.events_waits_current
evalp select /*4-1*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_waits_history
evalp select /*4-1*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*4-1*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
--enable_query_log
--echo # Switch to connection default, disable consumers
--connection default
update performance_schema.setup_consumers
@ -296,7 +272,6 @@ truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
--echo # Switch to connection con1
--connection con1
XA START 'XA_CON1', 'XA_BQUAL', 12;
@ -305,7 +280,6 @@ XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
--echo # Switch to connection con2
--connection con2
XA START 'XA_CON2', 'XA_BQUAL', 12;
@ -314,7 +288,6 @@ XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
--echo # Switch to connection con3
--connection con3
XA START 'XA_CON3', 'XA_BQUAL', 12;
@ -323,7 +296,6 @@ XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
--echo # Switch to connection con4
--connection con4
XA START 'XA_CON4', 'XA_BQUAL', 12;
@ -334,161 +306,150 @@ XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
--connection default
--disable_query_log
echo ########################### Transactions user 1 - 2;
echo "=========================== Transactions user 1";
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
evalp select /*1-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*1-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*1-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Transactions user 2";
echo ########################### Transactions user 2 - 2;
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
evalp select /*2-2*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*2-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*2-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Transactions user 3";
echo ########################### Transactions user 3 - 2;
eval select count(*) from performance_schema.events_transactions_current
evalp select /*3-2*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*3-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*3-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Transactions user 4";
echo ########################### Transactions user 4 - 2;
eval select count(*) from performance_schema.events_transactions_current
evalp select /*4-2*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*4-2*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*4-2*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Statements user 1";
echo ########################### Statements user 1 - 2;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_statements_history
evalp select /*1-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*1-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Statements user 2";
echo ########################### Statements user 2 - 2;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_statements_history
evalp select /*2-2*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*2-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Statements user 3";
echo ########################### Statements user 3 - 2;
eval select count(*) from performance_schema.events_statements_current
evalp select /*3-2*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_statements_history
evalp select /*3-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*3-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Statements user 4";
echo ########################### Statements user 4 - 2;
eval select count(*) from performance_schema.events_statements_current
evalp select /*4-2*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_statements_history
evalp select /*4-2*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*4-2*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Stages user 1";
echo ########################### Stages user 1 - 2;
eval select EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_stages_history
evalp select /*1-2*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*1-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Stages user 2";
echo ########################### Stages user 2 - 2;
eval select EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_stages_history
evalp select /*2-2*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*2-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Stages user 3";
echo ########################### Stages user 3 - 2;
eval select count(*) from performance_schema.events_stages_current
evalp select /*3-2*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_stages_history
evalp select /*3-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*3-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Stages user 4";
echo ########################### Stages user 4 - 2;
eval select count(*) from performance_schema.events_stages_current
evalp select /*4-2*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_stages_history
evalp select /*4-2*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*4-2*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Waits user 1";
echo ########################### Waits user 1 - 2;
eval select EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) as has_waits from performance_schema.events_waits_history
evalp select /*1-2*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
eval select count(*) as has_waits from performance_schema.events_waits_history_long
evalp select /*1-2*/ count(*) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Waits user 2";
echo ########################### Waits user 2 - 2;
eval select EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_waits_history
evalp select /*2-2*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*2-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Waits user 3";
echo ########################### Waits user 3 - 2;
eval select count(*) from performance_schema.events_waits_current
evalp select /*3-2*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_waits_history
evalp select /*3-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*3-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Waits user 4";
echo ########################### Waits user 4 - 2;
eval select count(*) from performance_schema.events_waits_current
evalp select /*4-2*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_waits_history
evalp select /*4-2*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*4-2*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
--enable_query_log
--echo # Switch to connection default, enable consumers
--connection default
update performance_schema.setup_consumers
@ -509,7 +470,6 @@ truncate table performance_schema.events_waits_current;
truncate table performance_schema.events_waits_history;
truncate table performance_schema.events_waits_history_long;
--echo # Switch to connection con1
--connection con1
XA START 'XA_CON1', 'XA_BQUAL', 12;
@ -518,7 +478,6 @@ XA END 'XA_CON1', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON1', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON1', 'XA_BQUAL', 12;
--echo # Switch to connection con2
--connection con2
XA START 'XA_CON2', 'XA_BQUAL', 12;
@ -527,7 +486,6 @@ XA END 'XA_CON2', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON2', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON2', 'XA_BQUAL', 12;
--echo # Switch to connection con3
--connection con3
XA START 'XA_CON3', 'XA_BQUAL', 12;
@ -536,7 +494,6 @@ XA END 'XA_CON3', 'XA_BQUAL', 12;
XA PREPARE 'XA_CON3', 'XA_BQUAL', 12;
XA COMMIT 'XA_CON3', 'XA_BQUAL', 12;
--echo # Switch to connection con4
--connection con4
XA START 'XA_CON4', 'XA_BQUAL', 12;
@ -547,165 +504,150 @@ XA COMMIT 'XA_CON4', 'XA_BQUAL', 12;
--connection default
--disable_query_log
echo ########################### Transactions user 1 - 3;
echo "=========================== Transactions user 1";
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
evalp select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con1_thread_id;
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
evalp select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history
where THREAD_ID = $con1_thread_id;
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
evalp select /*1-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Transactions user 2";
echo ########################### Transactions user 2 - 3;
eval select XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
evalp select /*2-3*/ XID_FORMAT_ID, XID_GTRID, XID_BQUAL from performance_schema.events_transactions_current
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*2-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*2-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Transactions user 3";
echo ########################### Transactions user 3 - 3;
eval select count(*) from performance_schema.events_transactions_current
evalp select /*3-3*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*3-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*3-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Transactions user 4";
echo ########################### Transactions user 4 - 3;
eval select count(*) from performance_schema.events_transactions_current
evalp select /*4-3*/ count(*) from performance_schema.events_transactions_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_transactions_history
evalp select /*4-3*/ count(*) from performance_schema.events_transactions_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_transactions_history_long
evalp select /*4-3*/ count(*) from performance_schema.events_transactions_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Statements user 1";
echo ########################### Statements user 1 - 3;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
evalp select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
echo "=========================== Statements user 2";
echo ########################### Statements user 2 - 3;
eval select EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_statements_history
evalp select /*2-3*/ EVENT_NAME, SQL_TEXT from performance_schema.events_statements_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*2-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Statements user 3";
echo ########################### Statements user 3 - 3;
eval select count(*) from performance_schema.events_statements_current
evalp select /*3-3*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_statements_history
evalp select /*3-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*3-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Statements user 4";
echo ########################### Statements user 4 - 3;
eval select count(*) from performance_schema.events_statements_current
evalp select /*4-3*/ count(*) from performance_schema.events_statements_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_statements_history
evalp select /*4-3*/ count(*) from performance_schema.events_statements_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_statements_history_long
evalp select /*4-3*/ count(*) from performance_schema.events_statements_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Stages user 1";
echo ########################### Stages user 1 - 3;
eval select EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select EVENT_NAME from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
evalp select /*1-3*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-3*/ EVENT_NAME from performance_schema.events_stages_history_long
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
echo "=========================== Stages user 2";
echo ########################### Stages user 2 - 3;
eval select EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_stages_history
evalp select /*2-3*/ EVENT_NAME from performance_schema.events_stages_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*2-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Stages user 3";
echo ########################### Stages user 3 - 3;
eval select count(*) from performance_schema.events_stages_current
evalp select /*3-3*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_stages_history
evalp select /*3-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*3-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Stages user 4";
echo ########################### Stages user 4 - 3;
eval select count(*) from performance_schema.events_stages_current
evalp select /*4-3*/ count(*) from performance_schema.events_stages_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_stages_history
evalp select /*4-3*/ count(*) from performance_schema.events_stages_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_stages_history_long
evalp select /*4-3*/ count(*) from performance_schema.events_stages_history_long
where THREAD_ID = $con4_thread_id;
echo "=========================== Waits user 1";
echo ########################### Waits user 1 - 3;
eval select EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id
order by THREAD_ID, EVENT_ID;
eval select (count(*) > 5) as has_waits from performance_schema.events_waits_history
evalp select /*1-3*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con1_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*1-3*/ (count(*) > 5) as has_waits from performance_schema.events_waits_history
where THREAD_ID = $con1_thread_id;
eval select (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
evalp select /*1-3*/ (count(*) > 15) as has_waits from performance_schema.events_waits_history_long
where THREAD_ID = $con1_thread_id;
echo "=========================== Waits user 2";
echo ########################### Waits user 2 - 3;
eval select EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id
order by THREAD_ID, EVENT_ID;
eval select count(*) from performance_schema.events_waits_history
evalp select /*2-3*/ EVENT_NAME from performance_schema.events_waits_current
where THREAD_ID = $con2_thread_id order by THREAD_ID, EVENT_ID;
evalp select /*2-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con2_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*2-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con2_thread_id;
echo "=========================== Waits user 3";
echo ########################### Waits user 3 - 3;
eval select count(*) from performance_schema.events_waits_current
evalp select /*3-3*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_waits_history
evalp select /*3-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con3_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*3-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con3_thread_id;
echo "=========================== Waits user 4";
echo ########################### Waits user 4 - 3;
eval select count(*) from performance_schema.events_waits_current
evalp select /*4-3*/ count(*) from performance_schema.events_waits_current
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_waits_history
evalp select /*4-3*/ count(*) from performance_schema.events_waits_history
where THREAD_ID = $con4_thread_id;
eval select count(*) from performance_schema.events_waits_history_long
evalp select /*4-3*/ count(*) from performance_schema.events_waits_history_long
where THREAD_ID = $con4_thread_id;
--enable_query_log
--echo # Switch to connection default
--connection default
revoke all privileges, grant option from user1@localhost;