Changeset: c399ec9d23e7 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c399ec9d23e7 Modified Files: clients/Tests/exports.stable.out gdk/gdk_analytic_func.c gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_hash.c gdk/gdk_logger.c gdk/gdk_private.h gdk/gdk_utils.c sql/backends/monet5/sql_rank.c sql/storage/store.c tools/mserver/mserver5.c Branch: nested Log Message:
merge with default diffs (truncated from 1718 to 300 lines): diff --git a/ChangeLog.Dec2025 b/ChangeLog.Dec2025 --- a/ChangeLog.Dec2025 +++ b/ChangeLog.Dec2025 @@ -1,6 +1,11 @@ # ChangeLog file for devel # This file is updated with Maddlog +* Tue May 12 2026 Lucas Pereira <[email protected]> +- Fix using --logging option of mserver5 to change component levels + that are also used by --debug option. For overlapping components, + component level change via --logging was being discarded. + * Thu Apr 23 2026 Sjoerd Mullender <[email protected]> - It is no longer allowed to run mserver5 or monetdbd as root. There are important security concerns when these servers are run as root. diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -256,7 +256,7 @@ BAT *GDKanalytical_covariance_pop(BAT *p BAT *GDKanalytical_covariance_samp(BAT *p, BAT *o, BAT *b1, BAT *b2, BAT *s, BAT *e, int tpe, int frame_type) __attribute__((__warn_unused_result__)); BAT *GDKanalytical_stddev_pop(BAT *p, BAT *o, BAT *b, BAT *s, BAT *e, int tpe, int frame_type) __attribute__((__warn_unused_result__)); BAT *GDKanalytical_stddev_samp(BAT *p, BAT *o, BAT *b, BAT *s, BAT *e, int tpe, int frame_type) __attribute__((__warn_unused_result__)); -gdk_return GDKanalytical_str_group_concat(BAT *r, BAT *p, BAT *o, BAT *b, BAT *sep, BAT *s, BAT *e, const char *restrict separator, int frame_type); +BAT *GDKanalytical_str_group_concat(BAT *b, BAT *p, BAT *o, BAT *sep, BAT *s, BAT *e, const char *restrict separator, int frame_type); BAT *GDKanalytical_variance_pop(BAT *p, BAT *o, BAT *b, BAT *s, BAT *e, int tpe, int frame_type) __attribute__((__warn_unused_result__)); BAT *GDKanalytical_variance_samp(BAT *p, BAT *o, BAT *b, BAT *s, BAT *e, int tpe, int frame_type) __attribute__((__warn_unused_result__)); BAT *GDKanalyticalavg(BAT *p, BAT *o, BAT *b, BAT *s, BAT *e, int tpe, int frame_type) __attribute__((__warn_unused_result__)); diff --git a/gdk/gdk_analytic_func.c b/gdk/gdk_analytic_func.c --- a/gdk/gdk_analytic_func.c +++ b/gdk/gdk_analytic_func.c @@ -984,7 +984,7 @@ GDKanalyticallead(BAT *b, BAT *p, BUN le #define ANALYTICAL_MIN_MAX_CALC_FIXED_UNBOUNDED_TILL_CURRENT_ROW(TPE, MIN_MAX) \ do { \ TPE curval = TPE##_nil; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ if (!is_##TPE##_nil(bp[k])) { \ @@ -1091,7 +1091,7 @@ GDKanalyticallead(BAT *b, BAT *p, BUN le do { \ const void *curval = nil; \ if (ATOMvarsized(tpe)) { \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ const void *next = BUNtvar(&bi, k); \ @@ -1109,7 +1109,7 @@ GDKanalyticallead(BAT *b, BAT *p, BUN le has_nils |= atomeq(curval, nil); \ } \ } else { \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ const void *next = BUNtloc(&bi, k); \ @@ -1441,7 +1441,7 @@ ANALYTICAL_MIN_MAX(max, MAX, <) do { \ curval = 0; \ if (count_all) { \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ k++; \ @@ -1451,7 +1451,7 @@ ANALYTICAL_MIN_MAX(max, MAX, <) rb[j] = curval; \ } \ } else { \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ curval += !is_##TPE##_nil(bp[k]); \ @@ -1563,7 +1563,7 @@ ANALYTICAL_MIN_MAX(max, MAX, <) do { \ curval = 0; \ if (count_all) { \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ k++; \ @@ -1573,7 +1573,7 @@ ANALYTICAL_MIN_MAX(max, MAX, <) rb[j] = curval; \ } \ } else { \ - for (; k < i; ) { \ + while (k < i) { \ j = k; \ do { \ curval += !atomeq(BUNtail(&bi, k), nil); \ @@ -1820,7 +1820,7 @@ cleanup: #define ANALYTICAL_SUM_IMP_NUM_UNBOUNDED_TILL_CURRENT_ROW(TPE1, TPE2) \ do { \ TPE2 curval = TPE2##_nil; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ if (!is_##TPE1##_nil(bp[k])) { \ @@ -2193,7 +2193,7 @@ calc_overflow: #define ANALYTICAL_PROD_CALC_NUM_UNBOUNDED_TILL_CURRENT_ROW(TPE1, TPE2, TPE3) \ do { \ TPE2 curval = TPE2##_nil; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ PROD_NUM(TPE1, TPE2, TPE3, bp[k]); \ @@ -2300,7 +2300,7 @@ calc_overflow: #define ANALYTICAL_PROD_CALC_NUM_LIMIT_UNBOUNDED_TILL_CURRENT_ROW(TPE1, TPE2, REAL_IMP) \ do { \ TPE2 curval = TPE2##_nil; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ PROD_NUM_LIMIT(TPE1, TPE2, REAL_IMP, bp[k]); \ @@ -2396,7 +2396,7 @@ calc_overflow: #define ANALYTICAL_PROD_CALC_FP_UNBOUNDED_TILL_CURRENT_ROW(TPE1, TPE2, ARG3) /* ARG3 is ignored here */ \ do { \ TPE2 curval = TPE2##_nil; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ PROD_FP(TPE1, TPE2, bp[k]); \ diff --git a/gdk/gdk_analytic_statistics.c b/gdk/gdk_analytic_statistics.c --- a/gdk/gdk_analytic_statistics.c +++ b/gdk/gdk_analytic_statistics.c @@ -59,7 +59,7 @@ do { \ TPE a = 0; \ dbl curval = dbl_nil; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ ANALYTICAL_AVERAGE_CALC_NUM_STEP1(TPE, IMP, bp[k]); \ @@ -204,7 +204,7 @@ avg_num_deltas(lng) do { \ TPE a = 0; \ dbl curval = dbl_nil; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ if (!is_##TPE##_nil(bp[k])) \ @@ -458,7 +458,7 @@ nosupport: #define ANALYTICAL_AVG_INT_UNBOUNDED_TILL_CURRENT_ROW(TPE) \ do { \ TPE avg = 0; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ if (!is_##TPE##_nil(bp[k])) \ @@ -707,7 +707,7 @@ nosupport: #define ANALYTICAL_STDEV_VARIANCE_UNBOUNDED_TILL_CURRENT_ROW(TPE, SAMPLE, OP) \ do { \ TPE *restrict bp = (TPE*)bi.base; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ TPE v = bp[k]; \ @@ -994,7 +994,7 @@ GDK_ANALYTICAL_STDEV_VARIANCE(variance_p #define ANALYTICAL_COVARIANCE_UNBOUNDED_TILL_CURRENT_ROW(TPE, SAMPLE, OP) \ do { \ TPE *bp1 = (TPE*)b1i.base, *bp2 = (TPE*)b2i.base; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ TPE v1 = bp1[k], v2 = bp2[k]; \ @@ -1226,7 +1226,7 @@ GDK_ANALYTICAL_COVARIANCE(covariance_pop #define ANALYTICAL_CORRELATION_UNBOUNDED_TILL_CURRENT_ROW(TPE, SAMPLE, OP) /* SAMPLE and OP not used */ \ do { \ TPE *bp1 = (TPE*)b1i.base, *bp2 = (TPE*)b2i.base; \ - for (; k < i;) { \ + while (k < i) { \ j = k; \ do { \ TPE v1 = bp1[k], v2 = bp2[k]; \ diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1066,6 +1066,7 @@ BUNappendmulti(BAT *b, const void *value if (bi.maxpos != BUN_NONE) maxvalp = BUNtvar(&bi, bi.maxpos); const void *vbase = b->tvheap->base; + Heap *oldheap = b->theap; for (BUN i = 0; i < count; i++) { t = ((void **) values)[i]; bool isnil = atomeq(t, atomnil); @@ -1097,12 +1098,11 @@ BUNappendmulti(BAT *b, const void *value VALclear(&maxprop); return rc; } - if (vbase != b->tvheap->base) { - /* tvheap changed location, so + if (vbase != b->tvheap->base || + oldheap != b->theap) { + /* a heap changed location, so * pointers may need to be - * updated (not if they were - * initialized from t below, but - * we don't know) */ + * updated */ BUN minpos = bi.minpos; BUN maxpos = bi.maxpos; MT_lock_set(&b->theaplock); @@ -1111,6 +1111,7 @@ BUNappendmulti(BAT *b, const void *value bi.minpos = minpos; bi.maxpos = maxpos; vbase = b->tvheap->base; + oldheap = b->theap; if (bi.minpos != BUN_NONE) minvalp = BUNtvar(&bi, bi.minpos); if (bi.maxpos != BUN_NONE) @@ -1144,10 +1145,11 @@ BUNappendmulti(BAT *b, const void *value if (maxbound) VALclear(&maxprop); if (b->thash) { + bi.vh = b->tvheap; p -= count; for (BUN i = 0; i < count; i++) { t = ((void **) values)[i]; - HASHappend_locked(b, p, t); + HASHappend_locked(&bi, p, t); p++; } nunique = b->thash ? b->thash->nunique : 0; @@ -1174,7 +1176,7 @@ BUNappendmulti(BAT *b, const void *value return rc; } if (b->thash) { - HASHappend_locked(b, p, t); + HASHappend_locked(&bi, p, t); } if (!atomeq(t, atomnil)) { if (atomcmp != NULL) { @@ -1210,7 +1212,8 @@ BUNappendmulti(BAT *b, const void *value return rc; } if (b->thash) { - HASHappend_locked(b, p, t); + bi.vh = b->tvheap; + HASHappend_locked(&bi, p, t); } p++; } diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -386,10 +386,11 @@ insert_string_bat(BAT *b, BATiter *ni, s MT_lock_set(&b->theaplock); BATsetcount(b, oldcnt + ci->ncand); assert(b->batCapacity >= b->batCount); + BATiter bi = bat_iterator_nolock(b); MT_lock_unset(&b->theaplock); /* maintain hash */ for (r = oldcnt, cnt = BATcount(b); b->thash && r < cnt; r++) { - HASHappend_locked(b, r, b->tvheap->base + VarHeapVal(Tloc(b, 0), r, b->twidth)); + HASHappend_locked(&bi, r, b->tvheap->base + VarHeapVal(Tloc(b, 0), r, b->twidth)); } BUN nunique = b->thash ? b->thash->nunique : 0; MT_rwlock_wrunlock(&b->thashlock); @@ -464,12 +465,13 @@ append_varsized_bat(BAT *b, BATiter *ni, MT_rwlock_wrlock(&b->thashlock); MT_lock_set(&b->theaplock); BATsetcount(b, BATcount(b) + ci->ncand); + BATiter bi = bat_iterator_nolock(b); MT_lock_unset(&b->theaplock); /* maintain hash table */ for (BUN i = BATcount(b) - ci->ncand; b->thash && i < BATcount(b); i++) { - HASHappend_locked(b, i, b->tvheap->base + *(var_t *) Tloc(b, i)); + HASHappend_locked(&bi, i, b->tvheap->base + *(var_t *) Tloc(b, i)); } BUN nunique = b->thash ? b->thash->nunique : 0; MT_rwlock_wrunlock(&b->thashlock); @@ -553,7 +555,7 @@ append_varsized_bat(BAT *b, BATiter *ni, BATiter bi = bat_iterator_nolock(b); for (BUN i = 0; i < cnt; i++) { const void *t = BUNtvar(&bi, r); - HASHappend_locked(b, r, t); + HASHappend_locked(&bi, r, t); r++; } } @@ -1029,6 +1031,9 @@ BATappend2(BAT *b, BAT *n, BAT *s, bool goto bailout; } } + MT_lock_set(&b->theaplock); + BATiter bi = bat_iterator_nolock(b); _______________________________________________ checkin-list mailing list -- [email protected] To unsubscribe send an email to [email protected]
