mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
ffb38c9771
encryption.innodb_scrub: Clean up. Make it also cover ROW_FORMAT=COMPRESSED, removing the need for encryption.innodb_scrub_compressed. Add a FIXME comment saying that we should create a secondary index, to demonstrate that also undo log pages get scrubbed. Currently that is not working! Also clean up encryption.innodb_scrub_background, but keep it disabled, because the background scrubbing does not work reliably. Fix both tests so that if something is not scrubbed, the test will be aborted, so that the data files will be preserved. Allow the tests to run on Windows as well.
160 lines
4.6 KiB
Text
160 lines
4.6 KiB
Text
#
|
|
# immediate scrubbing is off
|
|
# background scrubbing is on
|
|
#
|
|
show variables like 'innodb_%scrub_data%';
|
|
Variable_name Value
|
|
innodb_background_scrub_data_check_interval 3600
|
|
innodb_background_scrub_data_compressed ON
|
|
innodb_background_scrub_data_interval 604800
|
|
innodb_background_scrub_data_uncompressed ON
|
|
innodb_immediate_scrub_data_uncompressed OFF
|
|
# make sure spaces are checked quickly
|
|
SET GLOBAL innodb_background_scrub_data_check_interval=1;
|
|
create table delete_3 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=compressed;
|
|
# Populate table with rows
|
|
delete from delete_3;
|
|
create table delete_rollback_delete_3 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=compressed;
|
|
# Populate table with rows
|
|
begin;
|
|
delete from delete_rollback_delete_3;
|
|
rollback;
|
|
delete from delete_rollback_delete_3;
|
|
create table insert_rollback_3 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=compressed;
|
|
# Populate table with rows
|
|
begin;
|
|
rollback;
|
|
create table delete_2 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=compact;
|
|
# Populate table with rows
|
|
delete from delete_2;
|
|
create table delete_rollback_delete_2 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=compact;
|
|
# Populate table with rows
|
|
begin;
|
|
delete from delete_rollback_delete_2;
|
|
rollback;
|
|
delete from delete_rollback_delete_2;
|
|
create table insert_rollback_2 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=compact;
|
|
# Populate table with rows
|
|
begin;
|
|
rollback;
|
|
create table delete_1 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=redundant;
|
|
# Populate table with rows
|
|
delete from delete_1;
|
|
create table delete_rollback_delete_1 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=redundant;
|
|
# Populate table with rows
|
|
begin;
|
|
delete from delete_rollback_delete_1;
|
|
rollback;
|
|
delete from delete_rollback_delete_1;
|
|
create table insert_rollback_1 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=redundant;
|
|
# Populate table with rows
|
|
begin;
|
|
rollback;
|
|
create table delete_0 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=dynamic;
|
|
# Populate table with rows
|
|
delete from delete_0;
|
|
create table delete_rollback_delete_0 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=dynamic;
|
|
# Populate table with rows
|
|
begin;
|
|
delete from delete_rollback_delete_0;
|
|
rollback;
|
|
delete from delete_rollback_delete_0;
|
|
create table insert_rollback_0 (
|
|
a int auto_increment primary key,
|
|
b varchar(256),
|
|
c text,
|
|
index(b)) engine = innodb row_format=dynamic;
|
|
# Populate table with rows
|
|
begin;
|
|
rollback;
|
|
# start scrubbing threads
|
|
SET GLOBAL innodb_encryption_threads=5;
|
|
# Wait max 10 min for scrubbing
|
|
SET GLOBAL innodb_fast_shutdown=0;
|
|
# delete_3.ibd
|
|
# delete_rollback_delete_3.ibd
|
|
# insert_rollback_3.ibd
|
|
# delete_2.ibd
|
|
# delete_rollback_delete_2.ibd
|
|
# insert_rollback_2.ibd
|
|
# delete_1.ibd
|
|
# delete_rollback_delete_1.ibd
|
|
# insert_rollback_1.ibd
|
|
# delete_0.ibd
|
|
# delete_rollback_delete_0.ibd
|
|
# insert_rollback_0.ibd
|
|
check table delete_3, delete_rollback_delete_3, insert_rollback_3;
|
|
Table Op Msg_type Msg_text
|
|
test.delete_3 check status OK
|
|
test.delete_rollback_delete_3 check status OK
|
|
test.insert_rollback_3 check status OK
|
|
drop table delete_3, delete_rollback_delete_3, insert_rollback_3;
|
|
check table delete_2, delete_rollback_delete_2, insert_rollback_2;
|
|
Table Op Msg_type Msg_text
|
|
test.delete_2 check status OK
|
|
test.delete_rollback_delete_2 check status OK
|
|
test.insert_rollback_2 check status OK
|
|
drop table delete_2, delete_rollback_delete_2, insert_rollback_2;
|
|
check table delete_1, delete_rollback_delete_1, insert_rollback_1;
|
|
Table Op Msg_type Msg_text
|
|
test.delete_1 check status OK
|
|
test.delete_rollback_delete_1 check status OK
|
|
test.insert_rollback_1 check status OK
|
|
drop table delete_1, delete_rollback_delete_1, insert_rollback_1;
|
|
check table delete_0, delete_rollback_delete_0, insert_rollback_0;
|
|
Table Op Msg_type Msg_text
|
|
test.delete_0 check status OK
|
|
test.delete_rollback_delete_0 check status OK
|
|
test.insert_rollback_0 check status OK
|
|
drop table delete_0, delete_rollback_delete_0, insert_rollback_0;
|
|
show variables like 'innodb_%scrub_data%';
|
|
Variable_name Value
|
|
innodb_background_scrub_data_check_interval 3600
|
|
innodb_background_scrub_data_compressed ON
|
|
innodb_background_scrub_data_interval 604800
|
|
innodb_background_scrub_data_uncompressed ON
|
|
innodb_immediate_scrub_data_uncompressed OFF
|