diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-05-19 17:43:50 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-05-19 17:43:50 +0400 |
commit | 707bd523de04539a81257924ed88d4fd09f1bc85 (patch) | |
tree | d7db4e9b28689cb8e85337d5afaabce3cb4c2b9a /mysql-test | |
parent | 934982f51af5d711fa148be294742bda938ae7c8 (diff) | |
download | mariadb-git-707bd523de04539a81257924ed88d4fd09f1bc85.tar.gz |
Moved testing of binlog_cache_use/binlog_cache_disk_use statistical variables from
rpl_relayrotate.test to innodb.test since this test requires innodb support.
mysql-test/t/innodb-master.opt:
Rename: mysql-test/t/rpl_relayrotate-master.opt -> mysql-test/t/innodb-master.opt
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/innodb.result | 23 | ||||
-rw-r--r-- | mysql-test/r/rpl_relayrotate.result | 15 | ||||
-rw-r--r-- | mysql-test/t/innodb-master.opt (renamed from mysql-test/t/rpl_relayrotate-master.opt) | 0 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 33 | ||||
-rw-r--r-- | mysql-test/t/rpl_relayrotate.test | 16 |
5 files changed, 56 insertions, 31 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 981ef23c779..83d042cd279 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1595,3 +1595,26 @@ t2 CREATE TABLE `t2` ( CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 drop table t2, t1; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 24 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 0 +create table t1 (a int) engine=innodb; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 25 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +begin; +delete from t1; +commit; +show status like "binlog_cache_use"; +Variable_name Value +Binlog_cache_use 26 +show status like "binlog_cache_disk_use"; +Variable_name Value +Binlog_cache_disk_use 1 +drop table t1; diff --git a/mysql-test/r/rpl_relayrotate.result b/mysql-test/r/rpl_relayrotate.result index 96ec06a69aa..bf9bbbb9b93 100644 --- a/mysql-test/r/rpl_relayrotate.result +++ b/mysql-test/r/rpl_relayrotate.result @@ -16,19 +16,4 @@ master_pos_wait('master-bin.001',3000)>=0 select * from t1 where a=8000; a 8000 -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 1 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 -begin; -delete from t1; -commit; -show status like "binlog_cache_use"; -Variable_name Value -Binlog_cache_use 2 -show status like "binlog_cache_disk_use"; -Variable_name Value -Binlog_cache_disk_use 1 drop table t1; diff --git a/mysql-test/t/rpl_relayrotate-master.opt b/mysql-test/t/innodb-master.opt index 4cb927540bf..4cb927540bf 100644 --- a/mysql-test/t/rpl_relayrotate-master.opt +++ b/mysql-test/t/innodb-master.opt diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 47e82db2dc4..e0cc96ccb32 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1106,4 +1106,37 @@ show create table t2; drop table t2, t1; +# +# Let us test binlog_cache_use and binlog_cache_disk_use status vars. +# Actually this test has nothing to do with innodb per se, it just requires +# transactional table. +# +show status like "binlog_cache_use"; +show status like "binlog_cache_disk_use"; + +create table t1 (a int) engine=innodb; + +# Now we are going to create transaction which is long enough so its +# transaction binlog will be flushed to disk... +let $1=2000; +disable_query_log; +begin; +while ($1) +{ + eval insert into t1 values( $1 ); + dec $1; +} +commit; +enable_query_log; +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"; +drop table t1; diff --git a/mysql-test/t/rpl_relayrotate.test b/mysql-test/t/rpl_relayrotate.test index ca3bff81608..46e6f1bd157 100644 --- a/mysql-test/t/rpl_relayrotate.test +++ b/mysql-test/t/rpl_relayrotate.test @@ -60,22 +60,6 @@ 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 |