Commit 40b743f9 authored by Sergei Golubchik's avatar Sergei Golubchik

remove redundant select in the perfschema.show_aggregate test

instead, include handler_rollback in the following per-connection selects
parent b42158be
...@@ -201,28 +201,23 @@ SET sr.acct = sr.a1 + sr.a2 + sr.a3; ...@@ -201,28 +201,23 @@ SET sr.acct = sr.a1 + sr.a2 + sr.a3;
# Review per-thread status counts # Review per-thread status counts
# #
USE performance_schema; USE performance_schema;
SELECT * FROM status_by_thread WHERE thread_id IN (@con1_id, @con2_id, @con3_id) AND variable_name IN ('handler_delete', 'handler_rollback') ORDER BY thread_id;
THREAD_ID VARIABLE_NAME VARIABLE_VALUE
thread_id Handler_delete 1
thread_id Handler_rollback 1
thread_id Handler_delete 2
thread_id Handler_rollback 2
thread_id Handler_delete 3
thread_id Handler_rollback 3
# #
# Verify expected counts for 'handler_delete' per thread # Verify expected counts for 'handler_delete' per thread
# #
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete'); SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete', 'handler_rollback');
THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
connect_1 Handler_delete 1 OK con_1 Handler_delete 1 OK
con_1 Handler_rollback 1 OK
# #
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete'); SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete', 'handler_rollback');
THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
connnect_2 Handler_delete 2 OK con_2 Handler_delete 2 OK
con_2 Handler_rollback 2 OK
# #
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete'); SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete', 'handler_rollback');
THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected THREAD_ID VARIABLE_NAME VARIABLE_VALUE Expected
connnect_3 Handler_delete 3 OK con_3 Handler_delete 3 OK
con_3 Handler_rollback 3 OK
# #
# STATUS_BY_THREAD vs. GLOBAL_STATUS # STATUS_BY_THREAD vs. GLOBAL_STATUS
# #
......
...@@ -130,20 +130,18 @@ SELECT thread_id INTO @con3_id FROM threads WHERE processlist_user IN ('user3'); ...@@ -130,20 +130,18 @@ SELECT thread_id INTO @con3_id FROM threads WHERE processlist_user IN ('user3');
--echo # Review per-thread status counts --echo # Review per-thread status counts
--echo # --echo #
USE performance_schema; USE performance_schema;
--replace_column 1 thread_id
SELECT * FROM status_by_thread WHERE thread_id IN (@con1_id, @con2_id, @con3_id) AND variable_name IN ('handler_delete', 'handler_rollback') ORDER BY thread_id;
--echo # --echo #
--echo # Verify expected counts for 'handler_delete' per thread --echo # Verify expected counts for 'handler_delete' per thread
--echo # --echo #
--replace_column 1 connect_1 --replace_column 1 con_1
SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete'); SELECT *, IF (variable_value = 1,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con1_id AND variable_name IN ('handler_delete', 'handler_rollback');
--echo # --echo #
--replace_column 1 connnect_2 --replace_column 1 con_2
SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete'); SELECT *, IF (variable_value = 2,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con2_id AND variable_name IN ('handler_delete', 'handler_rollback');
--echo # --echo #
--replace_column 1 connnect_3 --replace_column 1 con_3
SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete'); SELECT *, IF (variable_value = 3,'OK','ERROR') AS Expected FROM status_by_thread WHERE thread_id = @con3_id AND variable_name IN ('handler_delete', 'handler_rollback');
--echo # --echo #
--echo # STATUS_BY_THREAD vs. GLOBAL_STATUS --echo # STATUS_BY_THREAD vs. GLOBAL_STATUS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment