diff --git a/mysql-test/suite/innodb/include/ibd_convert.pl b/mysql-test/suite/innodb/include/ibd_convert.pl index bb9dfbe74b8..9327de6d79a 100644 --- a/mysql-test/suite/innodb/include/ibd_convert.pl +++ b/mysql-test/suite/innodb/include/ibd_convert.pl @@ -15,10 +15,14 @@ sub convert_to_mariadb_101 $badflags |= 1<<6|$compression_level<<7 if ($flags & 1 << 16); $badflags |= ($flags & 15 << 6) << 7; # PAGE_SSIZE - substr ($_, 54, 4) = pack("N", $badflags); - # Replace the innodb_checksum_algorithm=none checksum - substr ($_, 0, 4) = pack("N", 0xdeadbeef); - substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef); - syswrite(FILE, $_, $page_size)==$page_size||die "Unable to write $file\n"; + if ($badflags != $flags) + { + warn "$file: changing $flags to $badflags\n"; + substr ($_, 54, 4) = pack("N", $badflags); + # Replace the innodb_checksum_algorithm=none checksum + substr ($_, 0, 4) = pack("N", 0xdeadbeef); + substr ($_, $page_size - 8, 4) = pack("N", 0xdeadbeef); + syswrite(FILE, $_, $page_size)==$page_size||die "Unable to write $file\n"; + } close(FILE); } diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index fe7af34be2e..e9fbc2545e3 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -4156,7 +4156,8 @@ void fsp_flags_try_adjust(fil_space_t* space, ulint flags) { ut_ad(!srv_read_only_mode); ut_ad(fsp_flags_is_valid(flags, space->id)); - if (!space->size) { + if (!space->size && (space->purpose != FIL_TYPE_TABLESPACE + || !fil_space_get_size(space->id))) { return; } /* This code is executed during server startup while no