summaryrefslogtreecommitdiff
path: root/sql/mysqld.h
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@oracle.com>2010-11-12 07:23:26 +0100
committerMarc Alff <marc.alff@oracle.com>2010-11-12 07:23:26 +0100
commit80589ada502d1abaa5f8220297bee30cdf4f473a (patch)
tree183a31a553023b77e2712905c8a6b14869e85318 /sql/mysqld.h
parent2cbf011beef8f2c576544680b72be94de8bdcd93 (diff)
downloadmariadb-git-80589ada502d1abaa5f8220297bee30cdf4f473a.tar.gz
Bug#58052 Binary log IO not being accounted for properly
Before this fix, file io for the binary log file was not accounted properly, and showed no io at all. This bug was due to the following issues: 1) file io for the binlog was instrumented: - sometime as "wait/io/file/sql/binlog" - sometime as "wait/io/file/sql/MYSQL_LOG" leading to inconsistent event_names. 2) the binlog file itself was using an IO_CACHE, but the IO_CACHE implementation in mysys/mf_iocache.c was not instrumented to make performance schema calls to record file io. 3) The "wait/io/file/sql/MYSQL_LOG" instrumentation was used for several log files, such as: - the binary log - the slow log - the query log which caused file io in these different log files to be accounted against the same instrument. The instrumentation needs to have a finer grain and report io in different event_names, because each file really serves a different purpose. With this fix: - the IO_CACHE implementation is now instrumented - the "wait/io/file/sql/MYSQL_LOG" instrument has been removed - binlog io is now always instrumented with "wait/io/file/sql/binlog" - the slow log is instrumented with a new name, "wait/io/file/sql/slow_log" - the query log is instrumented with a new name, "wait/io/file/sql/query_log"
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r--sql/mysqld.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h
index dc9f94c0d03..113bc3aa983 100644
--- a/sql/mysqld.h
+++ b/sql/mysqld.h
@@ -270,9 +270,10 @@ extern PSI_file_key key_file_binlog, key_file_binlog_index, key_file_casetest,
key_file_dbopt, key_file_des_key_file, key_file_ERRMSG, key_select_to_file,
key_file_fileparser, key_file_frm, key_file_global_ddl_log, key_file_load,
key_file_loadfile, key_file_log_event_data, key_file_log_event_info,
- key_file_master_info, key_file_misc, key_file_MYSQL_LOG, key_file_partition,
+ key_file_master_info, key_file_misc, key_file_partition,
key_file_pid, key_file_relay_log_info, key_file_send_file, key_file_tclog,
key_file_trg, key_file_trn, key_file_init;
+extern PSI_file_key key_file_query_log, key_file_slow_log;
void init_server_psi_keys();
#endif /* HAVE_PSI_INTERFACE */