Vlad,
nice catch. One minor comment inline.
On Mi, 2008-12-17 at 16:26 +0000, Vladislav Vaintroub wrote:
> #At file:///G:/bzr/mysql-6.0-falcon-team/
>
> 2942 Vladislav Vaintroub 2008-12-17
> Bug #41545 sporadic pushbuild failure: [Falcon] Error: read error on database
> header
>
> Falcon crashes in ASSERT if it cannot read header from tablespace. The actual
> problem
> seems to be the lack of diskspace on the pushbuild box.
>
> Solution: throw exception instead of ASSERT. Exceptions are caught within
> plugin initialization code, i.e errors like this are handled gracefully
> with error message instead of just aborting the server.
> modified:
> storage/falcon/IO.cpp
>
> === modified file 'storage/falcon/IO.cpp'
> --- a/storage/falcon/IO.cpp 2008-11-20 17:05:50 +0000
> +++ b/storage/falcon/IO.cpp 2008-12-17 16:26:04 +0000
> @@ -390,7 +390,9 @@ void IO::readHeader(Hdr * header)
> n = ::read (fileId, buffer, maxPageSize);
>
> if (n < (int) sizeof (Hdr))
> - FATAL ("read error on database header");
> + throw SQLError(IO_ERROR,
> + "read error on tablespace header, file %s, read %d bytes at least %d was
> expected",
> + fileName.getString(), n, (int)sizeof(Hdr));
Please make "if (n < (int) sizeof (Hdr))" and "(int)sizeof(Hdr)"
consistent (ie, whitespace police).
>
> Hdr* hdr = (Hdr*) buffer;
> if (falcon_checksums && hdr->pageSize <= n)
>
>
--
Hakan Küçükyılmaz, Senior Software Engineer DBTG/MySQL +49 160
98953296
Sun Microsystems GmbH Sonnenallee 1, DE-85551 Kirchheim-Heimstetten
Geschaeftsfuehrer: Thomas Schroeder, Wolfang Engels, Dr. Roland Boemer
Vorsitz d. Aufs.rat.: Martin Haering HRB MUC 161028 49.011, 8.376