Changeset: ed5687e21bda for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ed5687e21bda
Modified Files:
        monetdb5/modules/mal/tablet.c
Branch: default
Log Message:

fixed problem with tablet loader.


diffs (28 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
@@ -1535,14 +1535,7 @@ SQLproducer(void *p)
                        fprintf(stderr, "#shuffle %zu: %.63s\n", strlen(s), s);
 #endif
                /* move the non-parsed correct row data to the head of the next 
buffer */
-               s = task->input[cur];
-               if (partial == 0 || cnt >= task->maxrow) {
-                       memcpy(s, task->b->buf + task->b->pos, task->b->len - 
task->b->pos);
-                       end = s + task->b->len - task->b->pos;
-               } else {
-                       end = s;
-               }
-               *end = '\0';    /* this is safe, as the stream ensures an extra 
byte */
+               end = s = task->input[cur];
        }
        if (cnt < task->maxrow && task->maxrow != BUN_NONE) {
                char msg[256];
@@ -1764,7 +1757,7 @@ SQLload_file(Client cntxt, Tablet *as, b
                /* block until the producer has data available */
                MT_sema_down(&task.consumer);
                cnt += task.top[task.cur];
-               if (task.ateof)
+               if (task.ateof && !task.top[task.cur])
                        break;
                t1 = GDKusec() - t1;
                total += t1;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to