summaryrefslogtreecommitdiff
path: root/mysys/my_pread.c
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2004-09-24 11:54:37 +0200
committerguilhem@mysql.com <>2004-09-24 11:54:37 +0200
commit53d0daa3a0e5548e8226d228727ed056fb82fb99 (patch)
tree1904cbaab17eae6aa0f58174837482dfc20ee104 /mysys/my_pread.c
parentc163a67a4dc7fc6f239c229def64fcc25ce4307a (diff)
downloadmariadb-git-53d0daa3a0e5548e8226d228727ed056fb82fb99.tar.gz
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.
Diffstat (limited to 'mysys/my_pread.c')
-rw-r--r--mysys/my_pread.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index 661ef48ab3e..f76233fc4cc 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -115,11 +115,12 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
if (my_thread_var->abort)
MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */
#endif
- if (my_errno == ENOSPC && (MyFlags & MY_WAIT_IF_FULL))
+ if ((my_errno == ENOSPC || my_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),
- my_filename(Filedes));
+ my_filename(Filedes),my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC);
VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
continue;
}
@@ -131,7 +132,7 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
{
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
- my_error(EE_WRITE, MYF(ME_BELL+ME_WAITTANG),
+ my_error(EE_WRITE, MYF(ME_BELL | ME_WAITTANG),
my_filename(Filedes),my_errno);
}
DBUG_RETURN(MY_FILE_ERROR); /* Error on read */
@@ -142,4 +143,4 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
if (MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN(0); /* Want only errors */
DBUG_RETURN(writenbytes+written); /* purecov: inspected */
-} /* my_write */
+} /* my_pwrite */