Changeset: 077c9309357e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/077c9309357e
Modified Files:
        gdk/gdk_join.c
        sql/backends/monet5/rel_bin.c
        sql/server/rel_select.c
        sql/server/rel_unnest.c
Branch: nested
Log Message:

merged with default


diffs (truncated from 482 to 300 lines):

diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -11,6 +11,9 @@ on:
   schedule:
     - cron:  '15 1 * * *'
 
+env:
+  TSTALTLOCALHOST: altlocalhost
+
 jobs:
   test:
     strategy:
@@ -55,6 +58,16 @@ jobs:
         run: pip3 install --user --break-system-packages --upgrade pymonetdb 
cryptography
         if: runner.os == 'macOS'
 
+
+      - name: Patch /etc/hosts on Unix
+        run: echo '127.0.0.1   altlocalhost' | sudo tee -a /etc/hosts
+        if: runner.os != 'Windows'
+
+      - name: Patch \etc\hosts on Windows
+        run: Add-Content "C:\Windows\System32\drivers\etc\hosts" "127.0.0.1 
altlocalhost"
+        shell: powershell
+        if: runner.os == 'Windows'
+
       - name: make MonetDB on linux
         run: |
           mkdir build
@@ -129,7 +142,7 @@ jobs:
 
       - name: mtest 
         run: |
-          PATH=$HOME/MDB/bin:$PATH $HOME/MDB/bin/Mtest.py -r --debug=0 --ci 
--no-html --TSTTRGBASE=.
+          PATH=$HOME/MDB/bin:$PATH $HOME/MDB/bin/Mtest.py -v -r --debug=0 --ci 
--no-html --TSTTRGBASE=.
         if: runner.os != 'Windows'
 
       - name: ctest 
@@ -144,7 +157,7 @@ jobs:
         shell: pwsh
         run: |
           $env:PATH = 
'C:\MDB\lib;C:\MDB\lib\monetdb5;C:\MDB\bin;C:\vcpkg\installed\x64-windows\bin;C:\vcpkg\installed\x64-windows\debug\bin;'
 + $env:PATH
-          python C:\MDB\bin\Mtest.py -r --debug=0 --ci --no-html --TSTTRGBASE=.
+          python C:\MDB\bin\Mtest.py -v -r --debug=0 --ci --no-html 
--TSTTRGBASE=.
         if: runner.os == 'Windows'
 
       - name: Tar files
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,9 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Sat May  2 2026 Lucas Pereira <[email protected]>
+- Set default to 'no' of monetdbd discovery property.
+
 * Thu Feb 19 2026 Sjoerd Mullender <[email protected]>
 - Changed the BATloop macro so that it now has a BATiter pointer as
   first argument.
diff --git a/clients/mapilib/Tests/tlssecurity.py 
b/clients/mapilib/Tests/tlssecurity.py
--- a/clients/mapilib/Tests/tlssecurity.py
+++ b/clients/mapilib/Tests/tlssecurity.py
@@ -114,7 +114,8 @@ attempt('refuse_wrong_cert', 'server1', 
 # For example, `localhost.localdomain` instead of `localhost`.
 # The client should refuse to let the connection proceed.
 
-attempt('refuse_wrong_host', 'server1', 'verify failed', 
host='localhost.localdomain', cert=certpath('ca1.crt'))
+althost = os.environ.get('TSTALTLOCALHOST', 'localhost.localdomain')
+attempt('refuse_wrong_host', 'server1', 'verify failed', host=althost, 
cert=certpath('ca1.crt'))
 
 # refuse_tlsv12
 #
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -3677,6 +3677,20 @@ joincost(BAT *r, BUN lcount, struct cand
                if (rhash) {
                        /* average chain length */
                        rcost *= (double) cnt / nheads;
+                       /* If the hash exists, but the working set
+                        * exceeds physical RAM, random-access probes
+                        * will cause massive page fault thrashing.
+                        * Multiply the probe cost by an I/O latency
+                        * factor to encourage swapping to a sequential
+                        * scan instead. */
+                       if (!GDKinmemory(r->theap->farmid) &&
+                           (size_t)cnt * ATOMsize(r->ttype) + (r->tvheap ? 
r->tvheap->free : 0) > GDK_mem_maxsize / 4) {
+                               /* Disk random access is ~100x to 1000x
+                                * slower than RAM.  A 100x penalty
+                                * forces the optimizer to treat these
+                                * probes as highly toxic. */
+                               rcost *= 100.0;
+                       }
                } else if ((parent = VIEWtparent(r)) != 0 &&
                           (b = BATdescriptor(parent)) != NULL) {
                        if (BATcheckhash(b)) {
@@ -3705,7 +3719,12 @@ joincost(BAT *r, BUN lcount, struct cand
                        /* only count the cost of creating the hash for
                         * non-persistent bats */
                        MT_lock_set(&r->theaplock);
-                       if (r->batRole != PERSISTENT /* || r->theap->dirty */ 
|| GDKinmemory(r->theap->farmid))
+                       /* If the BAT is persistent but so large that
+                        * building a hash might thrash memory, consider
+                        * it very expensive, so encourage choosing a
+                        * linear scan of this side instead. */
+                       if (r->batRole != PERSISTENT /* || r->theap->dirty */ 
|| GDKinmemory(r->theap->farmid) ||
+                           (size_t)cnt * ATOMsize(r->ttype) + (r->tvheap ? 
r->tvheap->free : 0) > GDK_mem_maxsize / 4)
                                rcost += cnt * 2.0;
                        MT_lock_unset(&r->theaplock);
                }
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -49,6 +49,7 @@ mserver5_opts = []
 global_timeout = 0
 start_time = time.time()
 test_progress = 0
+test_errors = 0
 
 # whether output goes to a tty
 isatty = os.isatty(sys.stdout.fileno())
@@ -1045,6 +1046,7 @@ def find_test_dirs(thisdir, recursive=Tr
 
 def PerformDir(env, testdir, testlist, total_tests):
     global test_progress
+    global test_errors
     interrupted = False
     td = time.time()
     elem = None
@@ -1272,6 +1274,7 @@ def PerformDir(env, testdir, testlist, t
                     tt, FtOut, FtErr, bodyline, reason, links = RunTest(env, 
TST, COND, oktests, length, pSrvr, total_tests, options, environ, TSTDB, 
TSTDIR, TSTSRCDIR, RELSRCDIR, TSTTRGDIR)
                     alllinks.extend(links)
                 TIMES.append((TSTDIR, TST, tt, FtOut, FtErr, reason))
+                test_errors += (FtOut > F_WARN) or (FtErr > F_WARN)
                 FdOut = max(FdOut,FtOut)
                 FdErr = max(FdErr,FtErr)
                 if bodyline is not None:
@@ -3015,7 +3018,10 @@ def mapi_ping(port, host='localhost', tr
 threadids = {}
 up = '\033[A'
 down = '\033[B'
-def progress(count, total, test, spaces=' '*(ttywidth or 100)):
+
+
+def progress(count, errors, total, test, spaces=' '*(ttywidth or 100)):
+    errs = ''
     if os.name == 'nt':
         nl = ''
         line = 0
@@ -3025,21 +3031,23 @@ def progress(count, total, test, spaces=
         if tid not in threadids:
             threadids[tid] = len(threadids)
             nl = '\n'
-        line = len(threadids) - threadids[tid] - 1
+        line = len(threadids) - threadids[tid]
+        if errors:
+            errs = f'\r{errors} errors'
     perc = int(count*100/total) if total and count else 0
     width = len(str(total))
     s = f'[{count:{width}}/{total}] ({perc:2}%)    {test}'
     if len(s) > ttywidth:
         test = test[len(s)-ttywidth:]
         s = f'[{count:{width}}/{total}] ({perc:2}%)    {test}'
-    sys.stdout.write(nl + '\r' + up*line + spaces + '\r' + s + down*line)
+    sys.stdout.write(nl + '\r' + up*line + spaces + '\r' + s + down*line + 
errs)
 
 
 def DoIt(env, SERVER, CALL, TST, EXT, TestOutFile, TestErrFile, TIMEOUT, ME, 
length, nomito, threads, user, passwd, COND, PSRVR, total_tests, options, 
TSTDB, TSTDIR, TSTTRGDIR, TSTSRCDIR, environ):
     ATJOB2 = ''
     print(file=sys.stderr, end='', flush=True)
     if not verbose:
-        progress(test_progress, total_tests, os.path.join(TSTDIR, TST + EXT))
+        progress(test_progress, test_errors, total_tests, os.path.join(TSTDIR, 
TST + EXT))
     else:
         if ttywidth > 0 and length + 10 + 21 >= ttywidth:
             # 10 - length of prompt()
diff --git a/tools/merovingian/daemon/argvcmds.c 
b/tools/merovingian/daemon/argvcmds.c
--- a/tools/merovingian/daemon/argvcmds.c
+++ b/tools/merovingian/daemon/argvcmds.c
@@ -87,7 +87,7 @@ command_create(int argc, char *argv[])
        char path[2048];
        char *p;
        char *dbfarm;
-       confkeyval phrase[2];
+       confkeyval phrase[1];
 
        if (argc != 2) {
                command_help(2, &argv[-1]);
@@ -103,15 +103,15 @@ command_create(int argc, char *argv[])
                *p = '\0';
                if (mkdir(path, 0755) == -1 && errno != EEXIST) {
                        fprintf(stderr,
-                               "unable to create directory '%s': %s\n",
-                               path, strerror(errno));
+                                       "unable to create directory '%s': %s\n",
+                                       path, strerror(errno));
                        return(1);
                }
                *p = '/';
        }
        if (mkdir(dbfarm, 0755) == -1 && errno != EEXIST) {
                fprintf(stderr, "unable to create directory '%s': %s\n",
-                       dbfarm, strerror(errno));
+                               dbfarm, strerror(errno));
                return(1);
        }
 
@@ -121,9 +121,9 @@ command_create(int argc, char *argv[])
                return(1);
        }
 
-       phrase[0].key = "control";
-       phrase[0].val = "false";
-       phrase[1].key = NULL;
+       /* phrase[0].key = "control"; */
+       /* phrase[0].val = "false"; */
+       /* phrase[1].key = NULL; */
        if (writeProps(phrase, dbfarm) != 0) {
                fprintf(stderr, "unable to create file in directory '%s': %s\n",
                                dbfarm, strerror(errno));
diff --git a/tools/merovingian/daemon/merovingian.c 
b/tools/merovingian/daemon/merovingian.c
--- a/tools/merovingian/daemon/merovingian.c
+++ b/tools/merovingian/daemon/merovingian.c
@@ -452,32 +452,26 @@ main(int argc, char *argv[])
        int thret;
        bool merodontfork = false;
        confkeyval ckv[] = {
-               {"logfile",       strdup("merovingian.log"), 0,                
STR},
-               {"pidfile",       strdup("merovingian.pid"), 0,                
STR},
-               {"loglevel",      strdup("information"),   INFORMATION,        
LOGLEVEL},
-
-               {"sockdir",       strdup("/tmp"),          0,                  
STR},
-               {"listenaddr",    strdup("localhost"),     0,                  
LADDR},
-               {"port",          strdup(MERO_PORT),       atoi(MERO_PORT),    
INT},
-
-               {"exittimeout",   strdup("60"),            60,                 
SINT},
-               {"forward",       strdup("proxy"),         0,                  
OTHER},
-
-               {"discovery",     strdup("true"),          1,                  
BOOLEAN},
-               {"discoveryttl",  strdup("600"),           600,                
INT},
-
-               {"control",       strdup("false"),         0,                  
BOOLEAN},
-               {"passphrase",    NULL,                    0,                  
STR},
-
-               {"snapshotdir",   NULL,                    0,                  
STR},
+               {"logfile",             strdup("merovingian.log"), 0,           
    STR},
+               {"pidfile",             strdup("merovingian.pid"), 0,           
    STR},
+               {"loglevel",            strdup("information"),     INFORMATION, 
    LOGLEVEL},
+               {"sockdir",             strdup("/tmp"),            0,           
    STR},
+               {"listenaddr",          strdup("localhost"),       0,           
    LADDR},
+               {"port",                strdup(MERO_PORT),         
atoi(MERO_PORT), INT},
+               {"exittimeout",         strdup("60"),              60,          
    SINT},
+               {"forward",             strdup("proxy"),           0,           
    OTHER},
+               {"discovery",           strdup("no"),              0,           
    BOOLEAN},
+               {"discoveryttl",        strdup("600"),             600,         
    INT},
+               {"control",             strdup("no"),              0,           
    BOOLEAN},
+               {"passphrase",          NULL,                      0,           
    STR},
+               {"snapshotdir",         NULL,                      0,           
    STR},
 #ifdef HAVE_LIBLZ4
-               {"snapshotcompression", strdup(".tar.lz4"), 0,                 
STR},
+               {"snapshotcompression", strdup(".tar.lz4"),        0,           
    STR},
 #else
-               {"snapshotcompression", strdup(".tar"),     0,                 
STR},
+               {"snapshotcompression", strdup(".tar"),            0,           
    STR},
 #endif
-               {"keepalive",     strdup("60"),            60,                 
INT},
-
-               { NULL,           NULL,                    0,                  
INVALID}
+               {"keepalive",           strdup("60"),              60,          
    INT},
+               { NULL,                 NULL,                      0,           
    INVALID}
        };
        confkeyval *kv;
        int retfd = -1;
diff --git a/tools/merovingian/utils/utils.c b/tools/merovingian/utils/utils.c
--- a/tools/merovingian/utils/utils.c
+++ b/tools/merovingian/utils/utils.c
@@ -213,107 +213,107 @@ setConfVal(confkeyval *ckv, const char *
 
        /* check the input */
        switch (ckv->type) {
-               case INVALID: {
+       case INVALID: {
+               char buf[256];
+               snprintf(buf, sizeof(buf),
+                                "key '%s' is uninitialised (invalid value), 
internal error",
+                                ckv->key);
+               return(strdup(buf));
+       }
+       case SINT:
+       case INT: {
+               const char *p = val;
+               int sign = 1;
+               if (ckv->type == SINT && *p == '-') {
+                       sign = -1;
+                       p++;
+               }
+               while (isdigit((unsigned char) *p))
+                       p++;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to