1
by brian
clean slate |
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 |
show status like "binlog_cache_use"; |
|
11 |
show status like "binlog_cache_disk_use"; |
|
12 |
--disable_warnings |
|
13 |
drop table if exists t1; |
|
14 |
--enable_warnings |
|
15 |
||
16 |
create table t1 (a int) engine=innodb; |
|
17 |
||
18 |
# Now we are going to create transaction which is long enough so its
|
|
19 |
# transaction binlog will be flushed to disk...
|
|
20 |
let $1=2000; |
|
21 |
disable_query_log; |
|
22 |
begin; |
|
23 |
while ($1) |
|
24 |
{
|
|
25 |
eval insert into t1 values( $1 ); |
|
26 |
dec $1; |
|
27 |
}
|
|
28 |
commit; |
|
29 |
enable_query_log; |
|
30 |
show status like "binlog_cache_use"; |
|
31 |
show status like "binlog_cache_disk_use"; |
|
32 |
||
33 |
# Transaction which should not be flushed to disk and so should not
|
|
34 |
# increase binlog_cache_disk_use.
|
|
35 |
begin; |
|
36 |
delete from t1; |
|
37 |
commit; |
|
38 |
show status like "binlog_cache_use"; |
|
39 |
show status like "binlog_cache_disk_use"; |
|
40 |
drop table t1; |
|
41 |
||
42 |
# Test for testable InnoDB status variables. This test
|
|
43 |
# uses previous ones(pages_created, rows_deleted, ...).
|
|
44 |
show status like "Innodb_buffer_pool_pages_total"; |
|
45 |
show status like "Innodb_page_size"; |
|
46 |
show status like "Innodb_rows_deleted"; |
|
47 |
show status like "Innodb_rows_inserted"; |
|
48 |
show status like "Innodb_rows_updated"; |
|
49 |