Commit 30df297c authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parents da61107f d8d39721
[64k]
innodb-page-size=64K
innodb-buffer-pool-size=24M
[32k]
innodb-page-size=32K
innodb-buffer-pool-size=24M
[16k]
innodb-page-size=16K
[8k]
innodb-page-size=8K
[4k]
innodb-page-size=4K
# The goal of including this file is to enable innodb_page_size combinations
# (see include/innodb_page_size.combinations)
--source include/have_innodb.inc
[16k]
innodb-page-size=16K
[8k]
innodb-page-size=8K
[4k]
innodb-page-size=4K
# The goal of including this file is to enable innodb_page_size combinations
# (see include/innodb_page_size.combinations)
--source include/have_innodb.inc
......@@ -2812,10 +2812,20 @@ sub mysql_server_start($) {
}
my $mysqld_basedir= $mysqld->value('basedir');
my $extra_opts= get_extra_opts($mysqld, $tinfo);
if ( $basedir eq $mysqld_basedir )
{
if (! $opt_start_dirty) # If dirty, keep possibly grown system db
{
# Some InnoDB options are incompatible with the default bootstrap.
# If they are used, re-bootstrap
if ( $extra_opts and
"@$extra_opts" =~ /--innodb[-_](?:page[-_]size|checksum[-_]algorithm|undo[-_]tablespaces|log[-_]group[-_]home[-_]dir|data[-_]home[-_]dir)/ )
{
mysql_install_db($mysqld, undef, $extra_opts);
}
else {
# Copy datadir from installed system db
my $path= ($opt_parallel == 1) ? "$opt_vardir" : "$opt_vardir/..";
my $install_db= "$path/install.db";
......@@ -2823,6 +2833,7 @@ sub mysql_server_start($) {
mtr_error("Failed to copy system db to '$datadir'") unless -d $datadir;
}
}
}
else
{
mysql_install_db($mysqld); # For versional testing
......@@ -2859,7 +2870,6 @@ sub mysql_server_start($) {
if (!$opt_embedded_server)
{
my $extra_opts= get_extra_opts($mysqld, $tinfo);
mysqld_start($mysqld,$extra_opts);
# Save this test case information, so next can examine it
......@@ -3083,7 +3093,7 @@ sub default_mysqld {
sub mysql_install_db {
my ($mysqld, $datadir)= @_;
my ($mysqld, $datadir, $extra_opts)= @_;
my $install_datadir= $datadir || $mysqld->value('datadir');
my $install_basedir= $mysqld->value('basedir');
......@@ -3124,6 +3134,13 @@ sub mysql_install_db {
mtr_add_arg($args, $extra_opt);
}
}
# InnoDB options can come not only from the command line, but also
# from option files or combinations
foreach my $extra_opt ( @$extra_opts ) {
if ($extra_opt =~ /--innodb/) {
mtr_add_arg($args, $extra_opt);
}
}
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
# configure --disable-grant-options), mysqld will not recognize the
......
......@@ -2339,4 +2339,99 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t1`.`i1` AS `i1`,`test`.`t1`.`v1` AS `v1`,`test`.`t2`.`i2` AS `i2`,`test`.`t2`.`v2` AS `v2`,`test`.`t3`.`i3` AS `i3`,`test`.`t3`.`v3` AS `v3` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`v3` = 4) and (`test`.`t1`.`i1` = `test`.`t3`.`i3`) and (`test`.`t2`.`i2` = `test`.`t3`.`i3`))
drop table t1,t2,t3;
#
# MDEV-11958: LEFT JOIN with stored routine produces incorrect result
#
CREATE TABLE t (x INT);
INSERT INTO t VALUES(1),(NULL);
CREATE FUNCTION f (val INT, ret INT) RETURNS INT DETERMINISTIC RETURN IFNULL(val, ret);
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE IFNULL(t2.x,0)=0;
x x IFNULL(t2.x,0) f(t2.x,0)
NULL NULL 0 0
explain extended
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE IFNULL(t2.x,0)=0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t2`.`x` AS `x`,ifnull(`test`.`t2`.`x`,0) AS `IFNULL(t2.x,0)`,`f`(`test`.`t2`.`x`,0) AS `f(t2.x,0)` from `test`.`t` `t1` left join `test`.`t` `t2` on((`test`.`t2`.`x` = `test`.`t1`.`x`)) where (ifnull(`test`.`t2`.`x`,0) = 0)
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE f(t2.x,0)=0;
x x IFNULL(t2.x,0) f(t2.x,0)
NULL NULL 0 0
explain extended
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE f(t2.x,0)=0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t2`.`x` AS `x`,ifnull(`test`.`t2`.`x`,0) AS `IFNULL(t2.x,0)`,`f`(`test`.`t2`.`x`,0) AS `f(t2.x,0)` from `test`.`t` `t1` left join `test`.`t` `t2` on((`test`.`t2`.`x` = `test`.`t1`.`x`)) where (`f`(`test`.`t2`.`x`,0) = 0)
drop function f;
drop table t;
CREATE TABLE t1 (
col1 DECIMAL(33,5) NULL DEFAULT NULL,
col2 DECIMAL(33,5) NULL DEFAULT NULL
);
CREATE TABLE t2 (
col1 DECIMAL(33,5) NULL DEFAULT NULL,
col2 DECIMAL(33,5) NULL DEFAULT NULL,
col3 DECIMAL(33,5) NULL DEFAULT NULL
);
INSERT INTO t1 VALUES (2, 1.1), (2, 2.1);
INSERT INTO t2 VALUES (3, 3.1, 4), (1, 1, NULL);
CREATE FUNCTION f1 ( p_num DECIMAL(45,15), p_return DECIMAL(45,15))
RETURNS decimal(33,5)
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
SQL SECURITY INVOKER
BEGIN
IF p_num IS NULL THEN
RETURN p_return;
ELSE
RETURN p_num;
END IF;
END |
SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE IFNULL(t2.col3,0) = 0;
col1 col1 col3
2.00000 NULL NULL
2.00000 NULL NULL
EXPLAIN EXTENDED SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE IFNULL(t2.col3,0) = 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`col1` AS `col1`,`test`.`t2`.`col1` AS `col1`,`test`.`t2`.`col3` AS `col3` from `test`.`t1` left join `test`.`t2` on((`test`.`t2`.`col2` = `test`.`t1`.`col1`)) where (ifnull(`test`.`t2`.`col3`,0) = 0)
SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE f1(t2.col3,0) = 0;
col1 col1 col3
2.00000 NULL NULL
2.00000 NULL NULL
EXPLAIN EXTENDED SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE f1(t2.col3,0) = 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1003 select `test`.`t1`.`col1` AS `col1`,`test`.`t2`.`col1` AS `col1`,`test`.`t2`.`col3` AS `col3` from `test`.`t1` left join `test`.`t2` on((`test`.`t2`.`col2` = `test`.`t1`.`col1`)) where (`f1`(`test`.`t2`.`col3`,0) = 0)
DROP FUNCTION f1;
DROP TABLE t1,t2;
# end of 5.5 tests
SET optimizer_switch=@save_optimizer_switch;
......@@ -2350,6 +2350,101 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t1`.`i1` AS `i1`,`test`.`t1`.`v1` AS `v1`,`test`.`t2`.`i2` AS `i2`,`test`.`t2`.`v2` AS `v2`,`test`.`t3`.`i3` AS `i3`,`test`.`t3`.`v3` AS `v3` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t3`.`v3` = 4) and (`test`.`t1`.`i1` = `test`.`t3`.`i3`) and (`test`.`t2`.`i2` = `test`.`t3`.`i3`))
drop table t1,t2,t3;
#
# MDEV-11958: LEFT JOIN with stored routine produces incorrect result
#
CREATE TABLE t (x INT);
INSERT INTO t VALUES(1),(NULL);
CREATE FUNCTION f (val INT, ret INT) RETURNS INT DETERMINISTIC RETURN IFNULL(val, ret);
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE IFNULL(t2.x,0)=0;
x x IFNULL(t2.x,0) f(t2.x,0)
NULL NULL 0 0
explain extended
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE IFNULL(t2.x,0)=0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t2`.`x` AS `x`,ifnull(`test`.`t2`.`x`,0) AS `IFNULL(t2.x,0)`,`f`(`test`.`t2`.`x`,0) AS `f(t2.x,0)` from `test`.`t` `t1` left join `test`.`t` `t2` on((`test`.`t2`.`x` = `test`.`t1`.`x`)) where (ifnull(`test`.`t2`.`x`,0) = 0)
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE f(t2.x,0)=0;
x x IFNULL(t2.x,0) f(t2.x,0)
NULL NULL 0 0
explain extended
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE f(t2.x,0)=0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`x` AS `x`,`test`.`t2`.`x` AS `x`,ifnull(`test`.`t2`.`x`,0) AS `IFNULL(t2.x,0)`,`f`(`test`.`t2`.`x`,0) AS `f(t2.x,0)` from `test`.`t` `t1` left join `test`.`t` `t2` on((`test`.`t2`.`x` = `test`.`t1`.`x`)) where (`f`(`test`.`t2`.`x`,0) = 0)
drop function f;
drop table t;
CREATE TABLE t1 (
col1 DECIMAL(33,5) NULL DEFAULT NULL,
col2 DECIMAL(33,5) NULL DEFAULT NULL
);
CREATE TABLE t2 (
col1 DECIMAL(33,5) NULL DEFAULT NULL,
col2 DECIMAL(33,5) NULL DEFAULT NULL,
col3 DECIMAL(33,5) NULL DEFAULT NULL
);
INSERT INTO t1 VALUES (2, 1.1), (2, 2.1);
INSERT INTO t2 VALUES (3, 3.1, 4), (1, 1, NULL);
CREATE FUNCTION f1 ( p_num DECIMAL(45,15), p_return DECIMAL(45,15))
RETURNS decimal(33,5)
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
SQL SECURITY INVOKER
BEGIN
IF p_num IS NULL THEN
RETURN p_return;
ELSE
RETURN p_num;
END IF;
END |
SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE IFNULL(t2.col3,0) = 0;
col1 col1 col3
2.00000 NULL NULL
2.00000 NULL NULL
EXPLAIN EXTENDED SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE IFNULL(t2.col3,0) = 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col1` AS `col1`,`test`.`t2`.`col1` AS `col1`,`test`.`t2`.`col3` AS `col3` from `test`.`t1` left join `test`.`t2` on((`test`.`t2`.`col2` = `test`.`t1`.`col1`)) where (ifnull(`test`.`t2`.`col3`,0) = 0)
SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE f1(t2.col3,0) = 0;
col1 col1 col3
2.00000 NULL NULL
2.00000 NULL NULL
EXPLAIN EXTENDED SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE f1(t2.col3,0) = 0;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1003 select `test`.`t1`.`col1` AS `col1`,`test`.`t2`.`col1` AS `col1`,`test`.`t2`.`col3` AS `col3` from `test`.`t1` left join `test`.`t2` on((`test`.`t2`.`col2` = `test`.`t1`.`col1`)) where (`f1`(`test`.`t2`.`col3`,0) = 0)
DROP FUNCTION f1;
DROP TABLE t1,t2;
# end of 5.5 tests
SET optimizer_switch=@save_optimizer_switch;
set join_cache_level=default;
show variables like 'join_cache_level';
......
--- suite/encryption/r/innodb-checksum-algorithm.result
+++ suite/encryption/r/innodb-checksum-algorithm,32k.reject
@@ -13,9 +13,9 @@
SET GLOBAL innodb_default_encryption_key_id=4;
SET GLOBAL innodb_checksum_algorithm=crc32;
create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=yes;
+ROW_FORMAT=DYNAMIC encrypted=yes;
create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
create table te_crc32(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_crc32(a serial, b blob, index(b(10))) engine=innodb
@@ -222,9 +222,9 @@
t_crc32, tpe_crc32, tp_crc32;
SET GLOBAL innodb_checksum_algorithm=innodb;
create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=yes;
+ROW_FORMAT=DYNAMIC encrypted=yes;
create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
create table te_innodb(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_innodb(a serial, b blob, index(b(10))) engine=innodb
@@ -431,9 +431,9 @@
t_innodb, tpe_innodb, tp_innodb;
SET GLOBAL innodb_checksum_algorithm=none;
create table tce_none(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=yes;
+ROW_FORMAT=DYNAMIC encrypted=yes;
create table tc_none(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
create table te_none(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_none(a serial, b blob, index(b(10))) engine=innodb
--- suite/encryption/r/innodb-checksum-algorithm.result
+++ suite/encryption/r/innodb-checksum-algorithm,64k.reject
@@ -13,9 +13,9 @@
SET GLOBAL innodb_default_encryption_key_id=4;
SET GLOBAL innodb_checksum_algorithm=crc32;
create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=yes;
+ROW_FORMAT=DYNAMIC encrypted=yes;
create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
create table te_crc32(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_crc32(a serial, b blob, index(b(10))) engine=innodb
@@ -222,9 +222,9 @@
t_crc32, tpe_crc32, tp_crc32;
SET GLOBAL innodb_checksum_algorithm=innodb;
create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=yes;
+ROW_FORMAT=DYNAMIC encrypted=yes;
create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
create table te_innodb(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_innodb(a serial, b blob, index(b(10))) engine=innodb
@@ -431,9 +431,9 @@
t_innodb, tpe_innodb, tp_innodb;
SET GLOBAL innodb_checksum_algorithm=none;
create table tce_none(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=yes;
+ROW_FORMAT=DYNAMIC encrypted=yes;
create table tc_none(a serial, b blob, index(b(10))) engine=innodb
-ROW_FORMAT=COMPRESSED encrypted=no;
+ROW_FORMAT=DYNAMIC encrypted=no;
create table te_none(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_none(a serial, b blob, index(b(10))) engine=innodb
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;
SET GLOBAL innodb_file_format = `Barracuda`;
SET GLOBAL innodb_file_per_table = ON;
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_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.");
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.");
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.");
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.");
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.");
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;
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|none|innodb)\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"(innodb|none|crc32)\"");
SET GLOBAL innodb_checksum_algorithm = innodb;
SET GLOBAL innodb_default_encryption_key_id=4;
SET GLOBAL innodb_checksum_algorithm=crc32;
create table tce_crc32(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_crc32(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=no;
create table te_crc32(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_crc32(a serial, b blob, index(b(10))) engine=innodb
encrypted=no;
create table tpe_crc32(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=yes;
create table tp_crc32(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;
insert into tce_crc32(b) values (repeat('secret',20));
insert into tc_crc32(b) values (repeat('secret',20));
insert into te_crc32(b) values (repeat('secret',20));
insert into t_crc32(b) values (repeat('secret',20));
insert into tpe_crc32(b) values (repeat('secret',20));
insert into tp_crc32(b) values (repeat('secret',20));
commit;
# 1 Restart mysqld --innodb-checksum-algorithm=crc32
select count(*) from t1;
count(*)
32
select count(*) from t2;
count(*)
32
select count(*) from t3;
count(*)
32
select count(*) from t4;
count(*)
32
select count(*) from t5;
count(*)
32
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;
# 2 Restart mysqld --innodb-checksum-algorithm=innodb
select count(*) from t1;
count(*)
64
select count(*) from t2;
count(*)
96
select count(*) from t3;
count(*)
96
select count(*) from t4;
count(*)
96
select count(*) from t5;
count(*)
96
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;
# 3 Restart mysqld --innodb-checksum-algorithm=none
select count(*) from t1;
count(*)
128
select count(*) from t2;
count(*)
196
select count(*) from t3;
count(*)
196
select count(*) from t4;
count(*)
196
select count(*) from t5;
count(*)
196
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;
# 4 Restart mysqld --innodb-checksum-algorithm=innodb
select count(*) from t1;
count(*)
228
select count(*) from t2;
count(*)
296
select count(*) from t3;
count(*)
296
select count(*) from t4;
count(*)
296
select count(*) from t5;
count(*)
296
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;
# 5 Restart mysqld --innodb-checksum-algorithm=strict_innodb
select count(*) from t1;
count(*)
328
select count(*) from t2;
count(*)
396
select count(*) from t3;
count(*)
396
select count(*) from t4;
count(*)
396
select count(*) from t5;
count(*)
396
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;
# 6 Restart mysqld --innodb-checksum-algorithm=innodb
select count(*) from t1;
count(*)
428
select count(*) from t2;
count(*)
496
select count(*) from t3;
count(*)
496
select count(*) from t4;
count(*)
496
select count(*) from t5;
count(*)
496
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;
# 7 Restart mysqld --innodb-checksum-algorithm=strict_none
select count(*) from t1;
count(*)
528
select count(*) from t2;
count(*)
596
select count(*) from t3;
count(*)
596
select count(*) from t4;
count(*)
596
select count(*) from t5;
count(*)
596
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;
# 8 Restart mysqld --innodb-checksum-algorithm=innodb
select count(*) from t1;
count(*)
628
select count(*) from t2;
count(*)
696
select count(*) from t3;
count(*)
696
select count(*) from t4;
count(*)
696
select count(*) from t5;
count(*)
696
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;
# 9 Restart mysqld --innodb-checksum-algorithm=strict_crc32
select count(*) from t1;
count(*)
728
select count(*) from t2;
count(*)
796
select count(*) from t3;
count(*)
796
select count(*) from t4;
count(*)
796
select count(*) from t5;
count(*)
796
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;
# 10 Restart mysqld --innodb-checksum-algorithm=innodb
select count(*) from t1;
count(*)
828
select count(*) from t2;
count(*)
896
select count(*) from t3;
count(*)
896
select count(*) from t4;
count(*)
896
select count(*) from t5;
count(*)
896
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;
# Restart mysqld --innodb-checksum-algorithm=crc32
select count(*) from t1;
count(*)
928
select count(*) from t2;
count(*)
996
select count(*) from t3;
count(*)
996
select count(*) from t4;
count(*)
996
select count(*) from t5;
count(*)
996
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;
# 11 Restart mysqld --innodb-checksum-algorithm=strict_crc32
select count(*) from t1;
count(*)
1028
select count(*) from t2;
count(*)
1096
select count(*) from t3;
count(*)
1096
select count(*) from t4;
count(*)
1096
select count(*) from t5;
count(*)
1096
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;
# 12 Restart mysqld --innodb-checksum-algorithm=crc32
select count(*) from t1;
count(*)
1128
select count(*) from t2;
count(*)
1196
select count(*) from t3;
count(*)
1196
select count(*) from t4;
count(*)
1196
select count(*) from t5;
count(*)
1196
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;
# 13 Restart mysqld --innodb-checksum-algorithm=strict_none
select count(*) from t1;
count(*)
1228
select count(*) from t2;
count(*)
1296
select count(*) from t3;
count(*)
1296
select count(*) from t4;
count(*)
1296
select count(*) from t5;
count(*)
1296
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;
# 14 Restart mysqld --innodb-checksum-algorithm=crc32
select count(*) from t1;
count(*)
1328
select count(*) from t2;
count(*)
1396
select count(*) from t3;
count(*)
1396
select count(*) from t4;
count(*)
1396
select count(*) from t5;
count(*)
1396
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;
# 15 Restart mysqld --innodb-checksum-algorithm=strict_innodb
select count(*) from t1;
count(*)
1428
select count(*) from t2;
count(*)
1496
select count(*) from t3;
count(*)
1496
select count(*) from t4;
count(*)
1496
select count(*) from t5;
count(*)
1496
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;
# 16 Restart mysqld --innodb-checksum-algorithm=crc32
select count(*) from t1;
count(*)
1528
select count(*) from t2;
count(*)
1596
select count(*) from t3;
count(*)
1596
select count(*) from t4;
count(*)
1596
select count(*) from t5;
count(*)
1596
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;
# 17 Restart mysqld --innodb-checksum-algorithm=none
select count(*) from t1;
count(*)
1628
select count(*) from t2;
count(*)
1696
select count(*) from t3;
count(*)
1696
select count(*) from t4;
count(*)
1696
select count(*) from t5;
count(*)
1696
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;
# 18 Restart mysqld --innodb-checksum-algorithm=crc32
select count(*) from t1;
count(*)
1728
select count(*) from t2;
count(*)
1796
select count(*) from t3;
count(*)
1796
select count(*) from t4;
count(*)
1796
select count(*) from t5;
count(*)
1796
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;
# Restart mysqld --innodb-checksum-algorithm=strict_crc32
select count(*) from t1;
count(*)
1828
select count(*) from t2;
count(*)
1896
select count(*) from t3;
count(*)
1896
select count(*) from t4;
count(*)
1896
select count(*) from t5;
count(*)
1896
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;
# 19 Restart mysqld --innodb-checksum-algorithm=strict_none
select count(*) from t1;
count(*)
1928
select count(*) from t2;
count(*)
1996
select count(*) from t3;
count(*)
1996
select count(*) from t4;
count(*)
1996
select count(*) from t5;
count(*)
1996
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;
# 20 Restart mysqld --innodb-checksum-algorithm=strict_crc32
select count(*) from t1;
count(*)
2028
select count(*) from t2;
count(*)
2096
select count(*) from t3;
count(*)
2096
select count(*) from t4;
count(*)
2096
select count(*) from t5;
count(*)
2096
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;
# 21 Restart mysqld --innodb-checksum-algorithm=strict_innodb
select count(*) from t1;
count(*)
2128
select count(*) from t2;
count(*)
2196
select count(*) from t3;
count(*)
2196
select count(*) from t4;
count(*)
2196
select count(*) from t5;
count(*)
2196
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;
# 22 Restart mysqld --innodb-checksum-algorithm=strict_crc32
select count(*) from t1;
count(*)
2228
select count(*) from t2;
count(*)
2296
select count(*) from t3;
count(*)
2296
select count(*) from t4;
count(*)
2296
select count(*) from t5;
count(*)
2296
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;
# 23 Restart mysqld --innodb-checksum-algorithm=none
select count(*) from t1;
count(*)
2328
select count(*) from t2;
count(*)
2396
select count(*) from t3;
count(*)
2396
select count(*) from t4;
count(*)
2396
select count(*) from t5;
count(*)
2396
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;
# 24 Restart mysqld --innodb-checksum-algorithm=strict_crc32
select count(*) from t1;
count(*)
2428
select count(*) from t2;
count(*)
2496
select count(*) from t3;
count(*)
2496
select count(*) from t4;
count(*)
2496
select count(*) from t5;
count(*)
2496
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;
# Restart mysqld --innodb-checksum-algorithm=strict_none
select count(*) from t1;
count(*)
2528
select count(*) from t2;
count(*)
2596
select count(*) from t3;
count(*)
2596
select count(*) from t4;
count(*)
2596
select count(*) from t5;
count(*)
2596
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;
# 25 Restart mysqld --innodb-checksum-algorithm=none
select count(*) from t1;
count(*)
2628
select count(*) from t2;
count(*)
2696
select count(*) from t3;
count(*)
2696
select count(*) from t4;
count(*)
2696
select count(*) from t5;
count(*)
2696
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;
# 26 Restart mysqld --innodb-checksum-algorithm=strict_none
select count(*) from t1;
count(*)
2728
select count(*) from t2;
count(*)
2796
select count(*) from t3;
count(*)
2796
select count(*) from t4;
count(*)
2796
select count(*) from t5;
count(*)
2796
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;
# 27 Restart mysqld --innodb-checksum-algorithm=strict_innodb
select count(*) from t1;
count(*)
2828
select count(*) from t2;
count(*)
2896
select count(*) from t3;
count(*)
2896
select count(*) from t4;
count(*)
2896
select count(*) from t5;
count(*)
2896
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;
# 28 Restart mysqld --innodb-checksum-algorithm=strict_none
select count(*) from t1;
count(*)
2928
select count(*) from t2;
count(*)
2996
select count(*) from t3;
count(*)
2996
select count(*) from t4;
count(*)
2996
select count(*) from t5;
count(*)
2996
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;
# Restart mysqld --innodb-checksum-algorithm=none
select count(*) from t1;
count(*)
3028
select count(*) from t2;
count(*)
3096
select count(*) from t3;
count(*)
3096
select count(*) from t4;
count(*)
3096
select count(*) from t5;
count(*)
3096
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;
# 29 Restart mysqld --innodb-checksum-algorithm=strict_innodb
select count(*) from t1;
count(*)
3128
select count(*) from t2;
count(*)
3196
select count(*) from t3;
count(*)
3196
select count(*) from t4;
count(*)
3196
select count(*) from t5;
count(*)
3196
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;
# 30 Restart mysqld --innodb-checksum-algorithm=none
select count(*) from t1;
count(*)
3228
select count(*) from t2;
count(*)
3296
select count(*) from t3;
count(*)
3296
select count(*) from t4;
count(*)
3296
select count(*) from t5;
count(*)
3296
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;
FLUSH TABLES tce_crc32, tc_crc32, te_crc32,
t_crc32, tpe_crc32, tp_crc32 FOR EXPORT;
backup: tce_crc32
backup: tc_crc32
backup: te_crc32
backup: t_crc32
backup: tpe_crc32
backup: tp_crc32
t_crc32.cfg
t_crc32.frm
t_crc32.ibd
tc_crc32.cfg
tc_crc32.frm
tc_crc32.ibd
tce_crc32.cfg
tce_crc32.frm
tce_crc32.ibd
te_crc32.cfg
te_crc32.frm
te_crc32.ibd
tp_crc32.cfg
tp_crc32.frm
tp_crc32.ibd
tpe_crc32.cfg
tpe_crc32.frm
tpe_crc32.ibd
UNLOCK TABLES;
SET GLOBAL innodb_checksum_algorithm=strict_crc32;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
ALTER TABLE t_crc32 DISCARD TABLESPACE;
ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
ALTER TABLE tp_crc32 DISCARD TABLESPACE;
restore: tce_crc32 .ibd and .cfg files
restore: tc_crc32 .ibd and .cfg files
restore: te_crc32 .ibd and .cfg files
restore: t_crc32 .ibd and .cfg files
restore: tpe_crc32 .ibd and .cfg files
restore: tp_crc32 .ibd and .cfg files
ALTER TABLE tce_crc32 IMPORT TABLESPACE;
update tce_crc32 set b=substr(b,1);
ALTER TABLE tc_crc32 IMPORT TABLESPACE;
update tc_crc32 set b=substr(b,1);
ALTER TABLE te_crc32 IMPORT TABLESPACE;
update te_crc32 set b=substr(b,1);
ALTER TABLE t_crc32 IMPORT TABLESPACE;
update t_crc32 set b=substr(b,1);
ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=crc32;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
ALTER TABLE t_crc32 DISCARD TABLESPACE;
ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
ALTER TABLE tp_crc32 DISCARD TABLESPACE;
restore: tce_crc32 .ibd and .cfg files
restore: tc_crc32 .ibd and .cfg files
restore: te_crc32 .ibd and .cfg files
restore: t_crc32 .ibd and .cfg files
restore: tpe_crc32 .ibd and .cfg files
restore: tp_crc32 .ibd and .cfg files
ALTER TABLE tce_crc32 IMPORT TABLESPACE;
update tce_crc32 set b=substr(b,1);
ALTER TABLE tc_crc32 IMPORT TABLESPACE;
update tc_crc32 set b=substr(b,1);
ALTER TABLE te_crc32 IMPORT TABLESPACE;
update te_crc32 set b=substr(b,1);
ALTER TABLE t_crc32 IMPORT TABLESPACE;
update t_crc32 set b=substr(b,1);
ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=strict_innodb;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
ALTER TABLE t_crc32 DISCARD TABLESPACE;
ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
ALTER TABLE tp_crc32 DISCARD TABLESPACE;
restore: tce_crc32 .ibd and .cfg files
restore: tc_crc32 .ibd and .cfg files
restore: te_crc32 .ibd and .cfg files
restore: t_crc32 .ibd and .cfg files
restore: tpe_crc32 .ibd and .cfg files
restore: tp_crc32 .ibd and .cfg files
ALTER TABLE tce_crc32 IMPORT TABLESPACE;
update tce_crc32 set b=substr(b,1);
ALTER TABLE tc_crc32 IMPORT TABLESPACE;
update tc_crc32 set b=substr(b,1);
ALTER TABLE te_crc32 IMPORT TABLESPACE;
update te_crc32 set b=substr(b,1);
ALTER TABLE t_crc32 IMPORT TABLESPACE;
update t_crc32 set b=substr(b,1);
ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
ALTER TABLE t_crc32 DISCARD TABLESPACE;
ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
ALTER TABLE tp_crc32 DISCARD TABLESPACE;
restore: tce_crc32 .ibd and .cfg files
restore: tc_crc32 .ibd and .cfg files
restore: te_crc32 .ibd and .cfg files
restore: t_crc32 .ibd and .cfg files
restore: tpe_crc32 .ibd and .cfg files
restore: tp_crc32 .ibd and .cfg files
ALTER TABLE tce_crc32 IMPORT TABLESPACE;
update tce_crc32 set b=substr(b,1);
ALTER TABLE tc_crc32 IMPORT TABLESPACE;
update tc_crc32 set b=substr(b,1);
ALTER TABLE te_crc32 IMPORT TABLESPACE;
update te_crc32 set b=substr(b,1);
ALTER TABLE t_crc32 IMPORT TABLESPACE;
update t_crc32 set b=substr(b,1);
ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=strict_none;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
ALTER TABLE t_crc32 DISCARD TABLESPACE;
ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
ALTER TABLE tp_crc32 DISCARD TABLESPACE;
restore: tce_crc32 .ibd and .cfg files
restore: tc_crc32 .ibd and .cfg files
restore: te_crc32 .ibd and .cfg files
restore: t_crc32 .ibd and .cfg files
restore: tpe_crc32 .ibd and .cfg files
restore: tp_crc32 .ibd and .cfg files
ALTER TABLE tce_crc32 IMPORT TABLESPACE;
update tce_crc32 set b=substr(b,1);
ALTER TABLE tc_crc32 IMPORT TABLESPACE;
update tc_crc32 set b=substr(b,1);
ALTER TABLE te_crc32 IMPORT TABLESPACE;
update te_crc32 set b=substr(b,1);
ALTER TABLE t_crc32 IMPORT TABLESPACE;
update t_crc32 set b=substr(b,1);
ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
ALTER TABLE tce_crc32 DISCARD TABLESPACE;
ALTER TABLE tc_crc32 DISCARD TABLESPACE;
ALTER TABLE te_crc32 DISCARD TABLESPACE;
ALTER TABLE t_crc32 DISCARD TABLESPACE;
ALTER TABLE tpe_crc32 DISCARD TABLESPACE;
ALTER TABLE tp_crc32 DISCARD TABLESPACE;
restore: tce_crc32 .ibd and .cfg files
restore: tc_crc32 .ibd and .cfg files
restore: te_crc32 .ibd and .cfg files
restore: t_crc32 .ibd and .cfg files
restore: tpe_crc32 .ibd and .cfg files
restore: tp_crc32 .ibd and .cfg files
ALTER TABLE tce_crc32 IMPORT TABLESPACE;
update tce_crc32 set b=substr(b,1);
ALTER TABLE tc_crc32 IMPORT TABLESPACE;
update tc_crc32 set b=substr(b,1);
ALTER TABLE te_crc32 IMPORT TABLESPACE;
update te_crc32 set b=substr(b,1);
ALTER TABLE t_crc32 IMPORT TABLESPACE;
update t_crc32 set b=substr(b,1);
ALTER TABLE tpe_crc32 IMPORT TABLESPACE;
update tpe_crc32 set b=substr(b,1);
ALTER TABLE tp_crc32 IMPORT TABLESPACE;
update tp_crc32 set b=substr(b,1);
CHECK TABLE tce_crc32, tc_crc32, te_crc32,
t_crc32, tpe_crc32, tp_crc32;
Table Op Msg_type Msg_text
test.tce_crc32 check status OK
test.tc_crc32 check status OK
test.te_crc32 check status OK
test.t_crc32 check status OK
test.tpe_crc32 check status OK
test.tp_crc32 check status OK
DROP TABLE tce_crc32, tc_crc32, te_crc32,
t_crc32, tpe_crc32, tp_crc32;
SET GLOBAL innodb_checksum_algorithm=innodb;
create table tce_innodb(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_innodb(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=no;
create table te_innodb(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_innodb(a serial, b blob, index(b(10))) engine=innodb
encrypted=no;
create table tpe_innodb(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=yes;
create table tp_innodb(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=no;
begin;
insert into tce_innodb(b) values (repeat('secret',20));
insert into tc_innodb(b) values (repeat('secret',20));
insert into te_innodb(b) values (repeat('secret',20));
insert into t_innodb(b) values (repeat('secret',20));
insert into tpe_innodb(b) values (repeat('secret',20));
insert into tp_innodb(b) values (repeat('secret',20));
commit;
FLUSH TABLES tce_innodb, tc_innodb, te_innodb,
t_innodb, tpe_innodb, tp_innodb FOR EXPORT;
backup: tce_innodb
backup: tc_innodb
backup: te_innodb
backup: t_innodb
backup: tpe_innodb
backup: tp_innodb
t_innodb.cfg
t_innodb.frm
t_innodb.ibd
tc_innodb.cfg
tc_innodb.frm
tc_innodb.ibd
tce_innodb.cfg
tce_innodb.frm
tce_innodb.ibd
te_innodb.cfg
te_innodb.frm
te_innodb.ibd
tp_innodb.cfg
tp_innodb.frm
tp_innodb.ibd
tpe_innodb.cfg
tpe_innodb.frm
tpe_innodb.ibd
UNLOCK TABLES;
SET GLOBAL innodb_checksum_algorithm=strict_crc32;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
ALTER TABLE t_innodb DISCARD TABLESPACE;
ALTER TABLE tpe_innodb DISCARD TABLESPACE;
ALTER TABLE tp_innodb DISCARD TABLESPACE;
restore: tce_innodb .ibd and .cfg files
restore: tc_innodb .ibd and .cfg files
restore: te_innodb .ibd and .cfg files
restore: t_innodb .ibd and .cfg files
restore: tpe_innodb .ibd and .cfg files
restore: tp_innodb .ibd and .cfg files
ALTER TABLE tce_innodb IMPORT TABLESPACE;
update tce_innodb set b=substr(b,1);
ALTER TABLE tc_innodb IMPORT TABLESPACE;
update tc_innodb set b=substr(b,1);
ALTER TABLE te_innodb IMPORT TABLESPACE;
update te_innodb set b=substr(b,1);
ALTER TABLE t_innodb IMPORT TABLESPACE;
update t_innodb set b=substr(b,1);
ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=crc32;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
ALTER TABLE t_innodb DISCARD TABLESPACE;
ALTER TABLE tpe_innodb DISCARD TABLESPACE;
ALTER TABLE tp_innodb DISCARD TABLESPACE;
restore: tce_innodb .ibd and .cfg files
restore: tc_innodb .ibd and .cfg files
restore: te_innodb .ibd and .cfg files
restore: t_innodb .ibd and .cfg files
restore: tpe_innodb .ibd and .cfg files
restore: tp_innodb .ibd and .cfg files
ALTER TABLE tce_innodb IMPORT TABLESPACE;
update tce_innodb set b=substr(b,1);
ALTER TABLE tc_innodb IMPORT TABLESPACE;
update tc_innodb set b=substr(b,1);
ALTER TABLE te_innodb IMPORT TABLESPACE;
update te_innodb set b=substr(b,1);
ALTER TABLE t_innodb IMPORT TABLESPACE;
update t_innodb set b=substr(b,1);
ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=strict_innodb;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
ALTER TABLE t_innodb DISCARD TABLESPACE;
ALTER TABLE tpe_innodb DISCARD TABLESPACE;
ALTER TABLE tp_innodb DISCARD TABLESPACE;
restore: tce_innodb .ibd and .cfg files
restore: tc_innodb .ibd and .cfg files
restore: te_innodb .ibd and .cfg files
restore: t_innodb .ibd and .cfg files
restore: tpe_innodb .ibd and .cfg files
restore: tp_innodb .ibd and .cfg files
ALTER TABLE tce_innodb IMPORT TABLESPACE;
update tce_innodb set b=substr(b,1);
ALTER TABLE tc_innodb IMPORT TABLESPACE;
update tc_innodb set b=substr(b,1);
ALTER TABLE te_innodb IMPORT TABLESPACE;
update te_innodb set b=substr(b,1);
ALTER TABLE t_innodb IMPORT TABLESPACE;
update t_innodb set b=substr(b,1);
ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
ALTER TABLE t_innodb DISCARD TABLESPACE;
ALTER TABLE tpe_innodb DISCARD TABLESPACE;
ALTER TABLE tp_innodb DISCARD TABLESPACE;
restore: tce_innodb .ibd and .cfg files
restore: tc_innodb .ibd and .cfg files
restore: te_innodb .ibd and .cfg files
restore: t_innodb .ibd and .cfg files
restore: tpe_innodb .ibd and .cfg files
restore: tp_innodb .ibd and .cfg files
ALTER TABLE tce_innodb IMPORT TABLESPACE;
update tce_innodb set b=substr(b,1);
ALTER TABLE tc_innodb IMPORT TABLESPACE;
update tc_innodb set b=substr(b,1);
ALTER TABLE te_innodb IMPORT TABLESPACE;
update te_innodb set b=substr(b,1);
ALTER TABLE t_innodb IMPORT TABLESPACE;
update t_innodb set b=substr(b,1);
ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=strict_none;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
ALTER TABLE t_innodb DISCARD TABLESPACE;
ALTER TABLE tpe_innodb DISCARD TABLESPACE;
ALTER TABLE tp_innodb DISCARD TABLESPACE;
restore: tce_innodb .ibd and .cfg files
restore: tc_innodb .ibd and .cfg files
restore: te_innodb .ibd and .cfg files
restore: t_innodb .ibd and .cfg files
restore: tpe_innodb .ibd and .cfg files
restore: tp_innodb .ibd and .cfg files
ALTER TABLE tce_innodb IMPORT TABLESPACE;
update tce_innodb set b=substr(b,1);
ALTER TABLE tc_innodb IMPORT TABLESPACE;
update tc_innodb set b=substr(b,1);
ALTER TABLE te_innodb IMPORT TABLESPACE;
update te_innodb set b=substr(b,1);
ALTER TABLE t_innodb IMPORT TABLESPACE;
update t_innodb set b=substr(b,1);
ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
ALTER TABLE tce_innodb DISCARD TABLESPACE;
ALTER TABLE tc_innodb DISCARD TABLESPACE;
ALTER TABLE te_innodb DISCARD TABLESPACE;
ALTER TABLE t_innodb DISCARD TABLESPACE;
ALTER TABLE tpe_innodb DISCARD TABLESPACE;
ALTER TABLE tp_innodb DISCARD TABLESPACE;
restore: tce_innodb .ibd and .cfg files
restore: tc_innodb .ibd and .cfg files
restore: te_innodb .ibd and .cfg files
restore: t_innodb .ibd and .cfg files
restore: tpe_innodb .ibd and .cfg files
restore: tp_innodb .ibd and .cfg files
ALTER TABLE tce_innodb IMPORT TABLESPACE;
update tce_innodb set b=substr(b,1);
ALTER TABLE tc_innodb IMPORT TABLESPACE;
update tc_innodb set b=substr(b,1);
ALTER TABLE te_innodb IMPORT TABLESPACE;
update te_innodb set b=substr(b,1);
ALTER TABLE t_innodb IMPORT TABLESPACE;
update t_innodb set b=substr(b,1);
ALTER TABLE tpe_innodb IMPORT TABLESPACE;
update tpe_innodb set b=substr(b,1);
ALTER TABLE tp_innodb IMPORT TABLESPACE;
update tp_innodb set b=substr(b,1);
CHECK TABLE tce_innodb, tc_innodb, te_innodb,
t_innodb, tpe_innodb, tp_innodb;
Table Op Msg_type Msg_text
test.tce_innodb check status OK
test.tc_innodb check status OK
test.te_innodb check status OK
test.t_innodb check status OK
test.tpe_innodb check status OK
test.tp_innodb check status OK
DROP TABLE tce_innodb, tc_innodb, te_innodb,
t_innodb, tpe_innodb, tp_innodb;
SET GLOBAL innodb_checksum_algorithm=none;
create table tce_none(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=yes;
create table tc_none(a serial, b blob, index(b(10))) engine=innodb
ROW_FORMAT=COMPRESSED encrypted=no;
create table te_none(a serial, b blob, index(b(10))) engine=innodb
encrypted=yes;
create table t_none(a serial, b blob, index(b(10))) engine=innodb
encrypted=no;
create table tpe_none(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=yes;
create table tp_none(a serial, b blob, index(b(10))) engine=innodb
page_compressed=yes encrypted=no;
begin;
insert into tce_none(b) values (repeat('secret',20));
insert into tc_none(b) values (repeat('secret',20));
insert into te_none(b) values (repeat('secret',20));
insert into t_none(b) values (repeat('secret',20));
insert into tpe_none(b) values (repeat('secret',20));
insert into tp_none(b) values (repeat('secret',20));
commit;
FLUSH TABLES tce_none, tc_none, te_none,
t_none, tpe_none, tp_none FOR EXPORT;
backup: tce_none
backup: tc_none
backup: te_none
backup: t_none
backup: tpe_none
backup: tp_none
t_none.cfg
t_none.frm
t_none.ibd
tc_none.cfg
tc_none.frm
tc_none.ibd
tce_none.cfg
tce_none.frm
tce_none.ibd
te_none.cfg
te_none.frm
te_none.ibd
tp_none.cfg
tp_none.frm
tp_none.ibd
tpe_none.cfg
tpe_none.frm
tpe_none.ibd
UNLOCK TABLES;
SET GLOBAL innodb_checksum_algorithm=strict_crc32;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
ALTER TABLE t_none DISCARD TABLESPACE;
ALTER TABLE tpe_none DISCARD TABLESPACE;
ALTER TABLE tp_none DISCARD TABLESPACE;
restore: tce_none .ibd and .cfg files
restore: tc_none .ibd and .cfg files
restore: te_none .ibd and .cfg files
restore: t_none .ibd and .cfg files
restore: tpe_none .ibd and .cfg files
restore: tp_none .ibd and .cfg files
ALTER TABLE tce_none IMPORT TABLESPACE;
update tce_none set b=substr(b,1);
ALTER TABLE tc_none IMPORT TABLESPACE;
update tc_none set b=substr(b,1);
ALTER TABLE te_none IMPORT TABLESPACE;
update te_none set b=substr(b,1);
ALTER TABLE t_none IMPORT TABLESPACE;
update t_none set b=substr(b,1);
ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=crc32;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
ALTER TABLE t_none DISCARD TABLESPACE;
ALTER TABLE tpe_none DISCARD TABLESPACE;
ALTER TABLE tp_none DISCARD TABLESPACE;
restore: tce_none .ibd and .cfg files
restore: tc_none .ibd and .cfg files
restore: te_none .ibd and .cfg files
restore: t_none .ibd and .cfg files
restore: tpe_none .ibd and .cfg files
restore: tp_none .ibd and .cfg files
ALTER TABLE tce_none IMPORT TABLESPACE;
update tce_none set b=substr(b,1);
ALTER TABLE tc_none IMPORT TABLESPACE;
update tc_none set b=substr(b,1);
ALTER TABLE te_none IMPORT TABLESPACE;
update te_none set b=substr(b,1);
ALTER TABLE t_none IMPORT TABLESPACE;
update t_none set b=substr(b,1);
ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=strict_innodb;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
ALTER TABLE t_none DISCARD TABLESPACE;
ALTER TABLE tpe_none DISCARD TABLESPACE;
ALTER TABLE tp_none DISCARD TABLESPACE;
restore: tce_none .ibd and .cfg files
restore: tc_none .ibd and .cfg files
restore: te_none .ibd and .cfg files
restore: t_none .ibd and .cfg files
restore: tpe_none .ibd and .cfg files
restore: tp_none .ibd and .cfg files
ALTER TABLE tce_none IMPORT TABLESPACE;
update tce_none set b=substr(b,1);
ALTER TABLE tc_none IMPORT TABLESPACE;
update tc_none set b=substr(b,1);
ALTER TABLE te_none IMPORT TABLESPACE;
update te_none set b=substr(b,1);
ALTER TABLE t_none IMPORT TABLESPACE;
update t_none set b=substr(b,1);
ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=innodb;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
ALTER TABLE t_none DISCARD TABLESPACE;
ALTER TABLE tpe_none DISCARD TABLESPACE;
ALTER TABLE tp_none DISCARD TABLESPACE;
restore: tce_none .ibd and .cfg files
restore: tc_none .ibd and .cfg files
restore: te_none .ibd and .cfg files
restore: t_none .ibd and .cfg files
restore: tpe_none .ibd and .cfg files
restore: tp_none .ibd and .cfg files
ALTER TABLE tce_none IMPORT TABLESPACE;
update tce_none set b=substr(b,1);
ALTER TABLE tc_none IMPORT TABLESPACE;
update tc_none set b=substr(b,1);
ALTER TABLE te_none IMPORT TABLESPACE;
update te_none set b=substr(b,1);
ALTER TABLE t_none IMPORT TABLESPACE;
update t_none set b=substr(b,1);
ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=strict_none;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
ALTER TABLE t_none DISCARD TABLESPACE;
ALTER TABLE tpe_none DISCARD TABLESPACE;
ALTER TABLE tp_none DISCARD TABLESPACE;
restore: tce_none .ibd and .cfg files
restore: tc_none .ibd and .cfg files
restore: te_none .ibd and .cfg files
restore: t_none .ibd and .cfg files
restore: tpe_none .ibd and .cfg files
restore: tp_none .ibd and .cfg files
ALTER TABLE tce_none IMPORT TABLESPACE;
update tce_none set b=substr(b,1);
ALTER TABLE tc_none IMPORT TABLESPACE;
update tc_none set b=substr(b,1);
ALTER TABLE te_none IMPORT TABLESPACE;
update te_none set b=substr(b,1);
ALTER TABLE t_none IMPORT TABLESPACE;
update t_none set b=substr(b,1);
ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
SET GLOBAL innodb_checksum_algorithm=none;
ALTER TABLE tce_none DISCARD TABLESPACE;
ALTER TABLE tc_none DISCARD TABLESPACE;
ALTER TABLE te_none DISCARD TABLESPACE;
ALTER TABLE t_none DISCARD TABLESPACE;
ALTER TABLE tpe_none DISCARD TABLESPACE;
ALTER TABLE tp_none DISCARD TABLESPACE;
restore: tce_none .ibd and .cfg files
restore: tc_none .ibd and .cfg files
restore: te_none .ibd and .cfg files
restore: t_none .ibd and .cfg files
restore: tpe_none .ibd and .cfg files
restore: tp_none .ibd and .cfg files
ALTER TABLE tce_none IMPORT TABLESPACE;
update tce_none set b=substr(b,1);
ALTER TABLE tc_none IMPORT TABLESPACE;
update tc_none set b=substr(b,1);
ALTER TABLE te_none IMPORT TABLESPACE;
update te_none set b=substr(b,1);
ALTER TABLE t_none IMPORT TABLESPACE;
update t_none set b=substr(b,1);
ALTER TABLE tpe_none IMPORT TABLESPACE;
update tpe_none set b=substr(b,1);
ALTER TABLE tp_none IMPORT TABLESPACE;
update tp_none set b=substr(b,1);
CHECK TABLE tce_none, tc_none, te_none,
t_none, tpe_none, tp_none;
Table Op Msg_type Msg_text
test.tce_none check status OK
test.tc_none check status OK
test.te_none check status OK
test.t_none check status OK
test.tpe_none check status OK
test.tp_none check status OK
DROP TABLE tce_none, tc_none, te_none,
t_none, tpe_none, tp_none;
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;
--innodb_checksum_algorithm=innodb
--innodb-tablespaces-encryption
--innodb-encrypt-tables=on
--innodb-encryption-threads=4
-- 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;
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_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.");
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.");
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.");
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.");
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;
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|none|innodb)\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"(innodb|none|crc32)\"");
SET GLOBAL innodb_checksum_algorithm = innodb;
SET GLOBAL innodb_default_encryption_key_id=4;
let MYSQLD_DATADIR =`SELECT @@datadir`;
# 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`;
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;
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;
--source include/have_innodb.inc
--source include/innodb_page_size.inc
--source include/not_embedded.inc
-- echo #
......
--source include/have_innodb.inc
--source include/innodb_page_size.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
......
#Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING OR DISCARDED TABLESPACES
--source include/not_embedded.inc
--source include/have_innodb.inc
--source include/innodb_page_size.inc
let $MYSQLD_DATADIR=`select @@datadir`;
SET GLOBAL innodb_file_per_table=1;
......
--source include/have_innodb.inc
--source include/innodb_page_size.inc
# Save the initial number of concurrent sessions.
--source include/count_sessions.inc
......
--source include/have_innodb.inc
--source include/innodb_page_size.inc
#
# MMDEV-8386: MariaDB creates very big tmp file and hangs on xtradb
......
......@@ -10,8 +10,7 @@
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
# InnoDB is required
--source include/have_innodb.inc
--source include/innodb_page_size.inc
--echo #
--echo # Bug #18734396 INNODB IN-PLACE ALTER FAILURES BLOCK FUTURE ALTERS
......
DROP DATABASE IF EXISTS mysqltest_innodb_zip;
CREATE DATABASE mysqltest_innodb_zip;
USE mysqltest_innodb_zip;
SELECT table_name, row_format, data_length, index_length
......@@ -379,5 +378,4 @@ select @@innodb_file_format_max;
@@innodb_file_format_max
Barracuda
drop table normal_table, zip_table;
USE test;
DROP DATABASE mysqltest_innodb_zip;
--source include/have_innodb.inc
--source include/innodb_page_size_small.inc
# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE
# Related bugs;
# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact
......
-- source include/have_innodb.inc
--disable_warnings
DROP DATABASE IF EXISTS mysqltest_innodb_zip;
--enable_warnings
--source include/innodb_page_size_small.inc
CREATE DATABASE mysqltest_innodb_zip;
USE mysqltest_innodb_zip;
......@@ -13,7 +8,6 @@ SELECT table_name, row_format, data_length, index_length
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
let $innodb_file_format_orig=`select @@innodb_file_format`;
let $innodb_file_format_max_orig=`select @@innodb_file_format_max`;
SET @save_innodb_stats_on_metadata=@@global.innodb_stats_on_metadata;
......@@ -363,12 +357,9 @@ drop table normal_table, zip_table;
-- disable_query_log
eval set global innodb_file_format=$format;
eval set global innodb_file_per_table=$per_table;
eval set session innodb_strict_mode=$innodb_strict_mode_orig;
eval SET GLOBAL innodb_file_format=$innodb_file_format_orig;
eval SET GLOBAL innodb_file_format_max=$innodb_file_format_max_orig;
SET @@global.innodb_stats_on_metadata=@save_innodb_stats_on_metadata;
--enable_query_log
USE test;
DROP DATABASE mysqltest_innodb_zip;
--source include/have_innodb.inc
--source include/innodb_page_size_small.inc
#
# Bug#36169 create innodb compressed table with too large row size crashed
# http://bugs.mysql.com/36169
......
--source include/have_innodb.inc
--source include/innodb_page_size_small.inc
#
# Test case for bug 36172
#
......
-- source include/have_innodb.inc
--source include/innodb_page_size_small.inc
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
......
-- source include/have_innodb.inc
--source include/innodb_page_size_small.inc
let $file_format=`select @@innodb_file_format`;
let $file_per_table=`select @@innodb_file_per_table`;
......
--source include/have_innodb.inc
--source include/innodb_page_size_small.inc
#
# Bug #56680 InnoDB may return wrong results from a case-insensitive index
#
......
......@@ -1882,4 +1882,86 @@ WHERE v3 = 4;
drop table t1,t2,t3;
--echo #
--echo # MDEV-11958: LEFT JOIN with stored routine produces incorrect result
--echo #
CREATE TABLE t (x INT);
INSERT INTO t VALUES(1),(NULL);
CREATE FUNCTION f (val INT, ret INT) RETURNS INT DETERMINISTIC RETURN IFNULL(val, ret);
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE IFNULL(t2.x,0)=0;
explain extended
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE IFNULL(t2.x,0)=0;
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE f(t2.x,0)=0;
explain extended
SELECT t1.x, t2.x, IFNULL(t2.x,0), f(t2.x,0)
FROM t t1 LEFT JOIN t t2
ON t1.x = t2.x
WHERE f(t2.x,0)=0;
drop function f;
drop table t;
CREATE TABLE t1 (
col1 DECIMAL(33,5) NULL DEFAULT NULL,
col2 DECIMAL(33,5) NULL DEFAULT NULL
);
CREATE TABLE t2 (
col1 DECIMAL(33,5) NULL DEFAULT NULL,
col2 DECIMAL(33,5) NULL DEFAULT NULL,
col3 DECIMAL(33,5) NULL DEFAULT NULL
);
INSERT INTO t1 VALUES (2, 1.1), (2, 2.1);
INSERT INTO t2 VALUES (3, 3.1, 4), (1, 1, NULL);
DELIMITER |;
CREATE FUNCTION f1 ( p_num DECIMAL(45,15), p_return DECIMAL(45,15))
RETURNS decimal(33,5)
LANGUAGE SQL
DETERMINISTIC
CONTAINS SQL
SQL SECURITY INVOKER
BEGIN
IF p_num IS NULL THEN
RETURN p_return;
ELSE
RETURN p_num;
END IF;
END |
DELIMITER ;|
let $q1=
SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE IFNULL(t2.col3,0) = 0;
eval $q1;
eval EXPLAIN EXTENDED $q1;
let $q2=
SELECT t1.col1, t2.col1, t2.col3
FROM t1 LEFT OUTER JOIN t2 ON t1.col1 = t2.col2
WHERE f1(t2.col3,0) = 0;
eval $q2;
eval EXPLAIN EXTENDED $q2;
DROP FUNCTION f1;
DROP TABLE t1,t2;
--echo # end of 5.5 tests
SET optimizer_switch=@save_optimizer_switch;
......@@ -1162,7 +1162,11 @@ class Item_func_coercibility :public Item_int_func
longlong val_int();
const char *func_name() const { return "coercibility"; }
void fix_length_and_dec() { max_length=10; maybe_null= 0; }
table_map not_null_tables() const { return 0; }
bool eval_not_null_tables(uchar *)
{
not_null_tables_cache= 0;
return false;
}
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond)
{ return this; }
bool const_item() const { return true; }
......@@ -1444,7 +1448,11 @@ class Item_udf_func :public Item_func
}
void cleanup();
Item_result result_type () const { return udf.result_type(); }
table_map not_null_tables() const { return 0; }
bool eval_not_null_tables(uchar *opt_arg)
{
not_null_tables_cache= 0;
return 0;
}
bool is_expensive() { return 1; }
virtual void print(String *str, enum_query_type query_type);
};
......@@ -1940,7 +1948,11 @@ class Item_func_match :public Item_real_func
bool is_expensive_processor(uchar *arg) { return TRUE; }
enum Functype functype() const { return FT_FUNC; }
const char *func_name() const { return "match"; }
table_map not_null_tables() const { return 0; }
bool eval_not_null_tables(uchar *opt_arg)
{
not_null_tables_cache= 0;
return 0;
}
bool fix_fields(THD *thd, Item **ref);
bool eq(const Item *, bool binary_cmp) const;
/* The following should be safe, even if we compare doubles */
......@@ -2181,6 +2193,11 @@ class Item_func_sp :public Item_func
{
return TRUE;
}
bool eval_not_null_tables(uchar *opt_arg)
{
not_null_tables_cache= 0;
return 0;
}
};
......@@ -2228,7 +2245,11 @@ class Item_func_last_value :public Item_func
void fix_length_and_dec();
enum Item_result result_type () const { return last_value->result_type(); }
const char *func_name() const { return "last_value"; }
table_map not_null_tables() const { return 0; }
bool eval_not_null_tables(uchar *opt_arg)
{
not_null_tables_cache= 0;
return 0;
}
enum_field_types field_type() const { return last_value->field_type(); }
bool const_item() const { return 0; }
void evaluate_sideeffects();
......
......@@ -3386,18 +3386,12 @@ buf_page_get_gen(
goto loop;
}
fprintf(stderr,
"innodb_change_buffering_debug evict %u %u\n",
(unsigned) space, (unsigned) offset);
return(NULL);
}
mutex_enter(&fix_block->mutex);
if (buf_flush_page_try(buf_pool, fix_block)) {
fprintf(stderr,
"innodb_change_buffering_debug flush %u %u\n",
(unsigned) space, (unsigned) offset);
guess = fix_block;
goto loop;
}
......
......@@ -2507,7 +2507,7 @@ DECLARE_THREAD(srv_master_thread)(
case SRV_SHUTDOWN_CLEANUP:
if (srv_shutdown_state == SRV_SHUTDOWN_CLEANUP
&& srv_fast_shutdown < 2) {
srv_shutdown(srv_fast_shutdown == 1);
srv_shutdown(srv_fast_shutdown == 0);
}
srv_suspend_thread(slot);
my_thread_end();
......
......@@ -3446,17 +3446,10 @@ buf_page_get_gen(
goto loop;
}
fprintf(stderr,
"innodb_change_buffering_debug evict %u %u\n",
(unsigned) space, (unsigned) offset);
return(NULL);
}
if (buf_flush_page_try(buf_pool, fix_block)) {
fprintf(stderr,
"innodb_change_buffering_debug flush %u %u\n",
(unsigned) space, (unsigned) offset);
guess = fix_block;
goto loop;
}
......
......@@ -3193,7 +3193,7 @@ DECLARE_THREAD(srv_master_thread)(
case SRV_SHUTDOWN_CLEANUP:
if (srv_shutdown_state == SRV_SHUTDOWN_CLEANUP
&& srv_fast_shutdown < 2) {
srv_shutdown(srv_fast_shutdown == 1);
srv_shutdown(srv_fast_shutdown == 0);
}
srv_suspend_thread(slot);
my_thread_end();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment