summaryrefslogtreecommitdiff
path: root/mysql-test/t/show_explain_ps.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/show_explain_ps.test')
-rw-r--r--mysql-test/t/show_explain_ps.test15
1 files changed, 12 insertions, 3 deletions
diff --git a/mysql-test/t/show_explain_ps.test b/mysql-test/t/show_explain_ps.test
index 4ad1e4304de..b43cd559e09 100644
--- a/mysql-test/t/show_explain_ps.test
+++ b/mysql-test/t/show_explain_ps.test
@@ -6,6 +6,11 @@
# Like all other perfschema tests, we don't work on embedded server:
--source include/not_embedded.inc
+# There is a query below that selects from P_S tables.
+# Remove possible history that could confuse it
+truncate table performance_schema.events_statements_history_long;
+truncate table performance_schema.events_stages_history_long;
+
--disable_warnings
drop table if exists t0, t1;
--enable_warnings
@@ -45,7 +50,11 @@ reap;
set debug_dbug='';
select event_name
-from performance_schema.events_waits_history_long
-where event_name='wait/synch/cond/sql/show_explain';
-
+from
+performance_schema.events_stages_history_long
+where
+ event_name like '%show explain' and
+ thread_id in(select thread_id
+ from performance_schema.events_statements_history_long
+ where EVENT_NAME='statement/sql/show_explain');
drop table t0;