mirror of
https://github.com/MariaDB/server.git
synced 2025-08-27 13:04:36 +03:00
Before commit6112853cda
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 commitb5852ffbee
. Starting with commitbaf276e6d4
(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 commit86dc7b4d4c
(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.
97 lines
4.2 KiB
Plaintext
97 lines
4.2 KiB
Plaintext
-- source include/have_innodb.inc
|
|
-- source include/have_file_key_management_plugin.inc
|
|
# embedded does not support restart
|
|
-- source include/not_embedded.inc
|
|
# MDEV-20839 innodb-redo-badkey sporadically fails on buildbot with page dump
|
|
# We only require a debug build to avoid getting page dumps, making use of
|
|
# MDEV-19766: Disable page dump output in debug builds
|
|
-- source include/have_debug.inc
|
|
|
|
call mtr.add_suppression("Plugin 'file_key_management'");
|
|
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
|
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted; key_version=1");
|
|
call mtr.add_suppression("InnoDB: File '.*test/t[1234]\\.ibd' is corrupted");
|
|
call mtr.add_suppression("InnoDB: Recovery failed to read page");
|
|
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
|
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'");
|
|
call mtr.add_suppression("InnoDB: Failed to read page .* from file '.*'");
|
|
call mtr.add_suppression("InnoDB: OPT_PAGE_CHECKSUM mismatch");
|
|
call mtr.add_suppression("InnoDB: Set innodb_force_recovery=1 to ignore corruption");
|
|
call mtr.add_suppression("InnoDB: (Unable to apply log to|Discarding log for) corrupted page ");
|
|
call mtr.add_suppression("InnoDB: Plugin initialization aborted");
|
|
call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed");
|
|
# for innodb_checksum_algorithm=full_crc32 only
|
|
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
|
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
|
-- source include/restart_mysqld.inc
|
|
|
|
--echo # Wait max 10 min for key encryption threads to encrypt all spaces
|
|
--let $wait_timeout= 600
|
|
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
|
|
--source include/wait_condition.inc
|
|
|
|
create table t1(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4;
|
|
create table t2(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb row_format=compressed;
|
|
create table t3(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb encrypted=yes encryption_key_id=4;
|
|
create table t4(a int not null primary key auto_increment, c char(250), b blob, index(b(10))) engine=innodb;
|
|
|
|
begin;
|
|
--disable_query_log
|
|
--let $i = 20
|
|
begin;
|
|
while ($i)
|
|
{
|
|
insert into t1(c,b) values (repeat('secret1',20), repeat('secret2',6000));
|
|
dec $i;
|
|
}
|
|
--enable_query_log
|
|
|
|
insert into t2 select * from t1;
|
|
insert into t3 select * from t1;
|
|
insert into t4 select * from t1;
|
|
commit;
|
|
|
|
--source ../../suite/innodb/include/no_checkpoint_start.inc
|
|
|
|
#
|
|
# We test redo log page read at recv_read_page using
|
|
# incorrect keys from std_data/keys.txt. If checkpoint
|
|
# happens we will skip this test. If no checkpoint
|
|
# happens, InnoDB refuses to start as used
|
|
# encryption key is incorrect.
|
|
#
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
|
begin;
|
|
update t1 set c = repeat('secret3', 20);
|
|
update t2 set c = repeat('secret4', 20);
|
|
update t3 set c = repeat('secret4', 20);
|
|
update t4 set c = repeat('secret4', 20);
|
|
insert into t1 (c,b) values (repeat('secret5',20), repeat('secret6',6000));
|
|
insert into t2 (c,b) values (repeat('secret7',20), repeat('secret8',6000));
|
|
insert into t3 (c,b) values (repeat('secret9',20), repeat('secre10',6000));
|
|
insert into t4 (c,b) values (repeat('secre11',20), repeat('secre12',6000));
|
|
COMMIT;
|
|
let $cleanup= drop table t1,t2,t3,t4;
|
|
--let CLEANUP_IF_CHECKPOINT= $cleanup;
|
|
--source ../../suite/innodb/include/no_checkpoint_end.inc
|
|
|
|
--error 1
|
|
-- source include/start_mysqld.inc
|
|
--source include/kill_mysqld.inc
|
|
|
|
#
|
|
# Now test with innodb-force-recovery=1 i.e. ignore corrupt pages
|
|
#
|
|
|
|
-- let $restart_parameters=--innodb-force-recovery=1
|
|
--error 1
|
|
-- source include/start_mysqld.inc
|
|
|
|
--source include/kill_mysqld.inc
|
|
|
|
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
|
-- source include/start_mysqld.inc
|
|
|
|
drop table t1, t2,t3,t4;
|