1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

Merge 10.0 into 10.1

Rewrite the test encryption.innodb-checksum-algorithm not to
require any restarts or re-bootstrapping, and to cover all
innodb_page_size combinations.

Test innodb.101_compatibility with all innodb_page_size combinations.
This commit is contained in:
Marko Mäkelä
2017-06-06 09:54:57 +03:00
32 changed files with 1194 additions and 1429 deletions

View File

@@ -1,652 +1,123 @@
-- source include/have_innodb.inc
-- source include/innodb_page_size.inc
-- source include/have_file_key_management_plugin.inc
# embedded does not support restart
-- source include/not_embedded.inc
SET @saved_file_format = @@global.innodb_file_format;
SET @saved_file_per_table = @@global.innodb_file_per_table;
SET @saved_checksum_algorithm = @@global.innodb_checksum_algorithm;
SET @saved_encrypt_tables = @@global.innodb_encrypt_tables;
SET @saved_encryption_threads = @@global.innodb_encryption_threads;
SET @saved_encryption_key_id = @@global.innodb_default_encryption_key_id;
#
# Tests:
#
# innodb
# 1) innodb => crc32
# 2) crc32 => innodb
# 3) innodb => none
# 4) none => innodb
# 5) innodb => strict_innodb
# 6) strict_innodb => innodb
# 7) innodb => strict_none
# 8) strict_none => innodb
# 9) innodb => strict_crc32
# 10) strict_crc32 => innodb
#
# crc32
# 11) crc32 => strict_crc32
# 12) strict_crc32 => crc32
# 13) crc32 => strict_none
# 14) strict_none => crc32
# 15) crc32 => strict_innodb
# 16) strict_innodb => crc32
# 17) crc32 => none
# 18) none => crc32
# (note that innodb is handled on 1 and 2)
#
# strict_crc32
# 19) strict_crc32 => strict_none
# 20) strict_none => strict_crc32
# 21) strict_crc32 => strict_innodb
# 22) strict_innodb => strict_crc32
# 23) strict_crc32 => none
# 24) none => strict_crc32
# (note that innodb is handled on 9 and 10)
# (note that crc32 is handled on 11 and 12)
#
# strict_none
# 25) strict_none => none
# 26) none => strict_none
# 27) strict_none = strict_innodb
# 28) strict_innodb => strict_none
# (note that innodb is handled on 7 and 8)
# (note that crc32 is handled on 13 and 14)
# (note that strict_crc32 is handled 19 and 20)
#
# none
# 29) none => strict_innodb
# 30) strict_innodb => none
# (note that innodb is handled on 3 and 4)
# (note that crc32 is handled on 17 and 18)
# (note that strict_crc32 is handled on 23 and 24)
# (note that strict_none is handled on 25 and 26)
#
# strict_innodb
# (note that innodb is handled on 5 and 6)
# (note that crc32 is handled on 15 and 16)
# (note that strict_crc32 is handled on 21 and 22)
# (note that strict_none is handled on 27 and 28)
# (note that none is handled on 29 and 30)
#
--disable_warnings
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
SET GLOBAL innodb_encrypt_tables = ON;
SET GLOBAL innodb_encryption_threads = 4;
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_crc32\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"innodb\". Accepting the page as valid. Change innodb_checksum_algorithm to \"crc32\" to silently accept such pages or rewrite all pages so that they contain \"crc32\" checksum.");
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_(crc32|none|innodb)\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"(innodb|none|crc32)\"");
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_none\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"innodb\". Accepting the page as valid. Change innodb_checksum_algorithm to \"none\" to silently accept such pages or rewrite all pages so that they contain \"none\" checksum.");
SET GLOBAL innodb_checksum_algorithm = innodb;
SET GLOBAL innodb_default_encryption_key_id=4;
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_crc32\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"none\". Accepting the page as valid. Change innodb_checksum_algorithm to \"crc32\" to silently accept such pages or rewrite all pages so that they contain \"crc32\" checksum.");
let MYSQLD_DATADIR =`SELECT @@datadir`;
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_innodb\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"none\". Accepting the page as valid. Change innodb_checksum_algorithm to \"innodb\" to silently accept such pages or rewrite all pages so that they contain \"innodb\" checksum.");
# ROW_FORMAT=COMPRESSED is unavailable with innodb_page_size=32k or 64k
let $row_format_compressed= `select case when @@global.innodb_page_size>16384
then 'ROW_FORMAT=DYNAMIC' else 'ROW_FORMAT=COMPRESSED' end`;
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_innodb\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"crc32\". Accepting the page as valid. Change innodb_checksum_algorithm to \"innodb\" to silently accept such pages or rewrite all pages so that they contain \"innodb\" checksum.");
let $from = 3;
while ($from)
{
dec $from;
let checksum = `select case $from
when 0 then 'none'
when 1 then 'innodb'
when 2 then 'crc32'
end`;
eval SET GLOBAL innodb_checksum_algorithm=$checksum;
call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_none\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"crc32\". Accepting the page as valid. Change innodb_checksum_algorithm to \"none\" to silently accept such pages or rewrite all pages so that they contain \"none\" checksum.");
--enable_warnings
set GLOBAL innodb_default_encryption_key_id=4;
create table t1(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes;
create table t2(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb encrypted=yes;
create table t3(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no;
create table t4(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb encrypted=no;
create table t5(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb encrypted=yes page_compressed=yes;
eval create table tce_$checksum(a serial, b blob, index(b(10))) engine=innodb
$row_format_compressed encrypted=yes;
eval create table tc_$checksum(a serial, b blob, index(b(10))) engine=innodb
$row_format_compressed encrypted=no;
eval create table te_$checksum(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
eval create table t_$checksum(a serial, b blob, index(b(10))) engine=innodb
encrypted=no;
eval create table tpe_$checksum(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=yes;
eval create table tp_$checksum(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=no;
begin;
insert into t1(b) values (repeat('secret',20));
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t1(b) select b from t1;
insert into t2(b) select b from t1;
insert into t3(b) select b from t1;
insert into t4(b) select b from t1;
insert into t5(b) select b from t1;
eval insert into tce_$checksum(b) values (repeat('secret',20));
eval insert into tc_$checksum(b) values (repeat('secret',20));
eval insert into te_$checksum(b) values (repeat('secret',20));
eval insert into t_$checksum(b) values (repeat('secret',20));
eval insert into tpe_$checksum(b) values (repeat('secret',20));
eval insert into tp_$checksum(b) values (repeat('secret',20));
commit;
--echo # 1 Restart mysqld --innodb-checksum-algorithm=crc32
-- let $restart_parameters=--innodb-checksum-algorithm=crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1;
insert into t2(b) select b from t1;
insert into t3(b) select b from t1;
insert into t4(b) select b from t1;
insert into t5(b) select b from t1;
--echo # 2 Restart mysqld --innodb-checksum-algorithm=innodb
-- let $restart_parameters=--innodb-checksum-algorithm=innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 3 Restart mysqld --innodb-checksum-algorithm=none
-- let $restart_parameters=--innodb-checksum-algorithm=none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 4 Restart mysqld --innodb-checksum-algorithm=innodb
-- let $restart_parameters=--innodb-checksum-algorithm=innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 5 Restart mysqld --innodb-checksum-algorithm=strict_innodb
-- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 6 Restart mysqld --innodb-checksum-algorithm=innodb
-- let $restart_parameters=--innodb-checksum-algorithm=innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 7 Restart mysqld --innodb-checksum-algorithm=strict_none
-- let $restart_parameters=--innodb-checksum-algorithm=strict_none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 8 Restart mysqld --innodb-checksum-algorithm=innodb
-- let $restart_parameters=--innodb-checksum-algorithm=innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 9 Restart mysqld --innodb-checksum-algorithm=strict_crc32
-- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 10 Restart mysqld --innodb-checksum-algorithm=innodb
-- let $restart_parameters=--innodb-checksum-algorithm=innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # Restart mysqld --innodb-checksum-algorithm=crc32
-- let $restart_parameters=--innodb-checksum-algorithm=crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 11 Restart mysqld --innodb-checksum-algorithm=strict_crc32
-- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 12 Restart mysqld --innodb-checksum-algorithm=crc32
-- let $restart_parameters=--innodb-checksum-algorithm=crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 13 Restart mysqld --innodb-checksum-algorithm=strict_none
-- let $restart_parameters=--innodb-checksum-algorithm=strict_none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 14 Restart mysqld --innodb-checksum-algorithm=crc32
-- let $restart_parameters=--innodb-checksum-algorithm=crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 15 Restart mysqld --innodb-checksum-algorithm=strict_innodb
-- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 16 Restart mysqld --innodb-checksum-algorithm=crc32
-- let $restart_parameters=--innodb-checksum-algorithm=crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 17 Restart mysqld --innodb-checksum-algorithm=none
-- let $restart_parameters=--innodb-checksum-algorithm=none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 18 Restart mysqld --innodb-checksum-algorithm=crc32
-- let $restart_parameters=--innodb-checksum-algorithm=crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # Restart mysqld --innodb-checksum-algorithm=strict_crc32
-- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 19 Restart mysqld --innodb-checksum-algorithm=strict_none
-- let $restart_parameters=--innodb-checksum-algorithm=strict_none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 20 Restart mysqld --innodb-checksum-algorithm=strict_crc32
-- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 21 Restart mysqld --innodb-checksum-algorithm=strict_innodb
-- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 22 Restart mysqld --innodb-checksum-algorithm=strict_crc32
-- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 23 Restart mysqld --innodb-checksum-algorithm=none
-- let $restart_parameters=--innodb-checksum-algorithm=none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 24 Restart mysqld --innodb-checksum-algorithm=strict_crc32
-- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # Restart mysqld --innodb-checksum-algorithm=strict_none
-- let $restart_parameters=--innodb-checksum-algorithm=strict_none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 25 Restart mysqld --innodb-checksum-algorithm=none
-- let $restart_parameters=--innodb-checksum-algorithm=none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 26 Restart mysqld --innodb-checksum-algorithm=strict_none
-- let $restart_parameters=--innodb-checksum-algorithm=strict_none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 27 Restart mysqld --innodb-checksum-algorithm=strict_innodb
-- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 28 Restart mysqld --innodb-checksum-algorithm=strict_none
-- let $restart_parameters=--innodb-checksum-algorithm=strict_none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # Restart mysqld --innodb-checksum-algorithm=none
-- let $restart_parameters=--innodb-checksum-algorithm=none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 29 Restart mysqld --innodb-checksum-algorithm=strict_innodb
-- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
--echo # 30 Restart mysqld --innodb-checksum-algorithm=none
-- let $restart_parameters=--innodb-checksum-algorithm=none
-- source include/restart_mysqld.inc
select count(*) from t1;
select count(*) from t2;
select count(*) from t3;
select count(*) from t4;
select count(*) from t5;
insert into t1(b) select b from t1 limit 100;
insert into t2(b) select b from t1 limit 100;
insert into t3(b) select b from t1 limit 100;
insert into t4(b) select b from t1 limit 100;
insert into t5(b) select b from t1 limit 100;
drop table t1,t2,t3,t4,t5;
eval FLUSH TABLES tce_$checksum, tc_$checksum, te_$checksum,
t_$checksum, tpe_$checksum, tp_$checksum FOR EXPORT;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
my @tables = ("tce_", "tc_", "te_", "t_", "tpe_", "tp_");
ib_backup_tablespaces("test", map{ $_ . $ENV{checksum} } @tables);
EOF
--list_files $MYSQLD_DATADIR/test
UNLOCK TABLES;
let $to = 6;
while ($to)
{
dec $to;
let $tocksum = `select case $to
when 0 then 'none'
when 1 then 'strict_none'
when 2 then 'innodb'
when 3 then 'strict_innodb'
when 4 then 'crc32'
when 5 then 'strict_crc32'
end`;
eval SET GLOBAL innodb_checksum_algorithm=$tocksum;
eval ALTER TABLE tce_$checksum DISCARD TABLESPACE;
eval ALTER TABLE tc_$checksum DISCARD TABLESPACE;
eval ALTER TABLE te_$checksum DISCARD TABLESPACE;
eval ALTER TABLE t_$checksum DISCARD TABLESPACE;
eval ALTER TABLE tpe_$checksum DISCARD TABLESPACE;
eval ALTER TABLE tp_$checksum DISCARD TABLESPACE;
perl;
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
my @tables = ("tce_", "tc_", "te_", "t_", "tpe_", "tp_");
ib_restore_tablespaces("test", map{ $_ . $ENV{checksum} } @tables);
EOF
eval ALTER TABLE tce_$checksum IMPORT TABLESPACE;
eval update tce_$checksum set b=substr(b,1);
eval ALTER TABLE tc_$checksum IMPORT TABLESPACE;
eval update tc_$checksum set b=substr(b,1);
eval ALTER TABLE te_$checksum IMPORT TABLESPACE;
eval update te_$checksum set b=substr(b,1);
eval ALTER TABLE t_$checksum IMPORT TABLESPACE;
eval update t_$checksum set b=substr(b,1);
eval ALTER TABLE tpe_$checksum IMPORT TABLESPACE;
eval update tpe_$checksum set b=substr(b,1);
eval ALTER TABLE tp_$checksum IMPORT TABLESPACE;
eval update tp_$checksum set b=substr(b,1);
}
eval CHECK TABLE tce_$checksum, tc_$checksum, te_$checksum,
t_$checksum, tpe_$checksum, tp_$checksum;
eval DROP TABLE tce_$checksum, tc_$checksum, te_$checksum,
t_$checksum, tpe_$checksum, tp_$checksum;
}
SET GLOBAL innodb_file_format = @saved_file_format;
SET GLOBAL innodb_file_per_table = @saved_file_per_table;
SET GLOBAL innodb_checksum_algorithm = @saved_checksum_algorithm;
SET GLOBAL innodb_encrypt_tables = @saved_encrypt_tables;
SET GLOBAL innodb_encryption_threads = @saved_encryption_threads;
SET GLOBAL innodb_default_encryption_key_id = @saved_encryption_key_id;