Dep/MySQL: Updated MySQL sources to version 5.5.9 (current GA)
This commit is contained in:
@@ -56,11 +56,11 @@ size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags)
|
||||
{
|
||||
if (ferror(stream))
|
||||
my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG),
|
||||
my_filename(fileno(stream)),errno);
|
||||
my_filename(my_fileno(stream)),errno);
|
||||
else
|
||||
if (MyFlags & (MY_NABP | MY_FNABP))
|
||||
my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG),
|
||||
my_filename(fileno(stream)),errno);
|
||||
my_filename(my_fileno(stream)),errno);
|
||||
}
|
||||
my_errno=errno ? errno : -1;
|
||||
if (ferror(stream) || MyFlags & (MY_NABP | MY_FNABP))
|
||||
@@ -119,21 +119,20 @@ size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
|
||||
#ifdef EINTR
|
||||
if (errno == EINTR)
|
||||
{
|
||||
VOID(my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)));
|
||||
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
|
||||
#ifdef THREAD
|
||||
if (my_thread_var->abort)
|
||||
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
|
||||
#endif
|
||||
|
||||
if ((errno == ENOSPC || errno == EDQUOT) &&
|
||||
(MyFlags & MY_WAIT_IF_FULL))
|
||||
{
|
||||
wait_for_free_space("[stream]", errors);
|
||||
errors++;
|
||||
VOID(my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)));
|
||||
(void) my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0));
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
@@ -142,7 +141,7 @@ size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
|
||||
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
||||
{
|
||||
my_error(EE_WRITE, MYF(ME_BELL+ME_WAITTANG),
|
||||
my_filename(fileno(stream)),errno);
|
||||
my_filename(my_fileno(stream)),errno);
|
||||
}
|
||||
writtenbytes= (size_t) -1; /* Return that we got error */
|
||||
break;
|
||||
@@ -182,3 +181,14 @@ my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
|
||||
DBUG_PRINT("exit",("ftell: %lu",(ulong) pos));
|
||||
DBUG_RETURN((my_off_t) pos);
|
||||
} /* my_ftell */
|
||||
|
||||
|
||||
/* Get a File corresponding to the stream*/
|
||||
int my_fileno(FILE *f)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return my_win_fileno(f);
|
||||
#else
|
||||
return fileno(f);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user