diff options
author | unknown <monty@donna.mysql.com> | 2001-01-15 17:17:43 +0200 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2001-01-15 17:17:43 +0200 |
commit | 4d37689abeeaacb662c31d58038d2386a5228f8f (patch) | |
tree | 4264a6499afeab1b99e53f927059e5450643a435 /mysys/my_write.c | |
parent | 4e264107df5c286d0a06ff28699aec398e36e684 (diff) | |
download | mariadb-git-4d37689abeeaacb662c31d58038d2386a5228f8f.tar.gz |
Fixed test when exeeding file quota on write
Sanity checks when opening MyISAM files
Docs/manual.texi:
Added information about Borland c++
myisam/mi_check.c:
Cleanup
myisam/mi_open.c:
Added sanity checking
myisam/myisamchk.c:
Better error messages
mysys/my_chsize.c:
Cleanup
mysys/my_seek.c:
Changed debug message
mysys/my_write.c:
Fixed test when exeeding file quota
Diffstat (limited to 'mysys/my_write.c')
-rw-r--r-- | mysys/my_write.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/mysys/my_write.c b/mysys/my_write.c index 03cbec4a0d6..61d6c7d2180 100644 --- a/mysys/my_write.c +++ b/mysys/my_write.c @@ -41,7 +41,8 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags) Count-=writenbytes; } my_errno=errno; - DBUG_PRINT("error",("Write only %d bytes",writenbytes)); + DBUG_PRINT("error",("Write only %d bytes, error: %d", + writenbytes,my_errno)); #ifndef NO_BACKGROUND #ifdef THREAD if (my_thread_var->abort) @@ -56,8 +57,18 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags) VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC)); continue; } - if ((writenbytes == 0 && my_errno == EINTR) || - (writenbytes > 0 && (uint) writenbytes != (uint) -1)) + if (!writenbytes) + { + /* We may come here on an interrupt or if the file quote is exeeded */ + if (my_errno == EINTR) + continue; + if (!errors++) /* Retry once */ + { + errno=EFBIG; /* Assume this is the error */ + continue; + } + } + else if ((uint) writenbytes != (uint) -1) continue; /* Retry */ #endif if (MyFlags & (MY_NABP | MY_FNABP)) |