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

Make sure threads doesn't get set to 0.


diffs (12 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
@@ -1457,7 +1457,7 @@ SQLload_file(Client cntxt, Tablet *as, b
        BUN i, attr;
        READERtask *task = (READERtask *) GDKzalloc(sizeof(READERtask));
        READERtask ptask[MAXWORKERS];
-       int threads = (!maxrow || maxrow > (1 << 16)) ? ( GDKnr_threads < 
MAXWORKERS ? GDKnr_threads-1 : MAXWORKERS-1) : 1;
+       int threads = (!maxrow || maxrow > (1 << 16)) ? ( GDKnr_threads < 
MAXWORKERS && GDKnr_threads > 1 ? GDKnr_threads-1 : MAXWORKERS-1) : 1;
        lng lio = 0, tio, t1 = 0, total = 0, iototal = 0;
        int vmtrim = GDK_vm_trim;
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to