summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_relayrotate.test
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 /mysql-test/t/rpl_relayrotate.test
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 'mysql-test/t/rpl_relayrotate.test')
-rw-r--r--mysql-test/t/rpl_relayrotate.test22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_relayrotate.test b/mysql-test/t/rpl_relayrotate.test
index 0e198d23517..ca3bff81608 100644
--- a/mysql-test/t/rpl_relayrotate.test
+++ b/mysql-test/t/rpl_relayrotate.test
@@ -58,6 +58,24 @@ start slave;
select master_pos_wait('master-bin.001',3000)>=0;
select * from t1 where a=8000;
+connection master;
+
+# binlog_cache_use and binlog_cache_disk_use status vars test
+# This test uses the previous test. Namely, it needs the long
+# transaction that adds 8000 lines to the t1 table.
+
+show status like "binlog_cache_use";
+show status like "binlog_cache_disk_use";
+
+# transaction which should not be flushed to disk and so should not
+# increase binlog_cache_disk_use
+begin;
+delete from t1;
+commit;
+
+show status like "binlog_cache_use";
+show status like "binlog_cache_disk_use";
+
# The following DROP is a very important cleaning task:
# imagine the next test is run with --skip-innodb: it will do
# DROP TABLE IF EXISTS t1; but this will delete the frm and leave
@@ -68,3 +86,7 @@ select * from t1 where a=8000;
# InnoDB: Error: table t1 already exists in InnoDB internal
# InnoDB: data dictionary. Have you deleted the .frm file etc
drop table t1;
+# wait until this drop is executed on slave
+save_master_pos;
+connection slave;
+sync_with_master;