diff --git a/mysql-test/include/innodb_page_size.combinations b/mysql-test/include/innodb_page_size.combinations new file mode 100644 index 00000000000..b9b1e1b106f --- /dev/null +++ b/mysql-test/include/innodb_page_size.combinations @@ -0,0 +1,16 @@ +[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 diff --git a/mysql-test/include/innodb_page_size.inc b/mysql-test/include/innodb_page_size.inc new file mode 100644 index 00000000000..754b640da86 --- /dev/null +++ b/mysql-test/include/innodb_page_size.inc @@ -0,0 +1,4 @@ +# The goal of including this file is to enable innodb_page_size combinations +# (see include/innodb_page_size.combinations) + +--source include/have_innodb.inc diff --git a/mysql-test/include/innodb_page_size_small.combinations b/mysql-test/include/innodb_page_size_small.combinations new file mode 100644 index 00000000000..a9b7c7ce14d --- /dev/null +++ b/mysql-test/include/innodb_page_size_small.combinations @@ -0,0 +1,8 @@ +[16k] +innodb-page-size=16K + +[8k] +innodb-page-size=8K + +[4k] +innodb-page-size=4K diff --git a/mysql-test/include/innodb_page_size_small.inc b/mysql-test/include/innodb_page_size_small.inc new file mode 100644 index 00000000000..754b640da86 --- /dev/null +++ b/mysql-test/include/innodb_page_size_small.inc @@ -0,0 +1,4 @@ +# The goal of including this file is to enable innodb_page_size combinations +# (see include/innodb_page_size.combinations) + +--source include/have_innodb.inc diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index ef054fb2d3e..b5c43344797 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2812,15 +2812,26 @@ 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 { - # Copy datadir from installed system db - my $path= ($opt_parallel == 1) ? "$opt_vardir" : "$opt_vardir/.."; - my $install_db= "$path/install.db"; - copytree($install_db, $datadir) if -d $install_db; - mtr_error("Failed to copy system db to '$datadir'") unless -d $datadir; + # 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"; + copytree($install_db, $datadir) if -d $install_db; + mtr_error("Failed to copy system db to '$datadir'") unless -d $datadir; + } } } else @@ -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 diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 52cd0459b97..2109d75a14a 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -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; diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result index eb240122736..69f0c25bb15 100644 --- a/mysql-test/r/join_outer_jcl6.result +++ b/mysql-test/r/join_outer_jcl6.result @@ -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'; diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff new file mode 100644 index 00000000000..cd66df7440b --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,32k.rdiff @@ -0,0 +1,38 @@ +--- 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 diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff new file mode 100644 index 00000000000..523074297da --- /dev/null +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm,64k.rdiff @@ -0,0 +1,38 @@ +--- 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 diff --git a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result index 09a61af2a2f..a853f3869a9 100644 --- a/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result +++ b/mysql-test/suite/encryption/r/innodb-checksum-algorithm.result @@ -1,741 +1,646 @@ +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; diff --git a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.opt b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.opt deleted file mode 100644 index 8a13b909879..00000000000 --- a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.opt +++ /dev/null @@ -1,4 +0,0 @@ ---innodb_checksum_algorithm=innodb ---innodb-tablespaces-encryption ---innodb-encrypt-tables=on ---innodb-encryption-threads=4 diff --git a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test index baea1b8a3eb..d0caed05006 100644 --- a/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test +++ b/mysql-test/suite/encryption/t/innodb-checksum-algorithm.test @@ -1,652 +1,123 @@ --- source include/have_innodb.inc +-- source include/innodb_page_size.inc -- source include/have_file_key_management_plugin.inc -# embedded does not support restart --- source include/not_embedded.inc +SET @saved_file_format = @@global.innodb_file_format; +SET @saved_file_per_table = @@global.innodb_file_per_table; +SET @saved_checksum_algorithm = @@global.innodb_checksum_algorithm; +SET @saved_encrypt_tables = @@global.innodb_encrypt_tables; +SET @saved_encryption_threads = @@global.innodb_encryption_threads; +SET @saved_encryption_key_id = @@global.innodb_default_encryption_key_id; -# -# Tests: -# -# innodb -# 1) innodb => crc32 -# 2) crc32 => innodb -# 3) innodb => none -# 4) none => innodb -# 5) innodb => strict_innodb -# 6) strict_innodb => innodb -# 7) innodb => strict_none -# 8) strict_none => innodb -# 9) innodb => strict_crc32 -# 10) strict_crc32 => innodb -# -# crc32 -# 11) crc32 => strict_crc32 -# 12) strict_crc32 => crc32 -# 13) crc32 => strict_none -# 14) strict_none => crc32 -# 15) crc32 => strict_innodb -# 16) strict_innodb => crc32 -# 17) crc32 => none -# 18) none => crc32 -# (note that innodb is handled on 1 and 2) -# -# strict_crc32 -# 19) strict_crc32 => strict_none -# 20) strict_none => strict_crc32 -# 21) strict_crc32 => strict_innodb -# 22) strict_innodb => strict_crc32 -# 23) strict_crc32 => none -# 24) none => strict_crc32 -# (note that innodb is handled on 9 and 10) -# (note that crc32 is handled on 11 and 12) -# -# strict_none -# 25) strict_none => none -# 26) none => strict_none -# 27) strict_none = strict_innodb -# 28) strict_innodb => strict_none -# (note that innodb is handled on 7 and 8) -# (note that crc32 is handled on 13 and 14) -# (note that strict_crc32 is handled 19 and 20) -# -# none -# 29) none => strict_innodb -# 30) strict_innodb => none -# (note that innodb is handled on 3 and 4) -# (note that crc32 is handled on 17 and 18) -# (note that strict_crc32 is handled on 23 and 24) -# (note that strict_none is handled on 25 and 26) -# -# strict_innodb -# (note that innodb is handled on 5 and 6) -# (note that crc32 is handled on 15 and 16) -# (note that strict_crc32 is handled on 21 and 22) -# (note that strict_none is handled on 27 and 28) -# (note that none is handled on 29 and 30) -# ---disable_warnings SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; +SET GLOBAL innodb_encrypt_tables = ON; +SET GLOBAL innodb_encryption_threads = 4; -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_crc32\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"innodb\". Accepting the page as valid. Change innodb_checksum_algorithm to \"crc32\" to silently accept such pages or rewrite all pages so that they contain \"crc32\" checksum."); +call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_(crc32|none|innodb)\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"(innodb|none|crc32)\""); -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_none\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"innodb\". Accepting the page as valid. Change innodb_checksum_algorithm to \"none\" to silently accept such pages or rewrite all pages so that they contain \"none\" checksum."); +SET GLOBAL innodb_checksum_algorithm = innodb; +SET GLOBAL innodb_default_encryption_key_id=4; -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_crc32\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"none\". Accepting the page as valid. Change innodb_checksum_algorithm to \"crc32\" to silently accept such pages or rewrite all pages so that they contain \"crc32\" checksum."); +let MYSQLD_DATADIR =`SELECT @@datadir`; -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_innodb\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"none\". Accepting the page as valid. Change innodb_checksum_algorithm to \"innodb\" to silently accept such pages or rewrite all pages so that they contain \"innodb\" checksum."); +# ROW_FORMAT=COMPRESSED is unavailable with innodb_page_size=32k or 64k +let $row_format_compressed= `select case when @@global.innodb_page_size>16384 +then 'ROW_FORMAT=DYNAMIC' else 'ROW_FORMAT=COMPRESSED' end`; -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_innodb\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"crc32\". Accepting the page as valid. Change innodb_checksum_algorithm to \"innodb\" to silently accept such pages or rewrite all pages so that they contain \"innodb\" checksum."); +let $from = 3; +while ($from) +{ +dec $from; +let checksum = `select case $from + when 0 then 'none' + when 1 then 'innodb' + when 2 then 'crc32' + end`; +eval SET GLOBAL innodb_checksum_algorithm=$checksum; -call mtr.add_suppression("InnoDB: innodb_checksum_algorithm is set to \"strict_none\" but the page \\[page id: space=[0-9]+, page number=[0-9]+\\] contains a valid checksum \"crc32\". Accepting the page as valid. Change innodb_checksum_algorithm to \"none\" to silently accept such pages or rewrite all pages so that they contain \"none\" checksum."); - ---enable_warnings - -set GLOBAL innodb_default_encryption_key_id=4; -create table t1(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=yes; -create table t2(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb encrypted=yes; -create table t3(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb row_format=compressed encrypted=no; -create table t4(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb encrypted=no; -create table t5(a int not null auto_increment primary key, b blob, index(b(10))) engine=innodb encrypted=yes page_compressed=yes; +eval create table tce_$checksum(a serial, b blob, index(b(10))) engine=innodb +$row_format_compressed encrypted=yes; +eval create table tc_$checksum(a serial, b blob, index(b(10))) engine=innodb +$row_format_compressed encrypted=no; +eval create table te_$checksum(a serial, b blob, index(b(10))) engine=innodb +encrypted=yes; +eval create table t_$checksum(a serial, b blob, index(b(10))) engine=innodb +encrypted=no; +eval create table tpe_$checksum(a serial, b blob, index(b(10))) engine=innodb +page_compressed=yes encrypted=yes; +eval create table tp_$checksum(a serial, b blob, index(b(10))) engine=innodb +page_compressed=yes encrypted=no; begin; -insert into t1(b) values (repeat('secret',20)); -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t1(b) select b from t1; -insert into t2(b) select b from t1; -insert into t3(b) select b from t1; -insert into t4(b) select b from t1; -insert into t5(b) select b from t1; +eval insert into tce_$checksum(b) values (repeat('secret',20)); +eval insert into tc_$checksum(b) values (repeat('secret',20)); +eval insert into te_$checksum(b) values (repeat('secret',20)); +eval insert into t_$checksum(b) values (repeat('secret',20)); +eval insert into tpe_$checksum(b) values (repeat('secret',20)); +eval insert into tp_$checksum(b) values (repeat('secret',20)); commit; ---echo # 1 Restart mysqld --innodb-checksum-algorithm=crc32 --- let $restart_parameters=--innodb-checksum-algorithm=crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1; -insert into t2(b) select b from t1; -insert into t3(b) select b from t1; -insert into t4(b) select b from t1; -insert into t5(b) select b from t1; - ---echo # 2 Restart mysqld --innodb-checksum-algorithm=innodb --- let $restart_parameters=--innodb-checksum-algorithm=innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 3 Restart mysqld --innodb-checksum-algorithm=none --- let $restart_parameters=--innodb-checksum-algorithm=none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 4 Restart mysqld --innodb-checksum-algorithm=innodb --- let $restart_parameters=--innodb-checksum-algorithm=innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 5 Restart mysqld --innodb-checksum-algorithm=strict_innodb --- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 6 Restart mysqld --innodb-checksum-algorithm=innodb --- let $restart_parameters=--innodb-checksum-algorithm=innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 7 Restart mysqld --innodb-checksum-algorithm=strict_none --- let $restart_parameters=--innodb-checksum-algorithm=strict_none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 8 Restart mysqld --innodb-checksum-algorithm=innodb --- let $restart_parameters=--innodb-checksum-algorithm=innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 9 Restart mysqld --innodb-checksum-algorithm=strict_crc32 --- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 10 Restart mysqld --innodb-checksum-algorithm=innodb --- let $restart_parameters=--innodb-checksum-algorithm=innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # Restart mysqld --innodb-checksum-algorithm=crc32 --- let $restart_parameters=--innodb-checksum-algorithm=crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 11 Restart mysqld --innodb-checksum-algorithm=strict_crc32 --- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 12 Restart mysqld --innodb-checksum-algorithm=crc32 --- let $restart_parameters=--innodb-checksum-algorithm=crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 13 Restart mysqld --innodb-checksum-algorithm=strict_none --- let $restart_parameters=--innodb-checksum-algorithm=strict_none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 14 Restart mysqld --innodb-checksum-algorithm=crc32 --- let $restart_parameters=--innodb-checksum-algorithm=crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 15 Restart mysqld --innodb-checksum-algorithm=strict_innodb --- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 16 Restart mysqld --innodb-checksum-algorithm=crc32 --- let $restart_parameters=--innodb-checksum-algorithm=crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 17 Restart mysqld --innodb-checksum-algorithm=none --- let $restart_parameters=--innodb-checksum-algorithm=none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 18 Restart mysqld --innodb-checksum-algorithm=crc32 --- let $restart_parameters=--innodb-checksum-algorithm=crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # Restart mysqld --innodb-checksum-algorithm=strict_crc32 --- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 19 Restart mysqld --innodb-checksum-algorithm=strict_none --- let $restart_parameters=--innodb-checksum-algorithm=strict_none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 20 Restart mysqld --innodb-checksum-algorithm=strict_crc32 --- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 21 Restart mysqld --innodb-checksum-algorithm=strict_innodb --- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 22 Restart mysqld --innodb-checksum-algorithm=strict_crc32 --- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 23 Restart mysqld --innodb-checksum-algorithm=none --- let $restart_parameters=--innodb-checksum-algorithm=none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 24 Restart mysqld --innodb-checksum-algorithm=strict_crc32 --- let $restart_parameters=--innodb-checksum-algorithm=strict_crc32 --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # Restart mysqld --innodb-checksum-algorithm=strict_none --- let $restart_parameters=--innodb-checksum-algorithm=strict_none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 25 Restart mysqld --innodb-checksum-algorithm=none --- let $restart_parameters=--innodb-checksum-algorithm=none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 26 Restart mysqld --innodb-checksum-algorithm=strict_none --- let $restart_parameters=--innodb-checksum-algorithm=strict_none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 27 Restart mysqld --innodb-checksum-algorithm=strict_innodb --- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 28 Restart mysqld --innodb-checksum-algorithm=strict_none --- let $restart_parameters=--innodb-checksum-algorithm=strict_none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # Restart mysqld --innodb-checksum-algorithm=none --- let $restart_parameters=--innodb-checksum-algorithm=none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 29 Restart mysqld --innodb-checksum-algorithm=strict_innodb --- let $restart_parameters=--innodb-checksum-algorithm=strict_innodb --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - ---echo # 30 Restart mysqld --innodb-checksum-algorithm=none --- let $restart_parameters=--innodb-checksum-algorithm=none --- source include/restart_mysqld.inc - -select count(*) from t1; -select count(*) from t2; -select count(*) from t3; -select count(*) from t4; -select count(*) from t5; - -insert into t1(b) select b from t1 limit 100; -insert into t2(b) select b from t1 limit 100; -insert into t3(b) select b from t1 limit 100; -insert into t4(b) select b from t1 limit 100; -insert into t5(b) select b from t1 limit 100; - -drop table t1,t2,t3,t4,t5; - - - +eval FLUSH TABLES tce_$checksum, tc_$checksum, te_$checksum, +t_$checksum, tpe_$checksum, tp_$checksum FOR EXPORT; +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +my @tables = ("tce_", "tc_", "te_", "t_", "tpe_", "tp_"); +ib_backup_tablespaces("test", map{ $_ . $ENV{checksum} } @tables); +EOF +--list_files $MYSQLD_DATADIR/test +UNLOCK TABLES; + +let $to = 6; +while ($to) +{ +dec $to; +let $tocksum = `select case $to + when 0 then 'none' + when 1 then 'strict_none' + when 2 then 'innodb' + when 3 then 'strict_innodb' + when 4 then 'crc32' + when 5 then 'strict_crc32' + end`; + +eval SET GLOBAL innodb_checksum_algorithm=$tocksum; + +eval ALTER TABLE tce_$checksum DISCARD TABLESPACE; +eval ALTER TABLE tc_$checksum DISCARD TABLESPACE; +eval ALTER TABLE te_$checksum DISCARD TABLESPACE; +eval ALTER TABLE t_$checksum DISCARD TABLESPACE; +eval ALTER TABLE tpe_$checksum DISCARD TABLESPACE; +eval ALTER TABLE tp_$checksum DISCARD TABLESPACE; + +perl; +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl"; +my @tables = ("tce_", "tc_", "te_", "t_", "tpe_", "tp_"); +ib_restore_tablespaces("test", map{ $_ . $ENV{checksum} } @tables); +EOF + +eval ALTER TABLE tce_$checksum IMPORT TABLESPACE; +eval update tce_$checksum set b=substr(b,1); +eval ALTER TABLE tc_$checksum IMPORT TABLESPACE; +eval update tc_$checksum set b=substr(b,1); +eval ALTER TABLE te_$checksum IMPORT TABLESPACE; +eval update te_$checksum set b=substr(b,1); +eval ALTER TABLE t_$checksum IMPORT TABLESPACE; +eval update t_$checksum set b=substr(b,1); +eval ALTER TABLE tpe_$checksum IMPORT TABLESPACE; +eval update tpe_$checksum set b=substr(b,1); +eval ALTER TABLE tp_$checksum IMPORT TABLESPACE; +eval update tp_$checksum set b=substr(b,1); +} + +eval CHECK TABLE tce_$checksum, tc_$checksum, te_$checksum, +t_$checksum, tpe_$checksum, tp_$checksum; +eval DROP TABLE tce_$checksum, tc_$checksum, te_$checksum, +t_$checksum, tpe_$checksum, tp_$checksum; +} + +SET GLOBAL innodb_file_format = @saved_file_format; +SET GLOBAL innodb_file_per_table = @saved_file_per_table; +SET GLOBAL innodb_checksum_algorithm = @saved_checksum_algorithm; +SET GLOBAL innodb_encrypt_tables = @saved_encrypt_tables; +SET GLOBAL innodb_encryption_threads = @saved_encryption_threads; +SET GLOBAL innodb_default_encryption_key_id = @saved_encryption_key_id; diff --git a/mysql-test/suite/innodb/t/101_compatibility.test b/mysql-test/suite/innodb/t/101_compatibility.test index c6527566afb..25567b939c7 100644 --- a/mysql-test/suite/innodb/t/101_compatibility.test +++ b/mysql-test/suite/innodb/t/101_compatibility.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc --source include/not_embedded.inc -- echo # diff --git a/mysql-test/suite/innodb/t/innodb-alter-debug.test b/mysql-test/suite/innodb/t/innodb-alter-debug.test index 70017ffba35..f4996916e9f 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-debug.test +++ b/mysql-test/suite/innodb/t/innodb-alter-debug.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc --source include/have_debug.inc --source include/have_debug_sync.inc diff --git a/mysql-test/suite/innodb/t/innodb-alter-discard.test b/mysql-test/suite/innodb/t/innodb-alter-discard.test index 80678cef0a6..c90992e58a3 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-discard.test +++ b/mysql-test/suite/innodb/t/innodb-alter-discard.test @@ -1,7 +1,7 @@ #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; diff --git a/mysql-test/suite/innodb/t/innodb-alter-nullable.test b/mysql-test/suite/innodb/t/innodb-alter-nullable.test index 3f1e82b3183..bb5cdee000a 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-nullable.test +++ b/mysql-test/suite/innodb/t/innodb-alter-nullable.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc # Save the initial number of concurrent sessions. --source include/count_sessions.inc diff --git a/mysql-test/suite/innodb/t/innodb-alter-table.test b/mysql-test/suite/innodb/t/innodb-alter-table.test index 45342b4a218..97f0075f344 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-table.test +++ b/mysql-test/suite/innodb/t/innodb-alter-table.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size.inc # # MMDEV-8386: MariaDB creates very big tmp file and hangs on xtradb diff --git a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test index ec1ea35f1cf..d3f34b12ea6 100644 --- a/mysql-test/suite/innodb/t/innodb-alter-tempfile.test +++ b/mysql-test/suite/innodb/t/innodb-alter-tempfile.test @@ -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 diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result index dbfae3c0630..584a8a5d647 100644 --- a/mysql-test/suite/innodb_zip/r/innodb-zip.result +++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result @@ -1,4 +1,3 @@ -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; diff --git a/mysql-test/suite/innodb_zip/t/innodb-create-options.test b/mysql-test/suite/innodb_zip/t/innodb-create-options.test index aeb22514bf6..53d739feccb 100644 --- a/mysql-test/suite/innodb_zip/t/innodb-create-options.test +++ b/mysql-test/suite/innodb_zip/t/innodb-create-options.test @@ -1,4 +1,4 @@ ---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 diff --git a/mysql-test/suite/innodb_zip/t/innodb-zip.test b/mysql-test/suite/innodb_zip/t/innodb-zip.test index 1c7c7c8c419..e8ba98f14ce 100644 --- a/mysql-test/suite/innodb_zip/t/innodb-zip.test +++ b/mysql-test/suite/innodb_zip/t/innodb-zip.test @@ -1,9 +1,4 @@ --- 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; - diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test index 6426bd683ae..ac1f0a3fe57 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test @@ -1,4 +1,4 @@ ---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 diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test index 015f461e532..7b82a7aba33 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size_small.inc # # Test case for bug 36172 # diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test index 3c5d79826f0..d84feb3b22d 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test @@ -1,4 +1,4 @@ --- 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`; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test index 8bc461719b8..ea1221dd711 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test @@ -1,4 +1,4 @@ --- 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`; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test index f592bd16942..700d7e6f0a8 100644 --- a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test +++ b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test @@ -1,4 +1,4 @@ ---source include/have_innodb.inc +--source include/innodb_page_size_small.inc # # Bug #56680 InnoDB may return wrong results from a case-insensitive index # diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index a3a1278ef1e..88861511d79 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -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; diff --git a/sql/item_func.h b/sql/item_func.h index f44c5d14cda..38d5d0aa873 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1162,7 +1162,11 @@ public: 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 @@ public: } 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 @@ public: 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 @@ public: { return TRUE; } + bool eval_not_null_tables(uchar *opt_arg) + { + not_null_tables_cache= 0; + return 0; + } }; @@ -2228,7 +2245,11 @@ public: 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(); diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 9b9d0b37f13..b4ee3ebc067 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -3386,18 +3386,12 @@ got_block: 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; } diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 787ec97d5a9..5d5a879d656 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -2507,7 +2507,7 @@ suspend_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(); diff --git a/storage/xtradb/buf/buf0buf.cc b/storage/xtradb/buf/buf0buf.cc index da4ab059d07..759e1441ee3 100644 --- a/storage/xtradb/buf/buf0buf.cc +++ b/storage/xtradb/buf/buf0buf.cc @@ -3446,17 +3446,10 @@ got_block: 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; } diff --git a/storage/xtradb/srv/srv0srv.cc b/storage/xtradb/srv/srv0srv.cc index 5f16eca8531..82e2ab15a0b 100644 --- a/storage/xtradb/srv/srv0srv.cc +++ b/storage/xtradb/srv/srv0srv.cc @@ -3193,7 +3193,7 @@ suspend_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();