Debian Codegraph @

mysql-test/suite/innodb_zip/t/cmp_drop_table.test

raw
1 -- source include/innodb_page_size_small.inc
2 # lazy eviction might not be lazy enough when key rotation
3 # scans through pages
4 -- source include/not_encrypted.inc
5
6 -- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
7
8 create table t1(a text) engine=innodb key_block_size=4;
9
10 -- disable_query_log
11
12 # insert some rows so we are using compressed pages
13 -- let $i = 10
14 while ($i)
15 {
16 insert into t1 values(repeat('abcdefghijklmnopqrstuvwxyz',100));
17 dec $i;
18 }
19 -- enable_query_log
20
21 # we should be using some 4K pages
22 -- eval $query_i_s
23
24 drop table t1;
25
26 # because of lazy eviction at drop table there should still be some
27 # used 4K pages
28 -- eval $query_i_s
29
30 # create a non-compressed table and insert enough into it to evict
31 # compressed pages
32 create table t2(a text) engine=innodb;
33
34 -- disable_query_log
35
36 -- let $i = 500
37 while ($i)
38 {
39 insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000));
40 dec $i;
41 }
42
43 -- enable_query_log
44
45 # now there should be no 4K pages in the buffer pool
46 -- eval $query_i_s
47
48 drop table t2;