diff options
author | Marc Alff <marc.alff@oracle.com> | 2011-03-01 17:39:28 +0100 |
---|---|---|
committer | Marc Alff <marc.alff@oracle.com> | 2011-03-01 17:39:28 +0100 |
commit | 5ee90018446bcb10c4a85f03eee968f99de4fa97 (patch) | |
tree | 65bbccb37aeddd07d7c8fafb985b0e746957847f /sql/rpl_rli.cc | |
parent | 69b82937591f6e5cf30ec75d1ba7caf0cb69ead4 (diff) | |
download | mariadb-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 'sql/rpl_rli.cc')
-rw-r--r-- | sql/rpl_rli.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index a35e7bb1612..f2653894ea7 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -54,6 +54,13 @@ Relay_log_info::Relay_log_info(bool is_slave_recovery) { DBUG_ENTER("Relay_log_info::Relay_log_info"); +#ifdef HAVE_PSI_INTERFACE + relay_log.set_psi_keys(key_RELAYLOG_LOCK_index, + key_RELAYLOG_update_cond, + key_file_relaylog, + key_file_relaylog_index); +#endif + group_relay_log_name[0]= event_relay_log_name[0]= group_master_log_name[0]= 0; until_log_name[0]= ign_master_log_name_end[0]= 0; @@ -356,7 +363,7 @@ static inline int add_relay_log(Relay_log_info* rli,LOG_INFO* linfo) { MY_STAT s; DBUG_ENTER("add_relay_log"); - if (!mysql_file_stat(key_file_binlog, + if (!mysql_file_stat(key_file_relaylog, linfo->log_file_name, &s, MYF(0))) { sql_print_error("log %s listed in the index, but failed to stat", |