• Marc Alff's avatar
    Bug#58052 Binary log IO not being accounted for properly · 9e7ca88f
    Marc Alff authored
    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"
    9e7ca88f
mysqld.h 17.7 KB