summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/r
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@oracle.com>2011-03-01 17:39:28 +0100
committerMarc Alff <marc.alff@oracle.com>2011-03-01 17:39:28 +0100
commit5ee90018446bcb10c4a85f03eee968f99de4fa97 (patch)
tree65bbccb37aeddd07d7c8fafb985b0e746957847f /mysql-test/suite/perfschema/r
parent69b82937591f6e5cf30ec75d1ba7caf0cb69ead4 (diff)
downloadmariadb-git-5ee90018446bcb10c4a85f03eee968f99de4fa97.tar.gz
Bug#11766528 PERFORMANCE_SCHEMA TRACKS BOTH BINARY AND RELAY LOGS IN THE SAME EVENTS
Before this fix, all the performance schema instrumentation for both the binary log and the relay log would use the following instruments: - wait/io/file/sql/binlog - wait/io/file/sql/binlog_index - wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index - wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond This instrumentation is too general and can be more specific. With this fix, the binlog instrumentation is identical, and the relay log instrumentation is changed to: - wait/io/file/sql/relaylog - wait/io/file/sql/relaylog_index - wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index - wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond With this change, the performance instrumentation for the binary log and the relay log, which share the same structure but have different uses, is more detailed. This is especially important for hosts in the middle of a replication chain, that are both masters (binlog) and slaves (relaylog).
Diffstat (limited to 'mysql-test/suite/perfschema/r')
-rw-r--r--mysql-test/suite/perfschema/r/relaylog.result98
1 files changed, 98 insertions, 0 deletions
diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result
new file mode 100644
index 00000000000..0cd346b62a1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/relaylog.result
@@ -0,0 +1,98 @@
+include/master-slave.inc
+[connection master]
+drop table if exists test.t1;
+reset master;
+create table test.t1(a int);
+drop table test.t1;
+show binlog events from <binlog_start>;
+Log_name Pos Event_type Server_id End_log_pos Info
+slave-bin.000001 # Query # # use `test`; create table test.t1(a int)
+slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
+"============ Performance schema on master ============"
+select * from performance_schema.file_summary_by_instance
+where file_name like "%master-%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+[DATADIR]master-bin.000001 wait/io/file/sql/binlog 6 4 221 329
+[DATADIR]master-bin.index wait/io/file/sql/binlog_index 0 2 0 40
+select * from performance_schema.file_summary_by_instance
+where file_name like "%slave-%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+select * from performance_schema.file_summary_by_instance
+where event_name like "%binlog%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+[DATADIR]master-bin.000001 wait/io/file/sql/binlog 6 4 221 329
+[DATADIR]master-bin.index wait/io/file/sql/binlog_index 0 2 0 40
+select * from performance_schema.file_summary_by_event_name
+where event_name like "%binlog%" order by event_name;
+EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+wait/io/file/sql/binlog 6 4 221 329
+wait/io/file/sql/binlog_index 0 2 0 40
+select event_name, count_star
+from performance_schema.events_waits_summary_global_by_event_name
+where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+event_name count_star
+wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids 0
+wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond 1
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index 3
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids 0
+select * from performance_schema.file_summary_by_instance
+where event_name like "%relaylog%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+select * from performance_schema.file_summary_by_event_name
+where event_name like "%relaylog%" order by event_name;
+EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+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;
+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
+where file_name like "%master-%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+select * from performance_schema.file_summary_by_instance
+where file_name like "%slave-%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+[DATADIR]slave-bin.000001 wait/io/file/sql/binlog 3 8 602 631
+[DATADIR]slave-bin.index wait/io/file/sql/binlog_index 0 3 0 57
+[DATADIR]slave-relay-bin.000001 wait/io/file/sql/relaylog 4 3 370 263
+[DATADIR]slave-relay-bin.000002 wait/io/file/sql/relaylog 2 4 368 368
+[DATADIR]slave-relay-bin.index wait/io/file/sql/relaylog_index 2 4 50 125
+select * from performance_schema.file_summary_by_instance
+where event_name like "%binlog%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+[DATADIR]slave-bin.000001 wait/io/file/sql/binlog 3 8 602 631
+[DATADIR]slave-bin.index wait/io/file/sql/binlog_index 0 3 0 57
+select * from performance_schema.file_summary_by_event_name
+where event_name like "%binlog%" order by event_name;
+EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+wait/io/file/sql/binlog 3 8 602 631
+wait/io/file/sql/binlog_index 0 3 0 57
+select event_name, count_star
+from performance_schema.events_waits_summary_global_by_event_name
+where event_name like "%MYSQL_BIN_LOG%" order by event_name;
+event_name count_star
+wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids 0
+wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond 0
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index 5
+wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids 0
+select * from performance_schema.file_summary_by_instance
+where event_name like "%relaylog%" order by file_name;
+FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+[DATADIR]slave-relay-bin.000001 wait/io/file/sql/relaylog 4 3 370 263
+[DATADIR]slave-relay-bin.000002 wait/io/file/sql/relaylog 2 4 368 368
+[DATADIR]slave-relay-bin.index wait/io/file/sql/relaylog_index 2 4 50 125
+select * from performance_schema.file_summary_by_event_name
+where event_name like "%relaylog%" order by event_name;
+EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+wait/io/file/sql/relaylog 6 7 738 631
+wait/io/file/sql/relaylog_index 2 4 50 125
+select event_name, count_star
+from performance_schema.events_waits_summary_global_by_event_name
+where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
+event_name count_star
+wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond 2
+wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 12
+include/stop_slave.inc