1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix for BUG#3248 "Doc says MyISAM warns if disk full but it does not":

we force the message to the error log, and we make it more informative;
we treat EDQUOT like ENOSPC.
This commit is contained in:
guilhem@mysql.com
2004-09-24 11:54:37 +02:00
parent c163a67a4d
commit 53d0daa3a0
6 changed files with 27 additions and 16 deletions

View File

@ -114,13 +114,15 @@ uint my_fwrite(FILE *stream, const byte *Buffer, uint Count, myf MyFlags)
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
#endif
if (errno == ENOSPC && (MyFlags & MY_WAIT_IF_FULL))
if ((errno == ENOSPC || errno == EDQUOT) &&
(MyFlags & MY_WAIT_IF_FULL))
{
if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE))
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH));
sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC);
VOID(my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)));
continue;
if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE))
my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH),
"[stream]",my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
VOID(my_fseek(stream,seekptr,MY_SEEK_SET,MYF(0)));
continue;
}
#endif
if (ferror(stream) || (MyFlags & (MY_NABP | MY_FNABP)))