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

fix for tablet code


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
@@ -1629,7 +1629,16 @@ SQLload_file(Client cntxt, Tablet *as, b
        else
                task->maxrow = (BUN) maxrow;
 
-       if (task->fields == 0 || task->cols == 0 || task->time == 0 || 
task->base == 0) {
+       /* task->base is always allocated since it is part of the task struct.
+        * However, the arrays assigned within may be zero if GDKzalloc 
failed.*/
+       for (i = 0; i < MAXBUFFERS; i++) {
+               if (task->base[i] == NULL) {
+                       tablet_error(task, lng_nil, int_nil, NULL, 
"SQLload_file");
+                       goto bailout;
+               }
+       }
+
+       if (task->fields == 0 || task->cols == 0 || task->time == 0) {
                tablet_error(task, lng_nil, int_nil, NULL, "SQLload_file");
                goto bailout;
        }
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to