Skip to content

Commit 9edadc2

Browse files
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.
1 parent 0c20b24 commit 9edadc2

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

mysql-test/suite/innodb/r/alter_inplace_perfschema.result

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
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%';
12
connect ddl, localhost, root,,;
23
update performance_schema.setup_instruments set enabled='yes';
34
update performance_schema.setup_consumers set enabled='yes';
@@ -8,10 +9,10 @@ SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone';
89
ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
910
connection default;
1011
SET DEBUG_SYNC = 'now WAIT_FOR go';
11-
SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
12-
WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
13-
object_name
14-
tmp/Innodb Merge Temp File
12+
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%';
13+
SELECT @final_count - @init_count;
14+
@final_count - @init_count
15+
11
1516
SET DEBUG_SYNC = 'now SIGNAL gone';
1617
connection ddl;
1718
disconnect ddl;

mysql-test/suite/innodb/t/alter_inplace_perfschema.test

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
--source include/have_debug_sync.inc
55
--source include/not_embedded.inc
66

7+
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%';
78
connect (ddl, localhost, root,,);
89
update performance_schema.setup_instruments set enabled='yes';
910
update performance_schema.setup_consumers set enabled='yes';
@@ -24,9 +25,10 @@ send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
2425

2526
connection default;
2627
SET DEBUG_SYNC = 'now WAIT_FOR go';
27-
--replace_regex /.*[\\\/]tmp/tmp/
28-
SELECT DISTINCT object_name FROM performance_schema.events_waits_history_long
29-
WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
28+
29+
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%';
30+
31+
SELECT @final_count - @init_count;
3032

3133
#--exec lsof -p `pidof mysqld`
3234
SET DEBUG_SYNC = 'now SIGNAL gone';

0 commit comments

Comments
 (0)