summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@oracle.com>2011-06-29 22:18:07 +0200
committerMarc Alff <marc.alff@oracle.com>2011-06-29 22:18:07 +0200
commit89d65a0338f996b821f24923c7690313eeee54ee (patch)
tree020747feaead1ae4374fbbe1fca4797fb959ba18 /mysql-test/suite/perfschema
parent70e94927d4a362fc02139ae737c38ce3ef007d99 (diff)
downloadmariadb-git-89d65a0338f996b821f24923c7690313eeee54ee.tar.gz
Bug#12603341 - PERFSCHEMA.RELAYLOG FAILS SPORADICALLY IN PB2
Before this fix, the test performance_schema.relaylog would fail with sporadic failures related to statistics on update_cond. The reason for these failures is that thread scheduling makes impossible to predict if instrumented conditions will be used on not. The fix is to relax the test case, to not collect statistics about: - wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond - wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond
Diffstat (limited to 'mysql-test/suite/perfschema')
-rw-r--r--mysql-test/suite/perfschema/r/relaylog.result20
-rw-r--r--mysql-test/suite/perfschema/t/relaylog.test18
2 files changed, 26 insertions, 12 deletions
diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result
index e2f8270b1f0..0a7d0a5b2be 100644
--- a/mysql-test/suite/perfschema/r/relaylog.result
+++ b/mysql-test/suite/perfschema/r/relaylog.result
@@ -52,10 +52,11 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
-where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+where event_name like "%MYSQL_BIN_LOG%"
+ and event_name not like "%MYSQL_BIN_LOG::update_cond"
+ order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
-wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect no slave relay log"
@@ -68,9 +69,10 @@ EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_W
wait/io/file/sql/relaylog 0 0 0 0
wait/io/file/sql/relaylog_index 0 0 0 0
select * from performance_schema.events_waits_summary_global_by_event_name
-where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
+where event_name like "%MYSQL_RELAY_LOG%"
+ and event_name not like "%MYSQL_RELAY_LOG::update_cond"
+ order by event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
-wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond 0 0 0 0 0
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 0 0 0 0 0
"============ Performance schema on slave ============"
select * from performance_schema.file_summary_by_instance
@@ -123,10 +125,11 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
-where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+where event_name like "%MYSQL_BIN_LOG%"
+ and event_name not like "%MYSQL_BIN_LOG::update_cond"
+ order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
-wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond NONE
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect a slave relay log"
@@ -162,8 +165,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
-where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
+where event_name like "%MYSQL_RELAY_LOG%"
+ and event_name not like "%MYSQL_RELAY_LOG::update_cond"
+ order by event_name;
EVENT_NAME COUNT_STAR
-wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index MANY
include/stop_slave.inc
diff --git a/mysql-test/suite/perfschema/t/relaylog.test b/mysql-test/suite/perfschema/t/relaylog.test
index 68ba57dd502..e2798e9b707 100644
--- a/mysql-test/suite/perfschema/t/relaylog.test
+++ b/mysql-test/suite/perfschema/t/relaylog.test
@@ -41,6 +41,8 @@ drop table test.t1;
# To ensure robustness:
# - log file rotation is limited to file .000001 and .000002
# - statistics are normalized to "NONE" or "MANY"
+# - statistics on ::update_cond conditions are not collected,
+# since this is too much dependent on execution.
#
connection master;
@@ -84,7 +86,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
- where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+ where event_name like "%MYSQL_BIN_LOG%"
+ and event_name not like "%MYSQL_BIN_LOG::update_cond"
+ order by event_name;
-- echo "Expect no slave relay log"
@@ -95,7 +99,9 @@ select * from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
select * from performance_schema.events_waits_summary_global_by_event_name
- where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
+ where event_name like "%MYSQL_RELAY_LOG%"
+ and event_name not like "%MYSQL_RELAY_LOG::update_cond"
+ order by event_name;
sync_slave_with_master;
-- echo "============ Performance schema on slave ============"
@@ -142,7 +148,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
- where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+ where event_name like "%MYSQL_BIN_LOG%"
+ and event_name not like "%MYSQL_BIN_LOG::update_cond"
+ order by event_name;
-- echo "Expect a slave relay log"
@@ -173,7 +181,9 @@ select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
- where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
+ where event_name like "%MYSQL_RELAY_LOG%"
+ and event_name not like "%MYSQL_RELAY_LOG::update_cond"
+ order by event_name;
--source include/stop_slave.inc