Commit b0b0f514 authored by unknown's avatar unknown

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
parent a90d866e
......@@ -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;
......@@ -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;
......@@ -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;
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment