diff options
author | tsmith/tim@siva.hindu.god <> | 2006-09-14 23:19:24 -0600 |
---|---|---|
committer | tsmith/tim@siva.hindu.god <> | 2006-09-14 23:19:24 -0600 |
commit | 7b9f4086fa55b1e3414740d0a6e337134794ab05 (patch) | |
tree | dd6fccf50a67ceee15c758d3bd103902956a4058 /mysys/my_read.c | |
parent | 8ea01fbca805a48f6d69d5022fe885359c294fd2 (diff) | |
download | mariadb-git-7b9f4086fa55b1e3414740d0a6e337134794ab05.tar.gz |
Bug #4053: too many of "error 1236: 'binlog truncated in the middle of event' from master"
- Fix my_read/my_write to handle return values from read/write correctly
- Add debugging 'deprecated function' warning to my_lread/my_lwrite
- Add debugging 'error, read/write interrupt not handled' warning to my_quick_read/my_quick_write
There is no test case associated with these changes. However, this is a conservative change,
and no repeatable test case is available.
Diffstat (limited to 'mysys/my_read.c')
-rw-r--r-- | mysys/my_read.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mysys/my_read.c b/mysys/my_read.c index b7621ac99eb..b59ada20977 100644 --- a/mysys/my_read.c +++ b/mysys/my_read.c @@ -51,8 +51,12 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags) DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d", readbytes,Count,Filedes,my_errno)); #ifdef THREAD - if (readbytes == 0 && errno == EINTR) - continue; /* Interrupted */ + if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR) + { + DBUG_PRINT("debug", ("my_read() was interrupted and returned %d", + (int) readbytes)); + continue; /* Interrupted */ + } #endif if (MyFlags & (MY_WME | MY_FAE | MY_FNABP)) { |