~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/extra/binlog_tests/innodb_stat.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Embedded server doesn't support binlog
 
2
-- source include/not_embedded.inc
 
3
-- source include/have_innodb.inc
 
4
 
 
5
#
 
6
# Let us test binlog_cache_use and binlog_cache_disk_use status vars.
 
7
# Actually this test has nothing to do with innodb per se, it just requires
 
8
# transactional table. 
 
9
#
 
10
flush status;
 
11
show status like "binlog_cache_use";
 
12
show status like "binlog_cache_disk_use";
 
13
--disable_warnings
 
14
drop table if exists t1;
 
15
--enable_warnings
 
16
 
 
17
create table t1 (a int) engine=innodb;
 
18
 
 
19
# Now we are going to create transaction which is long enough so its 
 
20
# transaction binlog will be flushed to disk...
 
21
let $1=2000;
 
22
disable_query_log;
 
23
begin;
 
24
while ($1)
 
25
{
 
26
 eval insert into t1 values( $1 );
 
27
 dec $1;
 
28
}
 
29
commit;
 
30
enable_query_log;
 
31
show status like "binlog_cache_use";
 
32
show status like "binlog_cache_disk_use";
 
33
 
 
34
# Transaction which should not be flushed to disk and so should not
 
35
# increase binlog_cache_disk_use.
 
36
begin;
 
37
delete from t1;
 
38
commit;
 
39
show status like "binlog_cache_use";
 
40
show status like "binlog_cache_disk_use";
 
41
drop table t1;