Changeset: b51c6c0d4c72 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b51c6c0d4c72
Branch: inet4+6
Log Message:

Merge with default branch.


diffs (truncated from 539 to 300 lines):

diff --git a/ChangeLog.Mar2025 b/ChangeLog.Mar2025
--- a/ChangeLog.Mar2025
+++ b/ChangeLog.Mar2025
@@ -1,7 +1,9 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Tue Jul  8 2025 Niels Nes <[email protected]>
-- Fixed issue #7655, now the segments keep the number of deleted
-  rows. Only search for reuse when deleted rows are available.
+* Wed Aug 13 2025 Sjoerd Mullender <[email protected]>
+- It is now relatively easy to configure the location of the database farm
+  (aka dbfarm) directory when using systemd.  Just create an override
+  file for the monetdbd service and add an Environment entry for DBFARM
+  pointing to the new directory.
 
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -3934,8 +3934,7 @@ main(int argc, char **argv)
                }
        }
 
-       struct privdata priv;
-       priv = (struct privdata) {.mid = mid};
+       struct privdata priv = {.mid = mid};
        mapi_setfilecallback2(mid, getfile, putfile, &priv);
 
        mapi_trace(mid, trace);
diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c
--- a/clients/mapilib/connect.c
+++ b/clients/mapilib/connect.c
@@ -244,7 +244,7 @@ connect_socket_tcp(Mapi mid)
 
        mapi_log_record(mid, "CONN", "Connecting to %s:%d", host, port);
 
-       struct addrinfo hints = (struct addrinfo) {
+       struct addrinfo hints = {
                .ai_family = AF_UNSPEC,
                .ai_socktype = SOCK_STREAM,
                .ai_protocol = IPPROTO_TCP,
diff --git a/common/stream/socket_stream.c b/common/stream/socket_stream.c
--- a/common/stream/socket_stream.c
+++ b/common/stream/socket_stream.c
@@ -31,14 +31,14 @@ socket_getoob(const stream *s)
 {
        SOCKET fd = s->stream_data.s;
 #ifdef HAVE_POLL
-       struct pollfd pfd = (struct pollfd) {
+       struct pollfd pfd = {
                .fd = fd,
                .events = POLLPRI,
        };
        if (poll(&pfd, 1, 0) > 0)
 #else
        fd_set xfds;
-       struct timeval t = (struct timeval) {
+       struct timeval t = {
                .tv_sec = 0,
                .tv_usec = 0,
        };
@@ -129,14 +129,14 @@ socket_getoob_unix(const stream *s)
 {
        SOCKET fd = s->stream_data.s;
 #ifdef HAVE_POLL
-       struct pollfd pfd = (struct pollfd) {
+       struct pollfd pfd = {
                .fd = fd,
                .events = POLLIN,
        };
        if (poll(&pfd, 1, 0) > 0)
 #else
        fd_set fds;
-       struct timeval t = (struct timeval) {
+       struct timeval t = {
                .tv_sec = 0,
                .tv_usec = 0,
        };
@@ -286,10 +286,10 @@ socket_read(stream *restrict s, void *re
                if (s->timeout) {
                        int ret;
 #ifdef HAVE_POLL
-                       struct pollfd pfd;
-
-                       pfd = (struct pollfd) {.fd = s->stream_data.s,
-                                              .events = POLLIN};
+                       struct pollfd pfd = {
+                               .fd = s->stream_data.s,
+                               .events = POLLIN
+                       };
 #ifdef HAVE_SYS_UN_H
                        if (s->putoob != socket_putoob_unix)
                                pfd.events |= POLLPRI;
@@ -530,9 +530,8 @@ socket_isalive(const stream *s)
 {
        SOCKET fd = s->stream_data.s;
 #ifdef HAVE_POLL
-       struct pollfd pfd;
+       struct pollfd pfd = {.fd = fd};
        int ret;
-       pfd = (struct pollfd){.fd = fd};
        if ((ret = poll(&pfd, 1, 0)) == 0)
                return 1;
        if (ret == -1 && errno == EINTR)
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -805,7 +805,7 @@ concat_strings(BAT **bnp, ValPtr pt, BAT
        BUN i, p, nils = 0;
        size_t *restrict lengths = NULL, separator_length = 0, next_length;
        str *restrict astrings = NULL;
-       BATiter bi, bis = (BATiter) {0};
+       BATiter bi, bis = {0};
        BAT *bn = NULL;
        gdk_return rres = GDK_FAIL;
 
diff --git a/gdk/gdk_time.c b/gdk/gdk_time.c
--- a/gdk/gdk_time.c
+++ b/gdk/gdk_time.c
@@ -363,7 +363,7 @@ daytime_add_usec_modulo(daytime t, lng u
 timestamp
 timestamp_fromtime(time_t timeval)
 {
-       struct tm tm = (struct tm) {0};
+       struct tm tm = {0};
        date d;
        daytime t;
 
diff --git a/monetdb5/modules/atoms/batxml.c b/monetdb5/modules/atoms/batxml.c
--- a/monetdb5/modules/atoms/batxml.c
+++ b/monetdb5/modules/atoms/batxml.c
@@ -483,7 +483,7 @@ BATXMLoptions(bat *ret, const char *cons
        str buf = GDKmalloc(BUFSIZ);
        str val = GDKmalloc(BUFSIZ);
        size_t size = BUFSIZ, len = strlen(*name);
-       BATiter bi = (BATiter) {.b = NULL };
+       BATiter bi = {.b = NULL };
        const char *err = OPERATION_FAILED " During bulk options analysis";
 
        if (val == NULL || buf == NULL) {
@@ -1241,7 +1241,7 @@ static const char *
 BATxmlaggr(BAT **bnp, BAT *b, BAT *g, BAT *e, BAT *s, int skip_nils)
 {
        BAT *bn = NULL, *t1, *t2 = NULL;
-       BATiter bi = (BATiter) {.b = NULL };
+       BATiter bi = {.b = NULL };
        oid min, max;
        BUN ngrp;
        BUN nils = 0;
diff --git a/monetdb5/modules/atoms/mtime.c b/monetdb5/modules/atoms/mtime.c
--- a/monetdb5/modules/atoms/mtime.c
+++ b/monetdb5/modules/atoms/mtime.c
@@ -239,7 +239,7 @@ NAME##_bulk(Client cntxt, MalBlkPtr mb, 
                *bid2 = getArgReference_bat(stk, pci, 2),                       
                        \
                *sid1 = pci->argc == 5 ? getArgReference_bat(stk, pci, 3) : 
NULL, \
                *sid2 = pci->argc == 5 ? getArgReference_bat(stk, pci, 4) : 
NULL; \
-       BATiter b1i, b2i = (BATiter){ .vh = NULL };                             
                        \
+       BATiter b1i, b2i = { .vh = NULL };                                      
                                \
        DEC_SRC1(INTYPE1, 1);                                                   
                                        \
        DEC_SRC2(INTYPE2, 2);                                                   
                                        \
        DEC_OUTPUT(OUTTYPE, n);                                                 
                                        \
@@ -513,7 +513,7 @@ NAME##_bulk(Client cntxt, MalBlkPtr mb, 
                *sid1 = pci->argc == 6 ? getArgReference_bat(stk, pci, 3) : 
NULL, \
                *sid2 = pci->argc == 6 ? getArgReference_bat(stk, pci, 4) : 
NULL; \
        lng *extra = getArgReference_lng(stk, pci, pci->argc-1);                
                                \
-       BATiter b1i, b2i = (BATiter){ .vh = NULL };                             
                        \
+       BATiter b1i, b2i = { .vh = NULL };                                      
                                \
        DEC_SRC1(INTYPE1, 1);                                                   
                                        \
        DEC_SRC2(INTYPE2, 2);                                                   
                                        \
        DEC_OUTPUT(OUTTYPE, n);                                                 
                                        \
@@ -1073,7 +1073,7 @@ local_timezone(int *isdstp)
        }
 #elif defined(HAVE_TM_GMTOFF)
        time_t t;
-       struct tm tm = (struct tm) { 0 };
+       struct tm tm = { 0 };
 
        if ((t = time(NULL)) != (time_t) - 1 && localtime_r(&t, &tm)) {
                tzone = (int) tm.tm_gmtoff;
@@ -1081,7 +1081,7 @@ local_timezone(int *isdstp)
        }
 #else
        time_t t;
-       struct tm tm = (struct tm) { 0 };
+       struct tm tm = { 0 };
 
        if ((t = time(NULL)) != (time_t) - 1 && gmtime_r(&t, &tm)) {
                timestamp lt, gt;
@@ -1123,7 +1123,6 @@ timestamp_to_str_withtz(str *buf, const 
 {
        date dt;
        daytime t;
-       struct tm tm;
 
        if (is_timestamp_nil(*d) || strNil(*format)) {
                strcpy(*buf, str_nil);
@@ -1131,7 +1130,7 @@ timestamp_to_str_withtz(str *buf, const 
        }
        dt = timestamp_date(*d);
        t = timestamp_daytime(*d);
-       tm = (struct tm) {
+       struct tm tm = {
                .tm_year = date_year(dt) - 1900,
                .tm_mon = date_month(dt) - 1,
                .tm_mday = date_day(dt),
@@ -1170,7 +1169,7 @@ static str
 str_to_timestamp(timestamp *ret, const char *const *s, const char *const 
*format, const long gmtoff, const char *type,
                                 const char *malfunc)
 {
-       struct tm tm = (struct tm) {
+       struct tm tm = {
                .tm_isdst = -1,
                .tm_mday = 1,
 #ifdef HAVE_TM_GMTOFF
diff --git a/monetdb5/modules/kernel/batmmath.c 
b/monetdb5/modules/kernel/batmmath.c
--- a/monetdb5/modules/kernel/batmmath.c
+++ b/monetdb5/modules/kernel/batmmath.c
@@ -130,8 +130,8 @@ CMDscienceBINARY(MalStkPtr stk, InstrPtr
        bat bid;
        BAT *bn, *b1 = NULL, *b2 = NULL, *s1 = NULL, *s2 = NULL;
        int tp1, tp2;
-       struct canditer ci1 = (struct canditer) { 0 },
-               ci2 = (struct canditer) { 0 };
+       struct canditer ci1 = { 0 },
+               ci2 = { 0 };
        oid x1, x2, off1, off2;
        BUN i, ncand, nils = 0;
        int e = 0, ex = 0;
diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -82,7 +82,7 @@ CLTsetScenario(Client cntxt, MalBlkPtr m
 static void
 CLTtimeConvert(time_t l, char *s)
 {
-       struct tm localt = (struct tm) { 0 };
+       struct tm localt = { 0 };
 
        (void) localtime_r(&l, &localt);
 
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -307,7 +307,7 @@ SERVERlistenThread(SOCKET *Sock)
                        }
                }
                /* Wait up to 0.1 seconds (0.01 if testing) */
-               struct timeval tv = (struct timeval) {
+               struct timeval tv = {
                        .tv_usec = ATOMIC_GET(&GDKdebug) & TESTINGMASK ? 10000 
: 100000,
                };
 
diff --git a/monetdb5/modules/mal/manifold.c b/monetdb5/modules/mal/manifold.c
--- a/monetdb5/modules/mal/manifold.c
+++ b/monetdb5/modules/mal/manifold.c
@@ -285,7 +285,6 @@ MANIFOLDtypecheck(Client cntxt, MalBlkPt
 static str
 MANIFOLDevaluate(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
-       MULTItask mut;
        MULTIarg *mat;
        int i, tpe = 0;
        BUN cnt = 0;
@@ -308,7 +307,7 @@ MANIFOLDevaluate(Client cntxt, MalBlkPtr
                throw(MAL, "mal.manifold", SQLSTATE(HY013) MAL_MALLOC_FAIL);
 
        // mr-job structure preparation
-       mut = (MULTItask) {
+       MULTItask mut = {
                .cntxt = cntxt,
                .mb = mb,
                .stk = stk,
diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c
--- a/monetdb5/modules/mal/pcre.c
+++ b/monetdb5/modules/mal/pcre.c
@@ -1070,7 +1070,7 @@ BATPCRElike_imp(Client cntxt, MalBlkPtr 
        BUN q = 0;
        bit *restrict ret = NULL;
        struct RE *mnre_simple = NULL;
-       BATiter bi = (BATiter) { 0 }, pi;
+       BATiter bi = { 0 }, pi;
 
        (void) cntxt;
        if (input_is_a_bat) {
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
@@ -1569,7 +1569,6 @@ SQLload_file(Client cntxt, Tablet *as, b
        int j;
        BUN firstcol;
        BUN i, attr;
-       READERtask task;
        READERtask ptask[MAXWORKERS];
        int threads = 1;
        lng tio, t1 = 0;
@@ -1586,7 +1585,7 @@ SQLload_file(Client cntxt, Tablet *as, b
 /*     TRC_DEBUG(MAL_SERVER, "Prepare copy work for '%d' threads col '%s' rec 
'%s' quot '%c'\n", threads, csep, rsep, quote);*/
 
        memset(ptask, 0, sizeof(ptask));
-       task = (READERtask) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to