• unknown's avatar
    Bug#25807: LOAD DATA INFILE does not work with Pipes · 035062b2
    unknown authored
    Showstopper and regression against 5.0.24.
    
    Previously, we ignored seek() errors (see Bug#22828) and let seek()s
    against pipes fail.  Now, since we check that a seek didn't fail,
    and return without reading, this bug popped up.
    
    This restores the behavior for file-ish objects that could never be 
    seek()ed.
    
    
    mysys/mf_iocache.c:
      If we detect early that the file is not tell()able, then we should
      assume that it's also not seek()able and therefore we should never
      set the (poorly named) "seek_not_done" flag so that we don't immedi-
      ately try to seek() when reading later.
      
      The problem was that tell() was returning -1, so when we read later, 
      we needlessly tried to seek to position  (unsigned long) -1 . 
      
      Also, if we think we're supposed to seek to a position in a file and 
      the file is un-tell()able, then abort.
    035062b2
mf_iocache.c 57.5 KB