diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-04 08:21:53 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-04 08:22:33 +0300 |
commit | 12ed50cc8d20cc09e302e5dad9ed6a4a6d4ca222 (patch) | |
tree | 8306e9651e7227b7a5cd4893c64163d6ea161354 /mysql-test/suite/innodb/include | |
parent | b7ea56349189489e0276ad78a27214b8f76193ef (diff) | |
download | mariadb-git-12ed50cc8d20cc09e302e5dad9ed6a4a6d4ca222.tar.gz |
MDEV-15767 innodb.101_compatibility fails
The test innodb.101_compatibility occasionally fails, because the flags
for the tables tdd and tp are not always converted back. Thus, the
second attempt of corrupting the flags will update garbage to garbage,
and cause test failure.
This started failing related to one or two MDEV-12266 commits affecting
the function fsp_flags_try_adjust().
fsp_flags_try_adjust(): If the file has not been opened (space->size==0),
try determining its size by reading the file. Only if the file is not
readable, give up.
Also, avoid dummy writes in the Perl script, and add some instrumentation.
Diffstat (limited to 'mysql-test/suite/innodb/include')
-rw-r--r-- | mysql-test/suite/innodb/include/ibd_convert.pl | 14 |
1 files changed, 9 insertions, 5 deletions
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); } |