summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
authorunknown <dlenev@jabberwock.localdomain>2004-04-02 00:47:20 +0400
committerunknown <dlenev@jabberwock.localdomain>2004-04-02 00:47:20 +0400
commita58b351eeb4b03820f4a9d6f6c1f3fe0cd8881e2 (patch)
treedfc52e593ad673b6bc6c3758338f9b94e68f3daa /mysys/mf_iocache.c
parentdead63012ab6e16c07fb259e5158bfc5e5cfa250 (diff)
downloadmariadb-git-a58b351eeb4b03820f4a9d6f6c1f3fe0cd8881e2.tar.gz
WL#775 "Add status variable identifying binlog_cache_size shortage"
Added two status variables: binlog_cache_use - counts number of transactions that used somehow transaction temporary binary log. binlog_cache_disk_use - counts number of transactions that required disk I/O for storing info in this this binary log. include/my_sys.h: Added disk_writes member to the IO_CACHE structure for counting number of times when IO_CACHE was forced to write to disk. mysql-test/r/rpl_relayrotate.result: Fixed test result since added test for binlog_cache_use and binlog_cache_disk_use status variables. mysql-test/t/rpl_relayrotate.test: Added test for binlog_cache_use and binlog_cache_disk_use status variables. Now dropping t1 table on master too. mysys/mf_iocache.c: Added disk_writes member to the IO_CACHE structure for counting number of times when IO_CACHE was forced to write to disk. sql/handler.cc: Added support for binlog_cache_use and binlog_cache_disk_use status variable. First one is incremented if transaction used somehow transaction temporary binary log (doesn't matter in memory only or with writes to disk), the second one is incremented if this binary log was flushed to disk at some point. sql/mysql_priv.h: Added declaration of status variables binlog_cache_use and binlog_cache_disk_use. sql/mysqld.cc: Added status variables binlog_cache_use and binlog_cache_disk_use. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r--mysys/mf_iocache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 288071f7361..530721a79ad 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -152,6 +152,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
info->alloced_buffer = 0;
info->buffer=0;
info->seek_not_done= test(file >= 0);
+ info->disk_writes= 0;
#ifdef THREAD
info->share=0;
#endif
@@ -1153,6 +1154,7 @@ int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
}
info->append_read_pos=info->write_pos=info->write_buffer;
+ ++info->disk_writes;
UNLOCK_APPEND_BUFFER;
DBUG_RETURN(info->error);
}