summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2019-01-08 20:41:39 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2019-01-08 20:41:39 +0530
commit9edadc29b191d4861e397b1fb9f4f944a279e150 (patch)
treea22a6292889f933a33aea893d0c81443d88bb25e
parent0c20b247de0c1cc7f993e1eba6c4e3367c20e2c4 (diff)
downloadmariadb-git-9edadc29b191d4861e397b1fb9f4f944a279e150.tar.gz
MDEV-17748 innodb.alter_inplace_perfschema fails in buildbot with wrong result
- Changed the performance schema query which gives sampling with event counting. It should fix the issue.
-rw-r--r--mysql-test/suite/innodb/r/alter_inplace_perfschema.result9
-rw-r--r--mysql-test/suite/innodb/t/alter_inplace_perfschema.test8
2 files changed, 10 insertions, 7 deletions
diff --git a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
index 68e25664031..440a1d0d6b3 100644
--- a/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
+++ b/mysql-test/suite/innodb/r/alter_inplace_perfschema.result
@@ -1,3 +1,4 @@
+select count_star into @init_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
connect ddl, localhost, root,,;
update performance_schema.setup_instruments set enabled='yes';
update performance_schema.setup_consumers set enabled='yes';
@@ -8,10 +9,10 @@ SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone';
ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR go';
-SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
-WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
-object_name
-tmp/Innodb Merge Temp File
+select count_star into @final_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
+SELECT @final_count - @init_count;
+@final_count - @init_count
+11
SET DEBUG_SYNC = 'now SIGNAL gone';
connection ddl;
disconnect ddl;
diff --git a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
index b832596647f..e0451e121a6 100644
--- a/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
+++ b/mysql-test/suite/innodb/t/alter_inplace_perfschema.test
@@ -4,6 +4,7 @@
--source include/have_debug_sync.inc
--source include/not_embedded.inc
+select count_star into @init_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
connect (ddl, localhost, root,,);
update performance_schema.setup_instruments set enabled='yes';
update performance_schema.setup_consumers set enabled='yes';
@@ -24,9 +25,10 @@ send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
connection default;
SET DEBUG_SYNC = 'now WAIT_FOR go';
---replace_regex /.*[\\\/]tmp/tmp/
-SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
-WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
+
+select count_star into @final_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
+
+SELECT @final_count - @init_count;
#--exec lsof -p `pidof mysqld`
SET DEBUG_SYNC = 'now SIGNAL gone';