my_read.c   my_read.c 
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reser ved. /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reser ved.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License. the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
skipping to change at line 52 skipping to change at line 52
save_count= Count; save_count= Count;
for (;;) for (;;)
{ {
errno= 0; /* Linux, Windows don't rese t this on EOF/success */ errno= 0; /* Linux, Windows don't rese t this on EOF/success */
#ifdef _WIN32 #ifdef _WIN32
readbytes= my_win_read(Filedes, Buffer, Count); readbytes= my_win_read(Filedes, Buffer, Count);
#else #else
readbytes= read(Filedes, Buffer, Count); readbytes= read(Filedes, Buffer, Count);
#endif #endif
DBUG_EXECUTE_IF ("simulate_file_read_error",
{
errno= ENOSPC;
readbytes= (size_t) -1;
DBUG_SET("-d,simulate_file_read_error");
DBUG_SET("-d,simulate_my_b_fill_error");
});
if (readbytes != Count) if (readbytes != Count)
{ {
my_errno= errno; my_errno= errno;
if (errno == 0 || (readbytes != (size_t) -1 && if (errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP)))) (MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT; my_errno= HA_ERR_FILE_TOO_SHORT;
DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d" , DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d" ,
(int) readbytes, (ulong) Count, Filedes, (int) readbytes, (ulong) Count, Filedes,
my_errno)); my_errno));
 End of changes. 2 change blocks. 
1 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/