summaryrefslogtreecommitdiff
path: root/storage/csv
diff options
context:
space:
mode:
authorunknown <reggie@big_geek.>2006-05-24 15:41:12 -0500
committerunknown <reggie@big_geek.>2006-05-24 15:41:12 -0500
commita7beb302226ec5de810df1f231fa5265cb432fae (patch)
tree1b48d69c3bc48557bfeb1a1ce34bcc917439f8cd /storage/csv
parent4280cdc45ccdbcd566d7e56c9f35819fb7fa9cf5 (diff)
downloadmariadb-git-a7beb302226ec5de810df1f231fa5265cb432fae.tar.gz
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
Diffstat (limited to 'storage/csv')
-rw-r--r--storage/csv/ha_tina.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 6e0de1bc57d..f15ce7cccb5 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -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;
}