#At file:///Users/malff/BZR_TREE/mysql-5.5-bugteam-58512/ based on revid:nirbhay.choubey@stripped
3158 Marc Alff 2010-12-01
Bug#58512 Performance_schema.myisam_file_io fails sporadically in PB2
Before this fix, the test myisam_file_io executed:
- (a) an update on setup_instrument to disable non myisam file io instruments
- (b) a truncate on events_waits_history_long
and later
- (c) a select on events_waits_history_long
Surprisingly, events that were supposed to be disabled in (a) and removed in (b)
still were found in (c).
This happened for events such as
wait/io/file/innodb/innodb_data_file fil0fil.c: sync
because the sync was started before (a) and completed after (b),
and as a consequence was added in the performance schema history, as expected.
Presence of these records in the history made the test fail.
This fix makes the test script more robust to account for extra spill waits records in (c).
modified:
mysql-test/suite/perfschema/r/myisam_file_io.result
mysql-test/suite/perfschema/t/myisam_file_io.test
=== modified file 'mysql-test/suite/perfschema/r/myisam_file_io.result'
--- a/mysql-test/suite/perfschema/r/myisam_file_io.result 2010-11-03 15:42:33 +0000
+++ b/mysql-test/suite/perfschema/r/myisam_file_io.result 2010-12-01 09:24:16 +0000
@@ -16,6 +16,7 @@ operation, number_of_bytes,
substring(object_name, locate("no_index_tab", object_name)) as short_name
from performance_schema.events_waits_history_long
where operation not like "tell"
+ and event_name like "wait/io/file/myisam/%"
order by thread_id, event_id;
event_name short_source operation number_of_bytes short_name
wait/io/file/myisam/kfile mi_create.c: create NULL no_index_tab.MYI
=== modified file 'mysql-test/suite/perfschema/t/myisam_file_io.test'
--- a/mysql-test/suite/perfschema/t/myisam_file_io.test 2010-11-03 15:42:33 +0000
+++ b/mysql-test/suite/perfschema/t/myisam_file_io.test 2010-12-01 09:24:16 +0000
@@ -46,6 +46,13 @@ insert into no_index_tab set a = 'foo',
# Verification
# Note that mi_create.c contains mysql_file_tell() calls in debug only,
# so the result are filtered to remove 'tell'.
+# Note that even after setting other instruments to enabled='NO'
+# and truncating the events_waits_history_long table,
+# some events -- that were already started but not completed --
+# for other instruments could still be added in the history.
+# To protect against that, an extra where clause
+# "and event_name like "wait/io/file/myisam/%"
+# is added to the select to filter out the result.
select event_name,
left(source, locate(":", source)) as short_source,
@@ -53,6 +60,7 @@ select event_name,
substring(object_name, locate("no_index_tab", object_name)) as short_name
from performance_schema.events_waits_history_long
where operation not like "tell"
+ and event_name like "wait/io/file/myisam/%"
order by thread_id, event_id;
# In case of failures, this will tell if file io are lost.
Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20101201092416-xhjt7q67xgrus4cr.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-bugteam branch (marc.alff:3158) Bug#58512 | Marc Alff | 1 Dec |