Changeset: b6390dd680c3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b6390dd680c3
Modified Files:
        monetdb5/mal/mal_client.c
        monetdb5/modules/mal/remote.c
Branch: default
Log Message:

Properly match flush on output with end-of-block read on input stream.


diffs (37 lines):

diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -556,14 +556,6 @@ MCreadClient(Client c)
                        if (p != in->buf + in->len - 1)
                                in->len++;
                }
-               if (sum == 0 && in->eof && isa_block_stream(in->s)) {
-                       /* we hadn't seen the EOF before, so just try again
-                          (this time with prompt) */
-#ifdef MAL_CLIENT_DEBUG
-                       printf("# retry stream reading %d %d\n", c->idx, 
in->eof);
-#endif
-                       return MCreadClient(c);
-               }
 #ifdef MAL_CLIENT_DEBUG
                printf("# simple stream received %d sum " SZFMT "\n", c->idx, 
sum);
 #endif
diff --git a/monetdb5/modules/mal/remote.c b/monetdb5/modules/mal/remote.c
--- a/monetdb5/modules/mal/remote.c
+++ b/monetdb5/modules/mal/remote.c
@@ -960,8 +960,14 @@ str RMTbatload(Client cntxt, MalBlkPtr m
                if (fdin->buf[len] != '\n')
                        continue;
                /* empty line, end of input */
-               if (fdin->pos == len)
+               if (fdin->pos == len) {
+                       if (isa_block_stream(fdin->s)) {
+                               ssize_t n = bstream_next(fdin);
+                               assert(n == 0);
+                               (void) n;
+                       }
                        break;
+               }
                fdin->buf[len] = '\0'; /* kill \n */
                var = &fdin->buf[fdin->pos];
                /* skip over this line */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to