diff options
author | Marc Alff <marc.alff@oracle.com> | 2011-03-11 11:45:16 +0100 |
---|---|---|
committer | Marc Alff <marc.alff@oracle.com> | 2011-03-11 11:45:16 +0100 |
commit | a7211fb810ea7b7a517cfcd64bce6cafbc2d7f41 (patch) | |
tree | e59b9aa6b05965e2a52f5a838fdfe34e39626f17 /mysql-test/suite/perfschema | |
parent | 46b7a382121c4bbf90fc3f7e59b64591f2f169ab (diff) | |
download | mariadb-git-a7211fb810ea7b7a517cfcd64bce6cafbc2d7f41.tar.gz |
Test cleanup
Diffstat (limited to 'mysql-test/suite/perfschema')
-rw-r--r-- | mysql-test/suite/perfschema/r/relaylog.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/perfschema/t/relaylog.test | 24 |
2 files changed, 32 insertions, 4 deletions
diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result index 079d1e482b2..e2f8270b1f0 100644 --- a/mysql-test/suite/perfschema/r/relaylog.result +++ b/mysql-test/suite/perfschema/r/relaylog.result @@ -84,7 +84,11 @@ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE, if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ, if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE from performance_schema.file_summary_by_instance -where file_name like "%slave-%" order by file_name; +where file_name like "%slave-%" + and (file_name not like "%slave-relay-bin.0%" + or file_name like "%slave-relay-bin.000001" + or file_name like "%slave-relay-bin.000002") +order by file_name; FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY slave-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY @@ -134,7 +138,11 @@ if (count_write > 0,"MANY", "NONE") as COUNT_WRITE, if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ, if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE from performance_schema.file_summary_by_instance -where event_name like "%relaylog%" order by file_name; +where event_name like "%relaylog%" + and (file_name not like "%slave-relay-bin.0%" + or file_name like "%slave-relay-bin.000001" + or file_name like "%slave-relay-bin.000002") +order by file_name; FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE slave-relay-bin.000001 wait/io/file/sql/relaylog MANY MANY MANY MANY slave-relay-bin.000002 wait/io/file/sql/relaylog MANY MANY MANY MANY diff --git a/mysql-test/suite/perfschema/t/relaylog.test b/mysql-test/suite/perfschema/t/relaylog.test index f9a4d7bfe00..68ba57dd502 100644 --- a/mysql-test/suite/perfschema/t/relaylog.test +++ b/mysql-test/suite/perfschema/t/relaylog.test @@ -31,6 +31,18 @@ drop table test.t1; --source include/show_binlog_events.inc +# Notes +# +# The point of this test is to make sure code is properly instrumented, +# where instruments have the proper key (binlog or relaylog), +# it is not to dive into statistics for each instruments. +# Different test execution sequence in different platforms do make the +# results vary, making the test results very sensitive to changes. +# To ensure robustness: +# - log file rotation is limited to file .000001 and .000002 +# - statistics are normalized to "NONE" or "MANY" +# + connection master; -- echo "============ Performance schema on master ============" @@ -99,7 +111,11 @@ select if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ, if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE from performance_schema.file_summary_by_instance - where file_name like "%slave-%" order by file_name; + where file_name like "%slave-%" + and (file_name not like "%slave-relay-bin.0%" + or file_name like "%slave-relay-bin.000001" + or file_name like "%slave-relay-bin.000002") + order by file_name; -- echo "Expect a slave binlog + binlog_index" @@ -138,7 +154,11 @@ select if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ, if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE from performance_schema.file_summary_by_instance - where event_name like "%relaylog%" order by file_name; + where event_name like "%relaylog%" + and (file_name not like "%slave-relay-bin.0%" + or file_name like "%slave-relay-bin.000001" + or file_name like "%slave-relay-bin.000002") + order by file_name; select EVENT_NAME, |