Changeset: 2207b1169d0e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2207b1169d0e
Modified Files:
gdk/gdk_join.c
sql/backends/monet5/rel_bin.c
Branch: ustr
Log Message:
Merge with default branch.
diffs (truncated from 529 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
@@ -4047,6 +4047,20 @@ joincost(BAT *r, bat lustr, BUN lcount,
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) && (!b->ustr || b->ustr == lustr)) {
@@ -4075,7 +4089,12 @@ joincost(BAT *r, bat lustr, BUN lcount,
/* 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/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -339,7 +339,7 @@ static stmt *
bin_find_smallest_column(backend *be, stmt *sub)
{
stmt *res = sub->op4.lval->h->data;
- int best_score = statment_score(sub->op4.lval->h->data);
+ int best_score = statment_score(res);
if (sub->op4.lval->h->next)
for (node *n = sub->op4.lval->h->next ; n ; n = n->next) {
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -935,8 +935,7 @@ rel_named_table_function(sql_query *quer
append(tl, exp_subtype(e));
}
} else {
- for (node *en = exps->h; en; en = en->next)
- append(tl, exp_subtype(en->data));
+ tl = exp_types(sql->sa, exps);
}
}
@@ -2332,8 +2331,7 @@ rel_in_value_exp(sql_query *query, sql_r
int is_tuple = 0, add_select = 0;
/* complex case */
- //if (dl->h->type == type_list) { /* (a,b..) in (.. ) */
- if (dl->h->type == type_symbol && dl->h->data.sym->token == SQL_VALUES)
{
+ if (dl->h->type == type_symbol && dl->h->data.sym->token == SQL_VALUES)
{ /* (a,b..) in (.. ) */
lo = dl->h->data.sym;
dn = lo->data.lval->h->data.lval->h;
lo = dn->data.sym;
diff --git a/sql/server/rel_unnest.c b/sql/server/rel_unnest.c
--- a/sql/server/rel_unnest.c
+++ b/sql/server/rel_unnest.c
@@ -491,7 +491,7 @@ rel_dependent_var(mvc *sql, sql_rel *l,
list *freevar = rel_freevar(sql, r, l);
if (freevar) {
node *n;
- list *boundvar = rel_projections(sql, l, NULL, 1, 0);
+ list *boundvar = rel_projections(sql,
l, NULL, 1, 0);
for(n = freevar->h; n; n = n->next) {
sql_exp *e = n->data, *ne = NULL;
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},
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]