From d3fbff38b9e8d6395dccfde4388d46824e7152cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 16 Feb 2018 08:21:19 +0200 Subject: [PATCH 1/4] MDEV-14814: encryption.innodb_encryption-page-compression failed in buildbot with timeout on wait condition Problem is that if pages are in buffer pool there is no need for decrypt or page decompression operations. --- .../innodb_encryption-page-compression.result | 15 ++++--------- .../t/innodb_encryption-page-compression.test | 22 +++++++++---------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result index ec92825ac8e..88437408c32 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result +++ b/mysql-test/suite/encryption/r/innodb_encryption-page-compression.result @@ -1,5 +1,4 @@ SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encryption_threads = 4; SET GLOBAL innodb_encrypt_tables = on; set global innodb_compression_algorithm = 1; @@ -139,15 +138,9 @@ count(*) SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; variable_value > 0 1 -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; -variable_value >= 0 -1 SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed'; variable_value > 0 1 -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; -variable_value >= 0 -1 SET GLOBAL innodb_encryption_threads = 4; SET GLOBAL innodb_encrypt_tables = off; update innodb_page_compressed1 set c1 = c1 + 1; @@ -159,8 +152,8 @@ update innodb_page_compressed6 set c1 = c1 + 1; update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; -variable_value >= 0 +SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; +variable_value > 0 1 SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; variable_value > 0 @@ -168,8 +161,8 @@ variable_value > 0 SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed'; variable_value > 0 1 -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; -variable_value >= 0 +SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; +variable_value > 0 1 drop procedure innodb_insert_proc; drop table innodb_normal; diff --git a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test index ea6bd65d605..0c18b97bfd6 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test +++ b/mysql-test/suite/encryption/t/innodb_encryption-page-compression.test @@ -1,17 +1,14 @@ -- source include/have_innodb.inc -- source include/have_example_key_management_plugin.inc +-- source include/not_embedded.inc --disable_query_log -let $innodb_compression_algorithm_orig=`SELECT @@innodb_compression_algorithm`; -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $innodb_encrypt_tables_orig = `SELECT @@innodb_encrypt_tables`; let $innodb_encryption_threads_orig = `SELECT @@innodb_encryption_threads`; --enable_query_log --disable_warnings SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encryption_threads = 4; SET GLOBAL innodb_encrypt_tables = on; --enable_warnings @@ -86,11 +83,13 @@ select count(*) from innodb_page_compressed9 where c1 < 500000; let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED'; --source include/wait_condition.inc +let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED'; +--source include/wait_condition.inc SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed'; -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; + +--source include/restart_mysqld.inc SET GLOBAL innodb_encryption_threads = 4; SET GLOBAL innodb_encrypt_tables = off; @@ -105,13 +104,15 @@ update innodb_page_compressed7 set c1 = c1 + 1; update innodb_page_compressed8 set c1 = c1 + 1; update innodb_page_compressed9 set c1 = c1 + 1; -let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_DECRYPTED'; +let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_ENCRYPTED'; +--source include/wait_condition.inc +let $wait_condition= select variable_value > 0 from information_schema.global_status where variable_name = 'INNODB_NUM_PAGES_PAGE_COMPRESSED'; --source include/wait_condition.inc -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; +SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_encrypted'; SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_decrypted'; SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_compressed'; -SELECT variable_value >= 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; +SELECT variable_value > 0 FROM information_schema.global_status WHERE variable_name = 'innodb_num_pages_page_decompressed'; drop procedure innodb_insert_proc; drop table innodb_normal; @@ -127,9 +128,6 @@ drop table innodb_page_compressed9; # reset system --disable_query_log -EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algorithm_orig; -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_encrypt_tables = $innodb_encrypt_tables_orig; EVAL SET GLOBAL innodb_encryption_threads = $innodb_encryption_threads_orig; --enable_query_log From 21e5335154e4eb689df90c52a6b55263cd2067fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 16 Feb 2018 10:19:57 +0200 Subject: [PATCH 2/4] MDEV-9962: encryption.innodb_encryption_filekeys stalled waiting for key encryption threads to decrypt all required spaces Test changes. --- .../r/innodb_encryption_filekeys.result | 24 +++++-------- .../t/innodb_encryption_filekeys.test | 35 +++++++++---------- 2 files changed, 25 insertions(+), 34 deletions(-) diff --git a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result index ab958004eab..1c8341137b4 100644 --- a/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result +++ b/mysql-test/suite/encryption/r/innodb_encryption_filekeys.result @@ -1,6 +1,4 @@ -call mtr.add_suppression("trying to do an operation on a dropped tablespace .*"); SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = OFF; SET GLOBAL innodb_encryption_threads = 4; CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB; @@ -14,24 +12,21 @@ t1 CREATE TABLE `t1` ( CREATE TABLE t2 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=YES; CREATE TABLE t3 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=NO; CREATE TABLE t4 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB ENCRYPTED=YES ENCRYPTION_KEY_ID=4; -INSERT INTO t2 select * from t1; -INSERT INTO t3 select * from t1; -INSERT INTO t4 select * from t1; SET GLOBAL innodb_encrypt_tables = on; # Wait max 10 min for key encryption threads to encrypt required all spaces # Success! SELECT COUNT(1) FROM t1; COUNT(1) -400 +10 SELECT COUNT(1) FROM t2; COUNT(1) -400 +10 SELECT COUNT(1) FROM t3; COUNT(1) -400 +10 SELECT COUNT(1) FROM t4; COUNT(1) -400 +10 SET GLOBAL innodb_encrypt_tables = off; # Wait max 10 min for key encryption threads to decrypt all required spaces # Success! @@ -50,18 +45,17 @@ INSERT INTO t5 select * from t1; # Success! SELECT COUNT(1) FROM t1; COUNT(1) -400 +10 SELECT COUNT(1) FROM t2; COUNT(1) -400 +10 SELECT COUNT(1) FROM t3; COUNT(1) -400 +10 SELECT COUNT(1) FROM t4; COUNT(1) -400 +10 SELECT COUNT(1) FROM t5; COUNT(1) -400 +10 drop table t1,t2,t3,t4, t5; -set GLOBAL innodb_default_encryption_key_id=1; diff --git a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test index 8f0986071f1..f73e78aa5bf 100644 --- a/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test +++ b/mysql-test/suite/encryption/t/innodb_encryption_filekeys.test @@ -1,21 +1,18 @@ -- source include/have_innodb.inc -- source include/have_file_key_management_plugin.inc -# embedded does not support restart --- source include/not_embedded.inc - -call mtr.add_suppression("trying to do an operation on a dropped tablespace .*"); --disable_query_log let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; let $encrypt_tables = `SELECT @@innodb_encrypt_tables`; let $threads = `SELECT @@innodb_encryption_threads`; +let $key_id = `SELECT @@innodb_default_encryption_key_id`; --enable_query_log +--disable_warnings SET GLOBAL innodb_file_format = `Barracuda`; -SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_encrypt_tables = OFF; SET GLOBAL innodb_encryption_threads = 4; +--enable_warnings CREATE TABLE t1 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNODB; SHOW CREATE TABLE t1; @@ -25,21 +22,20 @@ CREATE TABLE t4 (pk INT PRIMARY KEY AUTO_INCREMENT, c VARCHAR(256)) ENGINE=INNOD --disable_warnings --disable_query_log -set autocommit=0; -let $i = 400; +begin; +let $i = 10; while ($i) { INSERT INTO t1 values(NULL, substring(MD5(RAND()), -128)); dec $i; } -commit; -set autocommit=1; ---enable_warnings ---enable_query_log INSERT INTO t2 select * from t1; INSERT INTO t3 select * from t1; INSERT INTO t4 select * from t1; +commit; +--enable_warnings +--enable_query_log SET GLOBAL innodb_encrypt_tables = on; @@ -60,7 +56,7 @@ while ($cnt) } if (!$success) { - SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; + SELECT NAME,ENCRYPTION_SHCEME,MIN_KEY_VERSION, ROTATING_OR_FLUSHING FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; SHOW STATUS LIKE 'innodb_encryption%'; -- die Timeout waiting for encryption threads } @@ -90,7 +86,7 @@ while ($cnt) } if (!$success) { - SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; + SELECT NAME,ENCRYPTION_SHCEME,MIN_KEY_VERSION, ROTATING_OR_FLUSHING FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; SHOW STATUS LIKE 'innodb_encryption%'; -- die Timeout waiting for encryption threads } @@ -119,7 +115,7 @@ while ($cnt) } if (!$success) { - SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; + SELECT NAME,ENCRYPTION_SHCEME,MIN_KEY_VERSION, ROTATING_OR_FLUSHING FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; SHOW STATUS LIKE 'innodb_encryption%'; -- die Timeout waiting for encryption threads } @@ -131,15 +127,16 @@ SELECT COUNT(1) FROM t3; SELECT COUNT(1) FROM t4; SELECT COUNT(1) FROM t5; +drop table t1,t2,t3,t4, t5; + # reset system --disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; +--disable_warnings EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; EVAL SET GLOBAL innodb_encrypt_tables = $encrypt_tables; EVAL SET GLOBAL innodb_encryption_threads = $threads; +EVAL set GLOBAL innodb_default_encryption_key_id = $key_id; +--enable_warnings --enable_query_log -drop table t1,t2,t3,t4, t5; - -set GLOBAL innodb_default_encryption_key_id=1; From a351f40cba21244b8b6c2d8b86631407abd62dd9 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 16 Feb 2018 14:14:43 +0400 Subject: [PATCH 3/4] MDEV-14541 - Workaround GCC ICE on ARM64 --- storage/mroonga/vendor/groonga/lib/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt index 6765261feb7..2274e95aa24 100644 --- a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt +++ b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt @@ -177,3 +177,8 @@ if(GRN_WITH_MRUBY) FILES ${EXPRESSION_TREE_RUBY_SCRIPTS} DESTINATION "${GRN_RELATIVE_RUBY_SCRIPTS_DIR}/expression_tree") endif() + +# Workaround GCC ICE on ARM64 +IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + ADD_COMPILE_FLAGS(ts/ts_expr_node.c COMPILE_FLAGS "-fno-tree-loop-vectorize") +ENDIF() From 9a46d971495e17664082409e7def042f66b5f88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Sat, 17 Feb 2018 14:20:33 +0200 Subject: [PATCH 4/4] MDEV-15333 MariaDB (still) slow start This performance regression was introduced in the MariaDB 10.1 file format incompatibility bug fix MDEV-11623 (MariaDB 10.1.21 and MariaDB 10.2.4) and partially fixed in MariaDB 10.1.25 in MDEV-12610 without adding a regression test case. On a normal startup (without crash recovery), InnoDB should not read every .ibd data file, because this is slow. Like in MySQL, for now, InnoDB will still open every data file (without reading), and it will read every .ibd file for which an .isl file exists, or the DATA DIRECTORY attribute has been specified for the table. The test case shuts down InnoDB, moves data files, replaces them with garbage, and then restarts InnoDB, expecting no messages to be issued for the garbage files. (Some messages will for now be issued for the table that uses the DATA DIRECTORY attribute.) Finally, the test shuts down the server, restores the old data files, and restarts again to drop the tables. fil_open_single_table_tablespace(): Remove the condition on flags, and only call fsp_flags_try_adjust() if validate==true (reading the first page has been requested). The only caller with validate==false is at server startup when we are processing all records from SYS_TABLES. The flags passed to this function are actually derived from SYS_TABLES.TYPE and SYS_TABLES.N_COLS, and there never was any problem with SYS_TABLES in MariaDB 10.1. The problem that MDEV-11623 was that incorrect tablespace flags were computed and written to FSP_SPACE_FLAGS. --- mysql-test/suite/innodb/r/restart.result | 26 ++++++++ mysql-test/suite/innodb/t/restart.test | 78 ++++++++++++++++++++++++ storage/innobase/fil/fil0fil.cc | 14 +---- storage/xtradb/fil/fil0fil.cc | 12 +--- 4 files changed, 107 insertions(+), 23 deletions(-) create mode 100644 mysql-test/suite/innodb/r/restart.result create mode 100644 mysql-test/suite/innodb/t/restart.test diff --git a/mysql-test/suite/innodb/r/restart.result b/mysql-test/suite/innodb/r/restart.result new file mode 100644 index 00000000000..5ebd6753e8a --- /dev/null +++ b/mysql-test/suite/innodb/r/restart.result @@ -0,0 +1,26 @@ +SET GLOBAL innodb_file_format=Barracuda; +SET GLOBAL innodb_file_per_table=1; +# +# MDEV-15333 MariaDB (still) slow start +# +# FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files +# of tables with .isl file or DATA DIRECTORY attribute. +call mtr.add_suppression("\\[ERROR\\] InnoDB: Invalid flags 0x7a207879 in tablespace 2048948345"); +call mtr.add_suppression("\\[ERROR\\] InnoDB: Error invalid tablespace flags in file '.*td\\.ibd'"); +CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT +PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; +CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC +STATS_PERSISTENT=0 DATA DIRECTORY='MYSQL_TMP_DIR'; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); +COUNT(*) +1 +SELECT * FROM tr; +a +SELECT * FROM tc; +a +SELECT * FROM td; +a +DROP TABLE tr,tc,td; diff --git a/mysql-test/suite/innodb/t/restart.test b/mysql-test/suite/innodb/t/restart.test new file mode 100644 index 00000000000..242a03400ff --- /dev/null +++ b/mysql-test/suite/innodb/t/restart.test @@ -0,0 +1,78 @@ +--source include/innodb_page_size.inc +--source include/not_embedded.inc + +let datadir= `select @@datadir`; +let page_size= `select @@innodb_page_size`; + +SET GLOBAL innodb_file_format=Barracuda; +SET GLOBAL innodb_file_per_table=1; + +--echo # +--echo # MDEV-15333 MariaDB (still) slow start +--echo # + +# Ensure that on normal startup, no data files are read. +# Note: just like in MySQL, all .ibd files will still be +# opened at least once. + +--echo # FIXME: Unlike MySQL, maybe MariaDB should not read the .ibd files +--echo # of tables with .isl file or DATA DIRECTORY attribute. +call mtr.add_suppression("\\[ERROR\\] InnoDB: Invalid flags 0x7a207879 in tablespace 2048948345"); +call mtr.add_suppression("\\[ERROR\\] InnoDB: Error invalid tablespace flags in file '.*td\\.ibd'"); + +CREATE TABLE tr(a INT)ENGINE=InnoDB ROW_FORMAT=REDUNDANT; +CREATE TABLE tc(a INT)ENGINE=InnoDB ROW_FORMAT=COMPACT +PAGE_COMPRESSED=1 PAGE_COMPRESSION_LEVEL=9; +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +eval CREATE TABLE td(a INT)ENGINE=InnoDB ROW_FORMAT=DYNAMIC +STATS_PERSISTENT=0 DATA DIRECTORY='$MYSQL_TMP_DIR'; + +--source include/shutdown_mysqld.inc + +--move_file $datadir/test/tr.ibd $datadir/test/tr0.ibd +--move_file $datadir/test/tc.ibd $datadir/test/tc0.ibd +--move_file $MYSQL_TMP_DIR/test/td.ibd $datadir/test/td0.ibd +# TODO: test that MariaDB does not even attempt to open the files +#--mkdir $datadir/test/tr.ibd +#--mkdir $datadir/test/tc.ibd +#--mkdir $MYSQL_TMP_DIR/test/td.ibd + +perl; +die unless open OUT, ">", "$ENV{datadir}/test/tr.ibd"; +print OUT "foo " x $ENV{page_size}; +close OUT or die; +die unless open OUT, ">", "$ENV{datadir}/test/tc.ibd"; +print OUT "bar " x $ENV{page_size}; +close OUT or die; +die unless open OUT, ">", "$ENV{MYSQL_TMP_DIR}/test/td.ibd"; +print OUT "xyz " x $ENV{page_size}; +close OUT or die; +EOF + +--let $restart_parameters= --skip-innodb-buffer-pool-load-at-startup +--source include/start_mysqld.inc +--let $restart_parameters= + +SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES +WHERE engine = 'innodb' +AND support IN ('YES', 'DEFAULT', 'ENABLED'); + +--source include/shutdown_mysqld.inc + +# TODO: test that MariaDB does not even attempt to open the files +#--rmdir $datadir/test/tr.ibd +#--rmdir $datadir/test/tc.ibd +#--rmdir $MYSQL_TMP_DIR/test/td.ibd +--remove_file $datadir/test/tr.ibd +--remove_file $datadir/test/tc.ibd +--remove_file $MYSQL_TMP_DIR/test/td.ibd + +--move_file $datadir/test/tr0.ibd $datadir/test/tr.ibd +--move_file $datadir/test/tc0.ibd $datadir/test/tc.ibd +--move_file $datadir/test/td0.ibd $MYSQL_TMP_DIR/test/td.ibd + +--source include/start_mysqld.inc +SELECT * FROM tr; +SELECT * FROM tc; +SELECT * FROM td; +DROP TABLE tr,tc,td; diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index b4102e48628..0cdbee09548 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2014, 2017, MariaDB Corporation. +Copyright (c) 2014, 2018, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -4278,17 +4278,7 @@ cleanup_and_exit: mem_free(def.filepath); - /* We need to check fsp flags when no errors has happened and - server was not started on read only mode and tablespace validation - was requested or flags contain other table options except - low order bits to FSP_FLAGS_POS_PAGE_SSIZE position. - Note that flag comparison is pessimistic. Adjust is required - only when flags contain buggy MariaDB 10.1.0 - - MariaDB 10.1.20 flags. */ - if (err == DB_SUCCESS - && !srv_read_only_mode - && (validate - || flags >= (1U << FSP_FLAGS_POS_PAGE_SSIZE))) { + if (err == DB_SUCCESS && validate && !srv_read_only_mode) { fsp_flags_try_adjust(id, flags & ~FSP_FLAGS_MEM_MASK); } diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc index 96902cd77ec..e3a5a351edf 100644 --- a/storage/xtradb/fil/fil0fil.cc +++ b/storage/xtradb/fil/fil0fil.cc @@ -4468,17 +4468,7 @@ cleanup_and_exit: mem_free(def.filepath); - /* We need to check fsp flags when no errors has happened and - server was not started on read only mode and tablespace validation - was requested or flags contain other table options except - low order bits to FSP_FLAGS_POS_PAGE_SSIZE position. - Note that flag comparison is pessimistic. Adjust is required - only when flags contain buggy MariaDB 10.1.0 - - MariaDB 10.1.20 flags. */ - if (err == DB_SUCCESS - && !srv_read_only_mode - && (validate - || flags >= (1U << FSP_FLAGS_POS_PAGE_SSIZE))) { + if (err == DB_SUCCESS && validate && !srv_read_only_mode) { fsp_flags_try_adjust(id, flags & ~FSP_FLAGS_MEM_MASK); }