Changeset: 5e7f208f499a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5e7f208f499a
Modified Files:
        monetdb5/modules/mal/tablet.c
Branch: Jan2022
Log Message:

Fix parsing of CSV data when NO ESCAPE is in effect and a field ends with 
backslash.


diffs (21 lines):

diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -994,7 +994,7 @@ SQLload_parse_row(READERtask *task, int 
 
                        /* eat away the column separator */
                        for (; *row; row++)
-                               if (*row == '\\') {
+                               if (*row == '\\' && task->escape) {
                                        if (row[1])
                                                row++;
                                } else if (*row == ch && (task->seplen == 1 || 
strncmp(row, task->csep, task->seplen) == 0)) {
@@ -1029,7 +1029,7 @@ SQLload_parse_row(READERtask *task, int 
 
                        /* eat away the column separator */
                        for (; *row; row++)
-                               if (*row == '\\') {
+                               if (*row == '\\' && task->escape) {
                                        if (row[1])
                                                row++;
                                } else if (*row == ch) {
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to