diff options
author | Inaam Rana <inaam.rana@oracle.com> | 2011-11-18 11:20:17 -0500 |
---|---|---|
committer | Inaam Rana <inaam.rana@oracle.com> | 2011-11-18 11:20:17 -0500 |
commit | a8e291cca8a29d66975e285750f2c1f415c418ca (patch) | |
tree | ac8a02cc928936255beeb859540ec4228f95fd72 /mysql-test/suite/innodb | |
parent | e305e6b09b03dca9ee9d51e05617b82d8ec45649 (diff) | |
download | mariadb-git-a8e291cca8a29d66975e285750f2c1f415c418ca.tar.gz |
merge bug#13390506 from mysql-5.1
Diffstat (limited to 'mysql-test/suite/innodb')
3 files changed, 73 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result new file mode 100644 index 00000000000..bae2a17bd02 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result @@ -0,0 +1,13 @@ +set global innodb_file_per_table=on; +set global innodb_file_format=`1`; +create table t1(a text) engine=innodb key_block_size=8; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +8192 +drop table t1; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +create table t2(a text) engine=innodb; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +drop table t2; diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt b/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt new file mode 100644 index 00000000000..a9a3d8c3db8 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt @@ -0,0 +1 @@ +--innodb-buffer-pool-size=8M diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test new file mode 100644 index 00000000000..481ccd646f8 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test @@ -0,0 +1,59 @@ +-- source include/have_innodb.inc + +let $per_table=`select @@innodb_file_per_table`; +let $format=`select @@innodb_file_format`; + +-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0 + +set global innodb_file_per_table=on; +set global innodb_file_format=`1`; + +create table t1(a text) engine=innodb key_block_size=8; + +-- disable_query_log + +# insert some rows so we are using compressed pages +-- let $i = 10 +while ($i) +{ + insert into t1 values(repeat('abcdefghijklmnopqrstuvwxyz',100)); + dec $i; +} +-- enable_query_log + +# we should be using some 8K pages +-- eval $query_i_s + +drop table t1; + +# no lazy eviction at drop table in 5.1 and 5.5 there should be no +# used 8K pages +-- eval $query_i_s + +# create a non-compressed table and insert enough into it to evict +# compressed pages +create table t2(a text) engine=innodb; + +-- disable_query_log + +-- let $i = 200 +while ($i) +{ + insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000)); + dec $i; +} + +-- enable_query_log + +# now there should be no 8K pages in the buffer pool +-- eval $query_i_s + +drop table t2; + +# +# restore environment to the state it was before this test execution +# + +-- disable_query_log +eval set global innodb_file_format=$format; +eval set global innodb_file_per_table=$per_table; |