Changeset: ed8e75222407 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/ed8e75222407 Modified Files: monetdb5/mal/mal_dataflow.c sql/storage/bat/bat_storage.c Branch: default Log Message:
minor improvements (sync branches) - mal_dataflow.c: update the values before possibly using them - bat_storage.c: guess unique iff we don't know it already diffs (43 lines): diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c --- a/monetdb5/mal/mal_dataflow.c +++ b/monetdb5/mal/mal_dataflow.c @@ -303,6 +303,7 @@ DFLOWworker(void *T) srand((unsigned int) GDKusec()); #endif assert(t->errbuf != NULL); + t->errbuf[0] = 0; GDKsetbuf(t->errbuf); /* where to leave errors */ t->errbuf = NULL; @@ -741,8 +742,8 @@ DFLOWscheduler(DataFlow flow, struct wor fe[i].argclaim = 0; for (j = p->retc; j < p->argc; j++) fe[i].argclaim += getMemoryClaim(fe[0].flow->mb, fe[0].flow->stk, p, j, FALSE); + flow->status[i].state = DFLOWrunning; q_enqueue(todo, flow->status + i); - flow->status[i].state = DFLOWrunning; } MT_lock_unset(&flow->flowlock); MT_sema_up(&w->s); @@ -768,8 +769,8 @@ DFLOWscheduler(DataFlow flow, struct wor if (flow->status[i].state == DFLOWpending) { flow->status[i].argclaim += f->hotclaim; if (flow->status[i].blocks == 1 ) { + flow->status[i].blocks--; flow->status[i].state = DFLOWrunning; - flow->status[i].blocks--; q_enqueue(todo, flow->status + i); } else { flow->status[i].blocks--; diff --git a/sql/storage/bat/bat_storage.c b/sql/storage/bat/bat_storage.c --- a/sql/storage/bat/bat_storage.c +++ b/sql/storage/bat/bat_storage.c @@ -2868,6 +2868,8 @@ col_stats(sql_trans *tr, sql_column *c, if (d->cs.st == ST_DEFAULT) { *unique = bi.key; *unique_est = bi.unique_est; + if (*unique_est == 0) + *unique_est = BATguess_uniques(b,NULL); } else if (d->cs.st == ST_DICT && (off = bind_col(tr, c, QUICK)) && (off = bind_no_view(off, true))) { /* for dict, check the offsets bat for uniqueness */ MT_lock_set(&off->theaplock); _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org