diff options
author | Daniel Black <daniel@mariadb.org> | 2022-04-07 10:50:04 +1000 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2022-04-07 15:17:52 +1000 |
commit | 4ee00a29e34d80555b6d1b4eb3f7b44b2f8049fa (patch) | |
tree | 44aefc9ba9332ed539b054fa4317c2ac4ee9fee1 | |
parent | e84e134a9100f1d04f9fff56c2097ab4d020b57c (diff) | |
download | mariadb-git-4ee00a29e34d80555b6d1b4eb3f7b44b2f8049fa.tar.gz |
MDEV-28250 aix test case failure innodb_zip.innochecksum_3,4k,crc32,innodb
As discovered by tracing, but also presenting in AIX fseeko
documentation, seeking beyond the EOF is acceptable, as you can write
there.
To display the same error in AIX to other implementations that return
errors on seek, we take the EFBIG error code on reading and error the
same way.
An AIX truss of an aspect of the test:
truss extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
statx("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", 0x0FFFFFFFFFFFF610, 176, 010) = 0
kopen("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", O_RDONLY|O_LARGEFILE) = 3
kfcntl(3, 12, 0x00000001100006C8) = 0
kfcntl(3, F_GETFL, 0x00000001100A6CF8) = 67108864
kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0) = 0
kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096) = 4096
klseek(3, 0, 1, 0x0FFFFFFFFFFFF450) = 0
klseek(3, 17592186040320, 0, 0x0FFFFFFFFFFFF450) = 0
klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0) = 0
kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096) Err#27 EFBIG
An equivalent Linux trace:
ltrace extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
stat64(0x7fff10ea2dc3, 0x7fff10ea0670, 88, 0x8026be41) = 0
open64("./mysql-test/var/log/innodb_zip."..., 0, 02072403160) = 3
fcntl64(3, 6, 0x139f180, 1) = 0
fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 0) = 0
fseeko64(0x615000000080, 0xffffffff000, 0, 5 <unfinished ...>
pthread_getspecific(0, 0x4d0eb8, 0x7fff10ea0490, 0) = 0x7f7b2806d000
<... fseeko64 resumed> ) = 0
fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 1) = 0
feof(0x615000000080) = 0
feof(0x615000000080) = 1
Error: Unable to seek to necessary offset
-rw-r--r-- | extra/innochecksum.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/extra/innochecksum.cc b/extra/innochecksum.cc index 3c3c0275915..5ac48f57fb1 100644 --- a/extra/innochecksum.cc +++ b/extra/innochecksum.cc @@ -1893,6 +1893,18 @@ unexpected_eof: } if (ferror(fil_in)) { +#ifdef _AIX + /* + AIX fseeko can go past eof without error. + the error occurs on read, hence output the + same error here as would show up on other + platforms. This shows up in the mtr test + innodb_zip.innochecksum_3-4k,crc32,innodb + */ + if (errno == EFBIG) { + goto unexpected_eof; + } +#endif fprintf(stderr, "Error reading " ULINTPF " bytes", physical_page_size); perror(" "); |