Changeset: 19dd576f8e0b for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=19dd576f8e0b Modified Files: sql/backends/monet5/sql_result.c Branch: protocol Log Message:
Change logic of transfer headers: initial chunk now starts with "+\n" and subsequent chunks with "-\n". diffs (38 lines): diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c --- a/sql/backends/monet5/sql_result.c +++ b/sql/backends/monet5/sql_result.c @@ -1336,6 +1336,7 @@ mvc_export_table_prot10(backend *b, stre BATiter *iterators = NULL; char *result = NULL; int length = 0; + int initial_transfer = 1; (void) order; // FIXME: respect explicitly ordered output @@ -1375,7 +1376,7 @@ mvc_export_table_prot10(backend *b, stre // now perform the actual transfer row = srow = offset; - count = nr; + count = offset + nr; while (row < (size_t) count) { char* message_header; char *buf = bs2_buffer(s).buf; @@ -1454,12 +1455,14 @@ mvc_export_table_prot10(backend *b, stre // buffer has to be empty currently assert(bs2_buffer(s).pos == 0); - // continuation message + // initial message message_header = "+\n"; - if (row >= (size_t) count) { - // final message + if (initial_transfer == 0) { + // continuation message message_header = "-\n"; } + initial_transfer = 0; + if (!mnstr_writeStr(s, message_header) || !mnstr_writeLng(s, (lng)(row - srow))) { fres = -1; goto cleanup; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list