List:Commits« Previous MessageNext Message »
From:Olav Sandstaa Date:September 12 2008 5:22pm
Subject:Re: bzr commit into mysql-6.0-falcon branch (vvaintroub:2819) Bug#39421
View as plain text  
Patch looks good. OK to push.

Thanks for fixing this problem, Vlad.

Regards,
Olav


Vladislav Vaintroub wrote:
> #At file:///G:/bzr/mysql-6.0-falcon-team/
>
>  2819 Vladislav Vaintroub	2008-09-12
>       Bug#39421 - messages during recovery about exceptions from ReadFile.
>       Fix:
>       Ignore ERROR_HANDLE_EOF coming from ReadFile(). Read should just return 0 
>       like it does in Posix case.
> modified:
>   storage/falcon/SerialLogFile.cpp
>
> === modified file 'storage/falcon/SerialLogFile.cpp'
> --- a/storage/falcon/SerialLogFile.cpp	2008-09-05 22:36:19 +0000
> +++ b/storage/falcon/SerialLogFile.cpp	2008-09-12 17:01:24 +0000
> @@ -263,15 +263,23 @@ uint32 SerialLogFile::read(int64 positio
>  	overlapped.Offset = pos.LowPart;
>  	overlapped.OffsetHigh = pos.HighPart;
>  
> -	DWORD ret;
> +	DWORD n;
>  
> -	if (!ReadFile(handle, data, effectiveLength, &ret, &overlapped))
> -		throw SQLError(IO_ERROR, "serial log ReadFile failed with %d", GetLastError());
> +	if (!ReadFile(handle, data, effectiveLength, &n, &overlapped))
> +		{
> +		DWORD lastError = GetLastError();
> +		if(lastError != ERROR_HANDLE_EOF)
> +			throw SQLError(IO_ERROR, "serial log ReadFile failed with %d", 
> +							GetLastError());
> +		else
> +			n = 0;	// reached end of file
> +		}
>  
> -	offset = position + effectiveLength;
> +
> +	offset = position + n;
>  	highWater = MAX(offset, highWater);
>  	
> -	return ret;
> +	return n;
>  #else
>  
>  #if defined(HAVE_PREAD) && !defined(HAVE_BROKEN_PREAD)
>
>
>   

Thread
bzr commit into mysql-6.0-falcon branch (vvaintroub:2819) Bug#39421Vladislav Vaintroub12 Sep
  • Re: bzr commit into mysql-6.0-falcon branch (vvaintroub:2819) Bug#39421Olav Sandstaa12 Sep