mariadb/mysql-test/suite/innodb_zip/t/cmp_drop_table.test
Marko Mäkelä e581396b7a MDEV-29983 Deprecate innodb_file_per_table
Before commit 6112853cda in MySQL 4.1.1
introduced the parameter innodb_file_per_table, all InnoDB data was
written to the InnoDB system tablespace (often named ibdata1).
A serious design problem is that once the system tablespace has grown to
some size, it cannot shrink even if the data inside it has been deleted.

There are also other design problems, such as the server hang MDEV-29930
that should only be possible when using innodb_file_per_table=0 and
innodb_undo_tablespaces=0 (storing both tables and undo logs in the
InnoDB system tablespace).

The parameter innodb_change_buffering was deprecated
in commit b5852ffbee.
Starting with commit baf276e6d4
(MDEV-19229) the number of innodb_undo_tablespaces can be increased,
so that the undo logs can be moved out of the system tablespace
of an existing installation.

If all these things (tables, undo logs, and the change buffer) are
removed from the InnoDB system tablespace, the only variable-size
data structure inside it is the InnoDB data dictionary.

DDL operations on .ibd files was optimized in
commit 86dc7b4d4c (MDEV-24626).
That should have removed any thinkable performance advantage of
using innodb_file_per_table=0.

Since there should be no benefit of setting innodb_file_per_table=0,
the parameter should be deprecated. Starting with MySQL 5.6 and
MariaDB Server 10.0, the default value is innodb_file_per_table=1.
2023-01-11 17:55:56 +02:00

48 lines
1 KiB
Text

-- source include/innodb_page_size_small.inc
# lazy eviction might not be lazy enough when key rotation
# scans through pages
-- source include/not_encrypted.inc
-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0
create table t1(a text) engine=innodb key_block_size=4;
-- 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 4K pages
-- eval $query_i_s
drop table t1;
# because of lazy eviction at drop table there should still be some
# used 4K 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 = 500
while ($i)
{
insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000));
dec $i;
}
-- enable_query_log
# now there should be no 4K pages in the buffer pool
-- eval $query_i_s
drop table t2;