• unknown's avatar
    Bug#4053: too many of "error 1236: 'binlog truncated in the middle of \ · 626abc52
    unknown authored
    	event' from master"
    
    Since there is no repeatable test case, and this is obviously wrong, this is
    the most conservative change that might possibly work.  
    
    The syscall  read()  wasn't checked for a negative return value for an
    interrupted read.  The kernel  sys_read()  returns -EINTR, and the "library" 
    layer maps that to return value of -1 and sets  errno  to EINTR.  It's 
    impossible (on Linux) for  read()  to set errno EINTR without the return 
    value being -1 .
    
    So, if we're checking for EINTR behavior, we should not require that the
    return value be zero.
    
    
    mysys/my_read.c:
      The read() syscall should check for negative one, since that (usually) signals
      errors (like being interrupted) and zero (usually) signals end-of-file .
    626abc52
my_read.c 2.74 KB