Changeset: 63094b390f4f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/63094b390f4f
Modified Files:
        sql/backends/monet5/copy_scan.c
Branch: pp_hashjoin
Log Message:

advance the position with the proper seperator length


diffs (30 lines):

diff --git a/sql/backends/monet5/copy_scan.c b/sql/backends/monet5/copy_scan.c
--- a/sql/backends/monet5/copy_scan.c
+++ b/sql/backends/monet5/copy_scan.c
@@ -512,7 +512,7 @@ scan_fields(
                if (field_is_null) {
                        field_offset = int_nil;
                        sep = state->pos[null_repr_len];
-                       state->pos += null_repr_len + 1;
+                       state->pos += null_repr_len + ((col == ncols-1) ? 
state->line_sep_len : 1);
                        ok = true;
                } else {
                        field_offset = (int) (state->pos - state->start);
@@ -594,7 +594,7 @@ scan_fields1(
                if (field_is_null) {
                        field_offset = int_nil;
                        sep = state->pos[null_repr_len];
-                       state->pos += null_repr_len + 1;
+                       state->pos += null_repr_len + ((col == ncols-1) ? 
state->line_sep_len : 1);
                } else {
                        field_offset = (int) (state->pos - state->start);
 
@@ -678,7 +678,7 @@ scan_fieldsN( /* ie use col_sep_str */
                if (field_is_null) {
                        field_offset = int_nil;
                        sep = state->pos[null_repr_len];
-                       state->pos += null_repr_len + 1;
+                       state->pos += null_repr_len + ((col == ncols-1) ? 
state->line_sep_len : state->col_sep_len);
                        ok = true;
                } else {
                        field_offset = (int) (state->pos - state->start);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to