diff options
author | guilhem@mysql.com <> | 2005-01-06 21:30:39 +0100 |
---|---|---|
committer | guilhem@mysql.com <> | 2005-01-06 21:30:39 +0100 |
commit | 4b2d003bf1337a2729511d2456db07b20df34709 (patch) | |
tree | b3fd93e9768755a98f6b4005b0968a43dac6bd9c /mysys/my_write.c | |
parent | 57099ef6c6f14fa3e6b912f1f8884b9b5feb7c54 (diff) | |
download | mariadb-git-4b2d003bf1337a2729511d2456db07b20df34709.tar.gz |
Fix for BUG#7714 "if disk full, sometimes MyISAM doesn't wait for free space, corrupts table"
This happened only if my_write() couldn't write even one byte.
I cannot easily add a .test for this, but I tested by hand before and after the change.
Diffstat (limited to 'mysys/my_write.c')
-rw-r--r-- | mysys/my_write.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mysys/my_write.c b/mysys/my_write.c index da378d115f1..1d1a893090a 100644 --- a/mysys/my_write.c +++ b/mysys/my_write.c @@ -49,8 +49,7 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags) MyFlags&= ~ MY_WAIT_IF_FULL; /* End if aborted by user */ #endif if ((my_errno == ENOSPC || my_errno == EDQUOT) && - (MyFlags & MY_WAIT_IF_FULL) && - (uint) writenbytes != (uint) -1) + (MyFlags & MY_WAIT_IF_FULL)) { if (!(errors++ % MY_WAIT_GIVE_USER_A_MESSAGE)) my_error(EE_DISK_FULL,MYF(ME_BELL | ME_NOREFRESH), |