Changeset: dcd103672f3b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/dcd103672f3b
Modified Files:
        clients/mapiclient/dump.c
        gdk/gdk_calc.c
        gdk/gdk_logger.c
        gdk/gdk_string.c
        gdk/gdk_unique.c
        monetdb5/mal/mal_exception.c
        monetdb5/modules/atoms/str.c
        monetdb5/modules/mal/pcre.c
        monetdb5/modules/mal/remote.c
        monetdb5/modules/mal/tablet.c
        sql/backends/monet5/sql_gencode.c
        sql/backends/monet5/sql_result.c
        sql/backends/monet5/sql_statement.c
        sql/server/rel_exp.c
        sql/server/rel_optimize_sel.c
        sql/server/rel_select.c
        sql/test/BugTracker-2026/Tests/All
Branch: default
Log Message:

Merge with Dec2025 branch.
Two tests cause crashes.


diffs (truncated from 2301 to 300 lines):

diff --git a/clients/mapiclient/ReadlineTools.c 
b/clients/mapiclient/ReadlineTools.c
--- a/clients/mapiclient/ReadlineTools.c
+++ b/clients/mapiclient/ReadlineTools.c
@@ -235,7 +235,7 @@ mal_command_generator(const char *text, 
        }
        /* try the server to answer */
        if (!state) {
-               char *c;
+               const char *c;
                c = strstr(text, ":=");
                if (c)
                        text = c + 2;
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -1541,8 +1541,10 @@ describe_sequence(Mapi mid, const char *
        char *sname = NULL;
 
        if (schema == NULL) {
-               if ((sname = strchr(tname, '.')) != NULL) {
-                       size_t len = sname - tname;
+               const char *p = strchr(tname, '.');
+               if (p != NULL) {
+                       size_t len = p - tname;
+
                        sname = strndup(tname, len);
                        if (sname == NULL)
                                goto bailout;
@@ -2100,8 +2102,9 @@ dump_table(Mapi mid, const char *schema,
        int rc = 1;
 
        if (schema == NULL) {
-               if ((sname = strchr(tname, '.')) != NULL) {
-                       size_t len = sname - tname;
+               const char *p = strchr(tname, '.');
+               if (p != NULL) {
+                       size_t len = p - tname;
 
                        sname = strndup(tname, len);
                        if (sname == NULL) {
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -3317,9 +3317,9 @@ getfile(void *data, const char *filename
                }
                if (f == NULL) {
                        if (curfile != NULL) {
-                               char *p = strrchr(curfile, '/');
+                               const char *p = strrchr(curfile, '/');
 #ifdef _MSC_VER
-                               char *q = strrchr(curfile, '\\');
+                               const char *q = strrchr(curfile, '\\');
                                if (p == NULL || (q != NULL && q > p))
                                        p = q;
 #endif
diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c
--- a/clients/mapilib/connect.c
+++ b/clients/mapilib/connect.c
@@ -382,9 +382,9 @@ connect_socket_tcp_addr(Mapi mid, struct
 static const char *
 base_name(const char *file)
 {
-       char *p = strrchr(file, '/');
+       const char *p = strrchr(file, '/');
 #ifdef _MSC_VER
-       char *q = strrchr(file, '\\');
+       const char *q = strrchr(file, '\\');
        if (q != NULL) {
                if (p == NULL || p < q)
                        p = q;
diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c
--- a/gdk/gdk_calc.c
+++ b/gdk/gdk_calc.c
@@ -1107,7 +1107,7 @@ BATcalcmin(BAT *b1, BAT *b2, BAT *s1, BA
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
                        if (ci1.tpe == cand_dense && ci2.tpe == cand_dense) {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next_dense(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next_dense(&ci2) - 
b2hseqbase;
                                        const void *p1 = BUNtloc(&b1i, x1);
@@ -1124,7 +1124,7 @@ BATcalcmin(BAT *b1, BAT *b2, BAT *s1, BA
                                TIMEOUT_CHECK(qry_ctx,
                                              
GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx));
                        } else {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next(&ci2) - 
b2hseqbase;
                                        const void *p1 = BUNtloc(&b1i, x1);
@@ -1334,7 +1334,7 @@ BATcalcmin_no_nil(BAT *b1, BAT *b2, BAT 
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
                        if (ci1.tpe == cand_dense && ci2.tpe == cand_dense) {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next_dense(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next_dense(&ci2) - 
b2hseqbase;
                                        const void *p1 = BUNtloc(&b1i, x1);
@@ -1355,7 +1355,7 @@ BATcalcmin_no_nil(BAT *b1, BAT *b2, BAT 
                                TIMEOUT_CHECK(qry_ctx,
                                              
GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx));
                        } else {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next(&ci2) - 
b2hseqbase;
                                        const void *p1 = BUNtloc(&b1i, x1);
@@ -1513,7 +1513,7 @@ BATcalcmincst(BAT *b, const ValRecord *v
                } else {
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
-                       TIMEOUT_LOOP_IDX_DECL(i, ci.ncand, qry_ctx) {
+                       TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                                oid x = canditer_next(&ci) - bhseqbase;
                                const void *restrict p1 = BUNtloc(&bi, x);
                                if (eq(p1, nil)) {
@@ -1687,7 +1687,7 @@ BATcalcmincst_no_nil(BAT *b, const ValRe
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
                        if (eq(p2, nil)) {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                                        oid x = canditer_next(&ci) - bhseqbase;
                                        const void *restrict p1 = BUNtloc(&bi, 
x);
                                        nils |= eq(p1, nil);
@@ -1697,7 +1697,7 @@ BATcalcmincst_no_nil(BAT *b, const ValRe
                                TIMEOUT_CHECK(qry_ctx,
                                              
GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx));
                        } else {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                                        oid x = canditer_next(&ci) - bhseqbase;
                                        const void *restrict p1 = BUNtloc(&bi, 
x);
                                        p1 = eq(p1, nil) || cmp(p2, p1) < 0 ? 
p2 : p1;
@@ -1851,7 +1851,7 @@ BATcalcmax(BAT *b1, BAT *b2, BAT *s1, BA
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
                        if (ci1.tpe == cand_dense && ci2.tpe == cand_dense) {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next_dense(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next_dense(&ci2) - 
b2hseqbase;
                                        const void *p1 = BUNtloc(&b1i, x1);
@@ -1868,7 +1868,7 @@ BATcalcmax(BAT *b1, BAT *b2, BAT *s1, BA
                                TIMEOUT_CHECK(qry_ctx,
                                              
GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx));
                        } else {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next(&ci2) - 
b2hseqbase;
                                        const void *p1 = BUNtloc(&b1i, x1);
@@ -2038,7 +2038,7 @@ BATcalcmax_no_nil(BAT *b1, BAT *b2, BAT 
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
                        if (ci1.tpe == cand_dense && ci2.tpe == cand_dense) {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next_dense(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next_dense(&ci2) - 
b2hseqbase;
                                        const void *p1, *p2;
@@ -2060,7 +2060,7 @@ BATcalcmax_no_nil(BAT *b1, BAT *b2, BAT 
                                TIMEOUT_CHECK(qry_ctx,
                                              
GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx));
                        } else {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci1.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci1.ncand, qry_ctx) {
                                        oid x1 = canditer_next(&ci1) - 
b1hseqbase;
                                        oid x2 = canditer_next(&ci2) - 
b2hseqbase;
                                        const void *p1, *p2;
@@ -2202,7 +2202,7 @@ BATcalcmaxcst(BAT *b, const ValRecord *v
                } else {
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
-                       TIMEOUT_LOOP_IDX_DECL(i, ci.ncand, qry_ctx) {
+                       TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                                oid x = canditer_next(&ci) - bhseqbase;
                                const void *restrict p1 = BUNtloc(&bi, x);
                                if (eq(p1, nil)) {
@@ -2349,7 +2349,7 @@ BATcalcmaxcst_no_nil(BAT *b, const ValRe
                        uint8_t *restrict bcast = (uint8_t *) Tloc(bn, 0);
                        uint16_t width = bn->twidth;
                        if (eq(p2, nil)) {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                                        oid x = canditer_next(&ci) - bhseqbase;
                                        const void *restrict p1 = BUNtloc(&bi, 
x);
                                        nils |= eq(p1, nil);
@@ -2359,7 +2359,7 @@ BATcalcmaxcst_no_nil(BAT *b, const ValRe
                                TIMEOUT_CHECK(qry_ctx,
                                              
GOTO_LABEL_TIMEOUT_HANDLER(bailout, qry_ctx));
                        } else {
-                               TIMEOUT_LOOP_IDX_DECL(i, ci.ncand, qry_ctx) {
+                               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                                        oid x = canditer_next(&ci) - bhseqbase;
                                        const void *restrict p1 = BUNtloc(&bi, 
x);
                                        p1 = eq(p1, nil) || cmp(p2, p1) > 0 ? 
p2 : p1;
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -369,12 +369,6 @@ string_reader(logger *lg, BAT *b, lng nr
 }
 
 
-struct offset {
-       lng os;           /* offset within source BAT in logfile */
-       lng nr;           /* number of values to be copied */
-       lng od;           /* offset within destination BAT in database */
-};
-
 static log_return
 log_read_updates(logger *lg, trans *tr, logformat *l, log_id id, BAT **cands, 
bool skip_entry)
 {
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -9894,7 +9894,7 @@ BATaggrdigest(allocator *ma, BAT **bnp, 
        if (mdctx == NULL)
                goto bailout;
 
-       TIMEOUT_LOOP_IDX_DECL(i, ci.ncand, qry_ctx) {
+       TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                oid p = canditer_next(&ci) - b->hseqbase;
                if (gids)
                        gid = gids[p];
diff --git a/gdk/gdk_unique.c b/gdk/gdk_unique.c
--- a/gdk/gdk_unique.c
+++ b/gdk/gdk_unique.c
@@ -32,7 +32,7 @@ BATunique(BAT *b, BAT *s)
        const char *vals;
        const char *vars;
        int width;
-       oid i, o, hseq;
+       oid o, hseq;
        const char *nme;
        BUN hb;
        bool (*eq)(const void *, const void *);
@@ -113,7 +113,7 @@ BATunique(BAT *b, BAT *s)
                algomsg = "unique: byte-sized atoms";
                uint32_t seen[256 >> 5];
                memset(seen, 0, sizeof(seen));
-               TIMEOUT_LOOP_IDX(i, ci.ncand, qry_ctx) {
+               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                        o = canditer_next(&ci);
                        val = ((const uint8_t *) vals)[o - hseq];
                        uint32_t m = UINT32_C(1) << (val & 0x1F);
@@ -139,7 +139,7 @@ BATunique(BAT *b, BAT *s)
                algomsg = "unique: short-sized atoms";
                uint32_t seen[65536 >> 5];
                memset(seen, 0, sizeof(seen));
-               TIMEOUT_LOOP_IDX(i, ci.ncand, qry_ctx) {
+               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                        o = canditer_next(&ci);
                        val = ((const uint16_t *) vals)[o - hseq];
                        uint32_t m = UINT32_C(1) << (val & 0x1F);
@@ -159,7 +159,7 @@ BATunique(BAT *b, BAT *s)
        } else if (bi.sorted || bi.revsorted) {
                const void *prev = NULL;
                algomsg = "unique: sorted";
-               TIMEOUT_LOOP_IDX(i, ci.ncand, qry_ctx) {
+               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                        o = canditer_next(&ci);
                        v = VALUE(o - hseq);
                        if (prev == NULL || !(*eq)(v, prev)) {
@@ -184,7 +184,7 @@ BATunique(BAT *b, BAT *s)
                        MT_rwlock_rdunlock(&b->thashlock);
                        goto lost_hash;
                }
-               TIMEOUT_LOOP_IDX(i, ci.ncand, qry_ctx) {
+               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                        BUN p;
 
                        o = canditer_next(&ci);
@@ -248,7 +248,7 @@ BATunique(BAT *b, BAT *s)
                        HEAPfree(&hsh.heapbckt, true);
                        goto bunins_failed;
                }
-               TIMEOUT_LOOP_IDX(i, ci.ncand, qry_ctx) {
+               TIMEOUT_LOOP(ci.ncand, qry_ctx) {
                        o = canditer_next(&ci);
                        v = VALUE(o - hseq);
                        prb = HASHprobe(&hsh, v);
diff --git a/monetdb5/mal/mal_exception.c b/monetdb5/mal/mal_exception.c
--- a/monetdb5/mal/mal_exception.c
+++ b/monetdb5/mal/mal_exception.c
@@ -135,10 +135,11 @@ createException(enum malexception type, 
 {
        va_list ap;
        str ret = NULL, localGDKerrbuf = GDKerrbuf;
+       const char *p;
 
        if (localGDKerrbuf &&
-               (ret = strstr(format, MAL_MALLOC_FAIL)) != NULL &&
-               ret[strlen(MAL_MALLOC_FAIL)] != ':' &&
+               (p = strstr(format, MAL_MALLOC_FAIL)) != NULL &&
+               p[strlen(MAL_MALLOC_FAIL)] != ':' &&
                (strncmp(localGDKerrbuf, "GDKmalloc", 9) == 0 ||
                 strncmp(localGDKerrbuf, "GDKrealloc", 10) == 0 ||
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to