Commit a7beb302 authored by unknown's avatar unknown
Browse files

The previous patch fixed the csv engine to support dos, linux, and mac line...

The previous patch fixed the csv engine to support dos, linux, and mac line endings.  The patch, however, had
a problem when the table only has a single record in it.  This patch corrects that.

ha_tina.cc:
  Fix problem with previous patch when there is only one record in the table


storage/csv/ha_tina.cc:
  Fix problem with previous patch when there is only one record in the table
parent 4280cdc4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -487,6 +487,13 @@ byte * find_eoln(byte *data, off_t begin, off_t end, int *eoln_len)
    else
      return data+dataend;

  /*
    if we only have one record in the file then our for loop will break
    before we return.  we should still have seen end of line markers and
    so we just return the line here
  */
  if (*eoln_len > 0)
    return data+dataend;
  return 0;
}