MonetDB: nilmask - merged with default

2024-07-10 Thread Niels Nes via checkin-list
Changeset: e8b7b2e5171a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e8b7b2e5171a
Modified Files:
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_select.c
monetdb5/optimizer/opt_emptybind.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_statement.c
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_table.c
sql/storage/sql_storage.h
sql/storage/store.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 12057 to 300 lines):

diff --git a/.github/ISSUE_TEMPLATE/bug_report.md 
b/.github/ISSUE_TEMPLATE/bug_report.md
deleted file mode 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ /dev/null
@@ -1,34 +0,0 @@

-name: Bug report
-about: Create a report to help us improve the sytem 
-title: ''
-labels: ''
-assignees: ''
-

-
-**Describe the bug**
-A clear and concise description of what the bug is.
-
-**To Reproduce**
-Create a setting with minimal input for an external user to demonstrate the 
buggy behavior.
-This includes the relevant part of the database schema description.
-Performance trace of the rogue query (using the TRACE command)
-
-**Expected behavior**
-A clear and concise description of what you expected to happen.
-
-**Screenshots**
-If applicable, add screenshots to help explain your problem.
-
-**Software versions**
- - MonetDB version number [a milestone label]
- - OS and version: [e.g. Ubuntu 18.04]
- - Installed from release package or self-installed and compiled
-
-
-**Issue labeling **
-Make liberal use of the labels to characterise the issue topics. e.g. identify 
severity, version, etc..
-
-**Additional context**
-Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml 
b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,61 @@
+name: Bug report
+description: Use this template to report bugs in MonetDB
+labels: ["needs triage"]
+body:
+  - type: textarea
+id: summary
+attributes:
+  label: Describe the bug
+  description: |
+Clear and concise description of what the bug is.
+validations:
+  required: true
+  - type: textarea
+id: reproduction
+attributes:
+  label: Reproduction steps
+  description: |
+Create a setting with minimal input for an external user to 
demonstrate the buggy behavior.
+This includes the relevant part of the database schema description.
+Performance trace of the rogue query (using the TRACE command).
+validations:
+  required: false
+  - type: textarea
+id: expected
+attributes:
+  label: Expected behavior
+  description: |
+Clear and concise description of what you expected to happen.
+validations:
+  required: false
+  - type: input
+id: mdbversion
+attributes:
+  label: MonetDB release
+  placeholder: e.g., Dec2023_SP1, 11.49.1
+validations:
+  required: true
+  - type: dropdown
+id: binsource
+attributes:
+  label: Executables source
+  options:
+- "Release packages"
+- "Self compiled and installed"
+validations:
+  required: true
+  - type: input
+id: osversion
+attributes:
+  label: Operating System
+  placeholder: e.g., Fedora Linux 39 (Workstation Edition)
+validations:
+  required: true
+  - type: textarea
+id: additional
+attributes:
+  label: Additional context
+  description: |
+Add any other context or screenshots about the problem here.
+validations:
+  required: false
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md 
b/.github/ISSUE_TEMPLATE/feature_request.md
deleted file mode 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ /dev/null
@@ -1,20 +0,0 @@

-name: Feature request
-about: Suggest an idea for this project
-title: ''
-labels: ''
-assignees: ''
-

-
-**Is your feature request related to a problem? Please describe.**
-A clear and concise description of what the problem is. Ex. I'm always 
frustrated when [...]
-
-**Describe the solution you'd like**
-A clear and concise description of what you want to happen.
-
-**Describe alternatives you've considered**
-A clear and concise description of any alternative solutions or features 
you've considered.
-
-**Additional context**
-Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml 
b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,36 @@
+name: Feature request
+description: Use this template for feature requests
+labels: ["needs triage"]
+body:
+  - type: textarea
+id: problem
+attributes:
+  label: Is your feature request related to a problem? Describe 

MonetDB: nilmask - merged with default

2024-06-17 Thread Niels Nes via checkin-list
Changeset: f016580a6ce2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f016580a6ce2
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
gdk/gdk.h
gdk/gdk_batop.c
sql/backends/monet5/sql.c
sql/include/sql_catalog.h
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_storage.h
sql/storage/sql_storage.h
sql/storage/store.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 3864 to 300 lines):

diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -49815,8 +49815,13 @@ SQLstddev_pop;
 return the standard deviation population of groups
 sql
 stop_vacuum
+unsafe pattern sql.stop_vacuum(X_0:str, X_1:str):void
+SQLstr_stop_vacuum;
+stop auto vacuum
+sql
+stop_vacuum
 unsafe pattern sql.stop_vacuum(X_0:str, X_1:str, X_2:str):void
-SQLstr_column_stop_vacuum;
+SQLstr_stop_vacuum;
 stop auto vacuum
 sql
 storage
@@ -49975,13 +49980,23 @@ SYSupdate_tables;
 Procedure triggered on update of the sys._tables table
 sql
 vacuum
+unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:int):void
+SQLstr_auto_vacuum;
+auto vacuum string column of given table with interval(sec)
+sql
+vacuum
 unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:str, X_3:int):void
-SQLstr_column_auto_vacuum;
+SQLstr_auto_vacuum;
 auto vacuum string column with interval(sec)
 sql
 vacuum
+unsafe pattern sql.vacuum(X_0:str, X_1:str):void
+SQLstr_vacuum;
+vacuum a string column
+sql
+vacuum
 unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:str):void
-SQLstr_column_vacuum;
+SQLstr_vacuum;
 vacuum a string column
 sql
 variance
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -38225,8 +38225,13 @@ SQLstddev_pop;
 return the standard deviation population of groups
 sql
 stop_vacuum
+unsafe pattern sql.stop_vacuum(X_0:str, X_1:str):void
+SQLstr_stop_vacuum;
+stop auto vacuum
+sql
+stop_vacuum
 unsafe pattern sql.stop_vacuum(X_0:str, X_1:str, X_2:str):void
-SQLstr_column_stop_vacuum;
+SQLstr_stop_vacuum;
 stop auto vacuum
 sql
 storage
@@ -38360,8 +38365,13 @@ SYSupdate_tables;
 Procedure triggered on update of the sys._tables table
 sql
 vacuum
+unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:int):void
+SQLstr_auto_vacuum;
+auto vacuum string column of given table with interval(sec)
+sql
+vacuum
 unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:str, X_3:int):void
-SQLstr_column_auto_vacuum;
+SQLstr_auto_vacuum;
 auto vacuum string column with interval(sec)
 sql
 vacuum
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -3879,6 +3879,8 @@ main(int argc, char **argv)
}
 
mapi_destroy(mid);
+   if (toConsole != stdout_stream && toConsole != stderr_stream)
+   close_stream(toConsole);
mnstr_destroy(stdout_stream);
mnstr_destroy(stderr_stream);
if (priv.buf != NULL)
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -88,7 +88,7 @@ SQLhelp sqlhelp1[] = {
 "ALTER USER ident\n"
 "[WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string]\n"
 "[SET SCHEMA ident] [SCHEMA PATH string] [DEFAULT ROLE ident]\n"
-"[MAX_MEMORY posbytes | NO MAX_MEMORY] [MAX_WORKERS poscount | NO 
MAX_WORKERS]",
+"[MAX_MEMORY posbytes | MAX_MEMORY sizestr | NO MAX_MEMORY] 
[MAX_WORKERS poscount | NO MAX_WORKERS]",
 "ident",
 "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/privileges/"},
{"ANALYZE",
@@ -252,7 +252,7 @@ SQLhelp sqlhelp1[] = {
{"CREATE USER",
 "Create a new database user",
 "CREATE USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string NAME 
string [SCHEMA ident] [SCHEMA PATH string]\n"
-"[MAX_MEMORY posbytes | NO MAX_MEMORY] [MAX_WORKERS poscount | NO 
MAX_WORKERS]\n"
+"[MAX_MEMORY posbytes | MAX_MEMORY sizestr | NO MAX_MEMORY] 
[MAX_WORKERS poscount | NO MAX_WORKERS]\n"
 "[OPTIMIZER string] [DEFAULT ROLE ident]",
 "ident",
 "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/privileges/"},
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
@@ -14,10 +14,8 @@ import os
 import re
 import subprocess
 import sys
-import threading
 
-sys.path.append(os.environ.get('TSTSRCDIR','.'))
-import tlstester
+from MonetDBtesting.tlstester import TLSTesterClient
 
 level = logging.WARNING
 # if sys.platform == 'win32':
@@ -27,45 +25,20 @@ if '-v' in 

MonetDB: nilmask - merged with default

2024-06-07 Thread Niels Nes via checkin-list
Changeset: 9fbf6dda9468 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9fbf6dda9468
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
clients/odbc/tests/ODBCmetadata.c
monetdb5/modules/atoms/CMakeLists.txt
monetdb5/modules/mal/tablet.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_statement.c
sql/backends/monet5/sql_statement.h
sql/storage/bat/bat_storage.c
sql/storage/store.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 18988 to 300 lines):

diff --git a/.bumpversion.cfg b/.bumpversion.cfg
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 11.50.0
+current_version = 11.52.0
 commit = False
 tag = False
 
diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -44,6 +44,7 @@ GPATH
 GRTAGS
 TAGS
 tags
+cscope.*
 *.pyo
 *.rej
 *.orig
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -827,3 +827,4 @@ d656785f49ee62c19705722aa6b7c171904c64d5
 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release
 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9
 9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_SP3_release
+e1e9e22bf3d734dc50b56151c657a57c18f56561 Aug2024_root
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,8 +118,14 @@ if(WIN32)
 ${CMAKE_CURRENT_BINARY_DIR}/unistd.h)
 endif()
 
-add_library(monetdb_config_header
-  INTERFACE)
+add_library(monetdb_config_header INTERFACE)
+
+if (CTAGS_PATH)
+  add_dependencies(monetdb_config_header tags)
+endif()
+if (CSCOPE_PATH)
+  add_dependencies(monetdb_config_header cscope)
+endif()
 
 target_include_directories(monetdb_config_header
   INTERFACE
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,3 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Wed May  8 2024 Sjoerd Mullender 
-- The shared library (.dll aka .so files) now have the version number
-  as part of the name.  This should allow the building of compatibility
-  versions that can be installed in parallel to the latest version.
-- Some of the Debian/Ubuntu packages have been renamed.  The old monetdb5
-  names have been changed to plain monetdb, and libmonetdb5-server-*
-  packages have been renamed monetdb-*.
-- The names of some of the provided RPM files have been changed.
-  References to the old MonetDB5 name have been removed.  All packages
-  are now just MonetDB.
-
diff --git a/ChangeLog b/ChangeLog.Aug2024
copy from ChangeLog
copy to ChangeLog.Aug2024
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -8,7 +8,7 @@
 # Copyright August 2008 - 2023 MonetDB B.V.;
 # Copyright 1997 - July 2008 CWI.
 
-%global version 11.50.0
+%global version 11.52.0
 
 %bcond_with compat
 
@@ -417,6 +417,7 @@ developer.
 %{_bindir}/arraytest
 %{_bindir}/bincopydata
 %{_bindir}/murltest
+%{_bindir}/odbcconnect
 %{_bindir}/odbcsample1
 %{_bindir}/sample0
 %{_bindir}/sample1
@@ -914,62 +915,62 @@ sed -i 's/1\.2/1.1/' misc/selinux/monetd
 %cmake3_build
 
 %install
-mkdir -p "%{buildroot}/usr"
-for d in etc var; do mkdir "%{buildroot}/$d"; ln -s ../$d 
"%{buildroot}/usr/$d"; done
+mkdir -p "${RPM_BUILD_ROOT}"/usr
+for d in etc var; do mkdir "${RPM_BUILD_ROOT}"/$d; ln -s ../$d 
"${RPM_BUILD_ROOT}"/usr/$d; done
 %cmake3_install
-rm "%{buildroot}/usr/var" "%{buildroot}/usr/etc"
+rm "${RPM_BUILD_ROOT}"/usr/var "${RPM_BUILD_ROOT}"/usr/etc
 
 # move file to correct location
-mkdir -p %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sysusersdir}
-mv %{buildroot}%{_sysconfdir}/tmpfiles.d/monetdbd.conf 
%{buildroot}%{_tmpfilesdir}
-cat > %{buildroot}%{_sysusersdir}/monetdb.conf << EOF
+mkdir -p "${RPM_BUILD_ROOT}"%{_tmpfilesdir} "${RPM_BUILD_ROOT}"%{_sysusersdir}
+mv "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d/monetdbd.conf 
"${RPM_BUILD_ROOT}"%{_tmpfilesdir}
+cat > "${RPM_BUILD_ROOT}"%{_sysusersdir}/monetdb.conf << EOF
 u monetdb - "MonetDB Server" /var/lib/monetdb
 EOF
-rmdir %{buildroot}%{_sysconfdir}/tmpfiles.d
+rmdir "${RPM_BUILD_ROOT}"%{_sysconfdir}/tmpfiles.d
 
-install -d -m 0750 %{buildroot}%{_localstatedir}/lib/monetdb
-install -d -m 0770 %{buildroot}%{_localstatedir}/monetdb5/dbfarm
-install -d -m 0775 %{buildroot}%{_localstatedir}/log/monetdb
-install -d -m 0775 %{buildroot}%{_rundir}/monetdb
+install -d -m 0750 "${RPM_BUILD_ROOT}"%{_localstatedir}/lib/monetdb
+install -d -m 0770 "${RPM_BUILD_ROOT}"%{_localstatedir}/monetdb5/dbfarm
+install -d -m 0775 "${RPM_BUILD_ROOT}"%{_localstatedir}/log/monetdb
+install -d -m 0775 "${RPM_BUILD_ROOT}"%{_rundir}/monetdb
 
 # remove unwanted stuff
-rm -f %{buildroot}%{_libdir}/monetdb5*/lib_opt_sql_append.so
-rm -f %{buildroot}%{_libdir}/monetdb5*/lib_microbenchmark*.so
-rm -f %{buildroot}%{_libdir}/monetdb5*/lib_udf*.so
-rm -f 

MonetDB: nilmask - merged with default

2024-05-30 Thread Niels Nes via checkin-list
Changeset: 26852a81589d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/26852a81589d
Branch: nilmask
Log Message:

merged with default


diffs (18 lines):

diff --git a/sql/server/sql_scan.c b/sql/server/sql_scan.c
--- a/sql/server/sql_scan.c
+++ b/sql/server/sql_scan.c
@@ -1256,11 +1256,10 @@ int scanner_symbol(mvc * c, int cur)
lc->rs->buf[lc->rs->pos + lc->yycur - 2] = '<';
lc->rs->buf[lc->rs->pos + lc->yycur - 1] = '>';
return scanner_token( lc, COMPARISON);
+   } else {
+   utf8_putchar(lc, cur); //put the char back
}
-   else
-   lc->yycur--;
-   cur = '!';
-   break;
+   return scanner_token(lc, '!');
case '<':
lc->started = 1;
cur = scanner_getc(lc);
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: nilmask - merged with default

2024-05-30 Thread Niels Nes via checkin-list
Changeset: 61da04a045a5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/61da04a045a5
Modified Files:
sql/backends/monet5/rel_bin.c
sql/include/sql_catalog.h
sql/storage/sql_storage.h
sql/storage/store.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 1797 to 300 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,10 +12,3 @@
   References to the old MonetDB5 name have been removed.  All packages
   are now just MonetDB.
 
-* Wed May  8 2024 Niels Nes 
-- Add support for select exp, count(*) group by 1 order by 1; ie. using
-  numeric references Added support for group by all and order by all. The
-  later is ordering on all columns of the selection.  The group by all
-  finds all expressions from the selections which aren't aggregations
-  and groups on those.  All can also be replaced by '*'.
-
diff --git a/clients/odbc/ChangeLog b/clients/odbc/ChangeLog
--- a/clients/odbc/ChangeLog
+++ b/clients/odbc/ChangeLog
@@ -9,7 +9,6 @@
 CERTHASH / Server Certificate Hash = sha256:HEXDIGITS
 CLIENTKEY / Client Key = PATH
 CLIENTCERT / Client Certificate = PATH
-AUTOCOMMIT / Autocommit = ON/OFF
 - Several more connection properties have been made configurable:
 SCHEMA / Schema = NAME
 TIMEZONE / Time Zone = Minutes East Of UTC
@@ -17,8 +16,10 @@
 LOGFILE / Log File = PATH
 LOGINTIMEOUT / Login Timeout = MILLISECONDS
 CONNECTIONTIMEOUT / Connection Timeout = MILLISECONDS
+AUTOCOMMIT / Autocommit = ON/OFF
 SOCK / Unix Socket = PATH (unix only)
-- SQLBrowseConnect adds On/Off suggestions to boolean settings
+- SQLBrowseConnect() adds On/Off suggestions to boolean settings
   and prioritizes the DATABASE attribute if it notices monetdbd
   requires one. Apart from that only UID/User and PWD/Password
   are required, all others have sensible defaults.
+
diff --git a/sql/ChangeLog b/sql/ChangeLog
--- a/sql/ChangeLog
+++ b/sql/ChangeLog
@@ -1,10 +1,20 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
-* Mon May 13 2024 Niels Nes 
+* Mon May 13 2024 Niels Nes 
 - Extended sys.generate_series() to generate dates. Added 2 new functions:
-  sys.generate_series(first date, "limit" date, stepsize interval month)
-  sys.generate_series(first date, "limit" date, stepsize interval day)
+  sys.generate_series(first date, "limit" date, stepsize interval month) and
+  sys.generate_series(first date, "limit" date, stepsize interval day).
+
+* Wed May  8 2024 Niels Nes 
+- Added support for select exp, count(*) group by 1 order by 1;
+  ie. using numeric references in group by clause.
+- Added support for GROUP BY ALL. This finds all expressions from the
+  selections which aren't aggregations and groups on those.
+  At least one aggregation must be specified.
+  The ALL keyword can also be replaced by '*', so: GROUP BY *.
+- Added support for ORDER BY ALL. This orders on all columns of the selection.
+  The ALL keyword can also be replaced by '*', so: ORDER BY *.
 
 * Thu May  2 2024 Martin van Dinther 
 - Removed the obsolete ANALYZE statement syntax options: SAMPLE nn and
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
@@ -16,6 +16,7 @@
 #include "rel_rel.h"
 #include "rel_basetable.h"
 #include "rel_exp.h"
+#include "rel_dump.h"
 #include "rel_psm.h"
 #include "rel_prop.h"
 #include "rel_select.h"
@@ -4993,6 +4994,35 @@ sql_insert_triggers(backend *be, sql_tab
return res;
 }
 
+static void
+sql_insert_check(backend *be, sql_key *key, sql_rel *inserts, list *refs)
+{
+   mvc *sql = be->mvc;
+   node *m, *n;
+
+   inserts = rel_copy(sql, inserts, 1);
+   list* exps = inserts->exps;
+
+   for (n = ol_first_node(key->t->columns), m = exps->h; n && m;
+   n = n->next, m = m->next) {
+   sql_exp *i = m->data;
+   sql_column *c = n->data;
+   i->alias.rname= sa_strdup(sql->sa, c->t->base.name);
+   i->alias.name= sa_strdup(sql->sa, c->base.name);
+   }
+
+   int pos = 0;
+   sql_rel* rel = rel_read(sql, sa_strdup(sql->sa, key->check), , 
sa_list(sql->sa));
+   rel->l = inserts;
+   stmt* s = subrel_bin(be, rel, refs);
+   sql_subtype *bt = sql_bind_localtype("bit");
+   s = stmt_uselect(be, column(be, s), stmt_atom(be, 
atom_zero_value(sql->sa, bt)), cmp_equal, NULL, 0, 1);
+   sql_subfunc *cnt = sql_bind_func(sql, "sys", "count", 
sql_bind_localtype("void"), NULL, F_AGGR, true, true);
+   s = stmt_aggr(be, s, NULL, NULL, cnt, 1, 0, 1);
+   char *msg = sa_message(sql->sa, SQLSTATE(40002) "INSERT INTO: CHECK 
constraint violated: %s", key->base.name);
+   (void)stmt_exception(be, s, msg, 1);
+}
+
 static sql_table *
 sql_insert_check_null(backend *be, sql_table *t, list *inserts)
 {
@@ -5071,6 +5101,12 @@ rel2bin_insert(backend *be, sql_rel *rel

MonetDB: nilmask - merged with default

2024-05-30 Thread Niels Nes via checkin-list
Changeset: 1705be86c402 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1705be86c402
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
sql/backends/monet5/sql.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 2274 to 300 lines):

diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -44634,6 +44634,11 @@ unsafe pattern clients.setScenario(X_0:s
 CLTsetScenario;
 Switch to other scenario handler, return previous one.
 clients
+setinfo
+unsafe pattern clients.setinfo(X_0:str, X_1:str):str
+CLTsetClientInfo;
+set a clientinfo property
+clients
 setmemorylimit
 unsafe pattern clients.setmemorylimit(X_0:int):void
 CLTsetmemorylimit;
@@ -49650,7 +49655,7 @@ SQLrow_number;
 return the row_numer-ed groups
 sql
 sessions
-pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], 
X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], 
X_7:bat[:int], X_8:bat[:int])
+pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], 
X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], 
X_7:bat[:int], X_8:bat[:int], X_9:bat[:str], X_10:bat[:str], X_11:bat[:str], 
X_12:bat[:str], X_13:bat[:str], X_14:bat[:lng], X_15:bat[:str])
 sql_sessions_wrap;
 SQL export table of active sessions, their timeouts and idle status
 sql
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -33169,6 +33169,11 @@ unsafe pattern clients.setScenario(X_0:s
 CLTsetScenario;
 Switch to other scenario handler, return previous one.
 clients
+setinfo
+unsafe pattern clients.setinfo(X_0:str, X_1:str):str
+CLTsetClientInfo;
+set a clientinfo property
+clients
 setmemorylimit
 unsafe pattern clients.setmemorylimit(X_0:int):void
 CLTsetmemorylimit;
@@ -38070,7 +38075,7 @@ SQLrow_number;
 return the row_numer-ed groups
 sql
 sessions
-pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], 
X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], 
X_7:bat[:int], X_8:bat[:int])
+pattern sql.sessions() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:timestamp], 
X_3:bat[:timestamp], X_4:bat[:str], X_5:bat[:int], X_6:bat[:int], 
X_7:bat[:int], X_8:bat[:int], X_9:bat[:str], X_10:bat[:str], X_11:bat[:str], 
X_12:bat[:str], X_13:bat[:str], X_14:bat[:lng], X_15:bat[:str])
 sql_sessions_wrap;
 SQL export table of active sessions, their timeouts and idle status
 sql
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
@@ -717,6 +717,7 @@ int64_t mapi_rows_affected(MapiHdl hdl) 
 MapiMsg mapi_seek_row(MapiHdl hdl, int64_t rowne, int whence) 
__attribute__((__nonnull__(1)));
 MapiHdl mapi_send(Mapi mid, const char *cmd) __attribute__((__nonnull__(1)));
 MapiMsg mapi_setAutocommit(Mapi mid, bool autocommit) 
__attribute__((__nonnull__(1)));
+void mapi_set_application_name(const char *name);
 MapiMsg mapi_set_columnar_protocol(Mapi mid, bool columnar_protocol) 
__attribute__((__nonnull__(1)));
 MapiMsg mapi_set_size_header(Mapi mid, bool value) 
__attribute__((__nonnull__(1)));
 MapiMsg mapi_set_time_zone(Mapi mid, int seconds_east_of_utc) 
__attribute__((__nonnull__(1)));
@@ -810,6 +811,7 @@ void MCcloseClient(Client c);
 Client MCgetClient(int id);
 Client MCinitClient(oid user, bstream *fin, stream *fout);
 int MCpushClientInput(Client c, bstream *new_input, int listing, const char 
*prompt);
+void MCsetClientInfo(Client c, const char *property, const char *value);
 void MCstopClients(Client c);
 str MCsuspendClient(int id);
 int MCvalid(Client c);
@@ -818,7 +820,7 @@ str MSinitClientPrg(Client cntxt, const 
 void MSresetInstructions(MalBlkPtr mb, int start);
 void MSresetStack(Client cntxt, MalBlkPtr mb, MalStkPtr glb);
 void MSresetVariables(MalBlkPtr mb);
-void MSscheduleClient(str command, str challenge, bstream *fin, stream *fout, 
protocol_version protocol, size_t blocksize);
+void MSscheduleClient(str command, str peer, str challenge, bstream *fin, 
stream *fout, protocol_version protocol, size_t blocksize);
 str OIDXcreateImplementation(Client cntxt, int tpe, BAT *b, int pieces);
 str OIDXdropImplementation(Client cntxt, BAT *b);
 str QLOGcalls(BAT **r);
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -3682,6 +3682,7 @@ main(int argc, char **argv)
} else {
mid = mapi_mapi(host, port, user, passwd, language, dbname);
}
+   mapi_set_application_name("mclient");
free(user_allocated);
user_allocated = NULL;
free(passwd_allocated);
diff --git 

MonetDB: nilmask - merged with default

2024-05-29 Thread Niels Nes via checkin-list
Changeset: cda0f55546e6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cda0f55546e6
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_bat.c
monetdb5/modules/atoms/CMakeLists.txt
monetdb5/modules/mal/tablet.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_result.c
sql/include/sql_catalog.h
sql/storage/bat/bat_storage.c
sql/storage/store.c
tools/monetdbe/monetdbe.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 41850 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -825,3 +825,5 @@ dcc8c702e685a4faf21ccf663028d1bc3d1165d1
 dcc8c702e685a4faf21ccf663028d1bc3d1165d1 Dec2023_SP1_release
 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_7
 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release
+9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9
+9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_SP3_release
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Wed May  8 2024 Sjoerd Mullender 
+- The shared library (.dll aka .so files) now have the version number
+  as part of the name.  This should allow the building of compatibility
+  versions that can be installed in parallel to the latest version.
+- Some of the Debian/Ubuntu packages have been renamed.  The old monetdb5
+  names have been changed to plain monetdb, and libmonetdb5-server-*
+  packages have been renamed monetdb-*.
+- The names of some of the provided RPM files have been changed.
+  References to the old MonetDB5 name have been removed.  All packages
+  are now just MonetDB.
+
+* Wed May  8 2024 Niels Nes 
+- Add support for select exp, count(*) group by 1 order by 1; ie. using
+  numeric references Added support for group by all and order by all. The
+  later is ordering on all columns of the selection.  The group by all
+  finds all expressions from the selections which aren't aggregations
+  and groups on those.  All can also be replaced by '*'.
+
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -8,8 +8,12 @@
 # Copyright August 2008 - 2023 MonetDB B.V.;
 # Copyright 1997 - July 2008 CWI.
 
-%global name MonetDB
 %global version 11.50.0
+
+%bcond_with compat
+
+%global name MonetDB%{?with_compat:%version}
+
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # Use bcond_with to add a --with option; i.e., "without" is default.
@@ -57,7 +61,7 @@
 # available.  However, the geos library is available in the Extra
 # Packages for Enterprise Linux (EPEL).
 %if %{fedpkgs} && (0%{?rhel} != 7) && (0%{?rhel} != 8)
-# By default create the MonetDB-geom-MonetDB5 package on Fedora and RHEL 7
+# By default create the MonetDB-geom package on Fedora and RHEL 7
 %bcond_without geos
 %endif
 
@@ -91,7 +95,7 @@ Group: Applications/Databases
 License: MPL-2.0
 URL: https://www.monetdb.org/
 BugURL: https://github.com/MonetDB/MonetDB/issues
-Source: 
https://www.monetdb.org/downloads/sources/Dec2023-SP2/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Dec2023-SP3/MonetDB-%{version}.tar.bz2
 
 # The Fedora packaging document says we need systemd-rpm-macros for
 # the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7
@@ -117,7 +121,9 @@ BuildRequires: unixODBC-devel
 BuildRequires: readline-devel
 %else
 BuildRequires: pkgconfig(bzip2)
+%if %{without compat}
 BuildRequires: pkgconfig(odbc)
+%endif
 BuildRequires: pkgconfig(readline)
 %endif
 %if %{with fits}
@@ -154,8 +160,8 @@ BuildRequires: pkgconfig(libR)
 # BuildRequires: pkgconfig(valgrind)# -DWITH_VALGRIND=ON
 
 %if (0%{?fedora} >= 22)
-Recommends: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
-Recommends: MonetDB5-server%{?_isa} = %{version}-%{release}
+Recommends: %{name}-SQL%{?_isa} = %{version}-%{release}
+Recommends: %{name}-server%{?_isa} = %{version}-%{release}
 Suggests: %{name}-client%{?_isa} = %{version}-%{release}
 %endif
 
@@ -167,8 +173,8 @@ accelerators.  It also has an SQL front 
 
 This package contains the core components of MonetDB in the form of a
 single shared library.  If you want to use MonetDB, you will certainly
-need this package, but you will also need at least the MonetDB5-server
-package, and most likely also %{name}-SQL-server5, as well as one or
+need this package, but you will also need at least the %{name}-server
+package, and most likely also %{name}-SQL, as well as one or
 more client packages.
 
 %ldconfig_scriptlets
@@ -176,8 +182,9 @@ more client packages.
 %files
 %license COPYING
 %defattr(-,root,root)
-%{_libdir}/libbat.so.*
+%{_libdir}/libbat*.so.*
 
+%if %{without compat}
 %package devel
 Summary: MonetDB development files
 Group: Applications/Databases
@@ -202,8 +209,9 @@ functionality 

MonetDB: nilmask - merged with default

2024-04-26 Thread Niels Nes via checkin-list
Changeset: e41a45943665 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e41a45943665
Modified Files:
monetdb5/modules/mal/tablet.c
sql/backends/monet5/rel_bin.c
sql/common/sql_types.c
sql/storage/bat/bat_storage.c
Branch: nilmask
Log Message:

merged with default


diffs (288 lines):

diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -48,7 +48,12 @@ jobs:
   ref: ${{ github.ref }}
 
   - name: install pymonetdb cryptography
-run: pip3 install pymonetdb cryptography
+run: pip3 install --user --upgrade pymonetdb cryptography
+if: runner.os != 'macOS'
+
+  - name: install pymonetdb cryptography
+run: pip3 install --user --break-system-packages --upgrade pymonetdb 
cryptography
+if: runner.os == 'macOS'
 
   - name: make MonetDB on linux
 run: |
@@ -83,7 +88,23 @@ jobs:
 -DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison \
 -DCMAKE_SUMMARY=ON
   make install -j3
-if: runner.os == 'macOS'
+if: runner.os == 'macOS' && runner.arch == 'x64'
+
+  - name: make MonetDB on macos
+run: |
+  mkdir build
+  cd build 
+  cmake .. \
+-DCMAKE_INSTALL_PREFIX=$HOME/MDB \
+-DPY3INTEGRATION=OFF \
+-DRINTEGRATION=OFF  \
+-DCMAKE_BUILD_TYPE=Release \
+-DASSERT=OFF \
+-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
+-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison \
+-DCMAKE_SUMMARY=ON
+  make install -j3
+if: runner.os == 'macOS' && runner.arch == 'arm64'
 
   - name: choco packages
 run: |
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -4065,6 +4065,33 @@ BBPsync(int cnt, bat *restrict subcommit
if (lock)
MT_lock_set((bid));
}
+   if (subcommit) {
+   /* move any tail/theap files we find for this bat that
+* are in the BACKUP directory to the SUBCOMMIT
+* directory */
+   char fname[16]; /* plenty big enough */
+   if (snprintf(fname, sizeof(fname), "%o", i) < 16) {
+   /* the snprintf never fails, any of the
+* below may fail */
+   if (GDKmove(0, BAKDIR, fname, "tail", SUBDIR, 
fname, "tail", false) == GDK_SUCCEED)
+   TRC_DEBUG(BAT_, "moved %s.tail from %s 
to %s\n",
+ fname, BAKDIR, SUBDIR);
+   if (GDKmove(0, BAKDIR, fname, "tail1", SUBDIR, 
fname, "tail1", false) == GDK_SUCCEED)
+   TRC_DEBUG(BAT_, "moved %s.tail1 from %s 
to %s\n",
+ fname, BAKDIR, SUBDIR);
+   if (GDKmove(0, BAKDIR, fname, "tail2", SUBDIR, 
fname, "tail2", false) == GDK_SUCCEED)
+   TRC_DEBUG(BAT_, "moved %s.tail2 from %s 
to %s\n",
+ fname, BAKDIR, SUBDIR);
+#if SIZEOF_VAR_T == 8
+   if (GDKmove(0, BAKDIR, fname, "tail4", SUBDIR, 
fname, "tail4", false) == GDK_SUCCEED)
+   TRC_DEBUG(BAT_, "moved %s.tail4 from %s 
to %s\n",
+ fname, BAKDIR, SUBDIR);
+#endif
+   if (GDKmove(0, BAKDIR, fname, "theap", SUBDIR, 
fname, "theap", false) == GDK_SUCCEED)
+   TRC_DEBUG(BAT_, "moved %s.theap from %s 
to %s\n",
+ fname, BAKDIR, SUBDIR);
+   }
+   }
BAT *b = dirty_bat(, subcommit != NULL);
if (i <= 0)
ret = GDK_FAIL;
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
@@ -1958,8 +1958,7 @@ SQLload_file(Client cntxt, Tablet *as, b
return BUN_NONE;
 }
 
-/* return the latest reject table, to be on the safe side we should
- * actually create copies within a critical section. Ignored for now. */
+/* return the latest reject table */
 str
 COPYrejects(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
@@ -1971,10 +1970,27 @@ COPYrejects(Client cntxt, MalBlkPtr mb, 
create_rejects_table(cntxt);
if (cntxt->error_row == NULL)
throw(MAL, "sql.rejects", "No reject table available");
-   BBPretain(*row = cntxt->error_row->batCacheid);
-   BBPretain(*fld = cntxt->error_fld->batCacheid);
-   

MonetDB: nilmask - merged with default

2024-04-26 Thread Niels Nes via checkin-list
Changeset: 9d1cfe543e3b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9d1cfe543e3b
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
clients/odbc/tests/ODBCmetadata.c
gdk/gdk.h
gdk/gdk_bat.c
gdk/gdk_value.c
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_builder.h
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_prelude.c
monetdb5/modules/atoms/CMakeLists.txt
monetdb5/modules/mal/tablet.c
monetdb5/modules/mal/tablet.h
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_result.h
sql/backends/monet5/sql_statement.c
sql/backends/monet5/sql_statement.h
sql/common/sql_types.c
sql/include/sql_catalog.h
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_storage.h
sql/storage/bat/bat_table.c
sql/storage/bat/res_table.c
sql/storage/sql_storage.h
sql/storage/store.c
tools/monetdbe/monetdbe.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 313809 to 300 lines):

diff --git a/.bumpversion.cfg b/.bumpversion.cfg
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 11.48.0
+current_version = 11.50.0
 commit = False
 tag = False
 
diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -16,51 +16,120 @@ jobs:
 strategy:
   fail-fast: false  # don't stop other jobs
   matrix:
-branch: [ master ]
-os: [ ubuntu-latest, macos-latest ]
+os: [ ubuntu-latest, macos-latest, windows-latest ]
+c_compiler: [ gcc, clang, cl ]
+include:
+  - os: windows-latest
+c_compiler: cl
+  - os: macos-latest
+c_compiler: clang
+  - os: macos-latest
+c_compiler: gcc-12
+  - os: ubuntu-latest
+c_compiler: gcc
+  - os: ubuntu-latest
+c_compiler: clang
+exclude:
+  - os: windows-latest
+c_compiler: gcc
+  - os: windows-latest
+c_compiler: clang
+  - os: macos-latest
+c_compiler: cl
+  - os: macos-latest
+c_compiler: gcc
+  - os: ubuntu-latest
+c_compiler: cl
 runs-on: ${{ matrix.os }}
 steps:
   - name: Checkout
-uses: actions/checkout@v3
+uses: actions/checkout@v4
 with:
-  ref: ${{ matrix.branch }}
+  ref: ${{ github.ref }}
+
+  - name: install pymonetdb cryptography
+run: pip3 install pymonetdb cryptography
 
   - name: make MonetDB on linux
 run: |
   mkdir build
   cd build 
-  cmake ..  -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.branch }} 
-DPY3INTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DRINTEGRATION=OFF 
\
+  cmake ..  \
+-DCMAKE_INSTALL_PREFIX=$HOME/MDB \
+-DPY3INTEGRATION=OFF \
+-DRINTEGRATION=OFF \
+-DCMAKE_BUILD_TYPE=Release \
+-DASSERT=OFF \
+-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
 -DCMAKE_SUMMARY=ON
   make install -j3
 if: runner.os == 'Linux'
-  -
-name: brew packages
+
+  - name: brew packages
 run: brew install bison
 if: runner.os == 'macOS'
+
   - name: make MonetDB on macos
 run: |
   mkdir build
   cd build 
-  cmake ..  -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.branch }} 
-DPY3INTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DRINTEGRATION=OFF 
 \
--DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison 
-DCMAKE_SUMMARY=ON
+  cmake .. \
+-DCMAKE_INSTALL_PREFIX=$HOME/MDB \
+-DPY3INTEGRATION=OFF \
+-DRINTEGRATION=OFF  \
+-DCMAKE_BUILD_TYPE=Release \
+-DASSERT=OFF \
+-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
+-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison \
+-DCMAKE_SUMMARY=ON
   make install -j3
 if: runner.os == 'macOS'
+
+  - name: choco packages
+run: |
+  choco install winflexbison3
+  vcpkg install libiconv bzip2 libxml2 pcre zlib getopt 
+if: runner.os == 'Windows'
+
+  - name: make MonetDB on Windows
+shell: pwsh
+run: |
+  mkdir build
+  cd build 
+  cmake ..  -DCMAKE_INSTALL_PREFIX=C:\MDB 
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake 
-DPY3INTEGRATION=OFF -DRINTEGRATION=OFF  -DCMAKE_BUILD_TYPE=Release 
-DASSERT=OFF -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}  -DCMAKE_SUMMARY=ON
+  cmake --build . --target install
+

MonetDB: nilmask - merged with default

2023-10-31 Thread Niels Nes via checkin-list
Changeset: ef9f4be424f1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ef9f4be424f1
Modified Files:
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_bat.c
sql/storage/bat/bat_storage.c
sql/storage/sql_storage.h
sql/storage/store.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 11653 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
@@ -29,7 +29,8 @@ jobs:
 run: |
   mkdir build
   cd build 
-  cmake ..  -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.branch }} 
-DPY3INTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DRINTEGRATION=OFF
+  cmake ..  -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.branch }} 
-DPY3INTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DRINTEGRATION=OFF 
\
+-DCMAKE_SUMMARY=ON
   make install -j3
 if: runner.os == 'Linux'
   -
@@ -41,7 +42,7 @@ jobs:
   mkdir build
   cd build 
   cmake ..  -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.branch }} 
-DPY3INTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DRINTEGRATION=OFF 
 \
--DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
+-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison 
-DCMAKE_SUMMARY=ON
   make install -j3
 if: runner.os == 'macOS'
   - name: ctest 
@@ -50,14 +51,16 @@ jobs:
   cmake --build . --target test
   - name: install pymonetdb
 run: pip3 install pymonetdb
+  - name: which python
+run: 
+  head -n 1 $HOME/${{ matrix.branch }}/bin/Mtest.py 
   - name: mtest 
 run: |
   #cd build 
   #cmake --build . --target mtest
-  $HOME/${{ matix.branch }}/Mtest.py -r --debug=0
-  #-
-  #uses: actions/upload-artifact@v3
-  #name: Publish Linux binary wheels
-  #with:
-  #name: monetdbe-linux-wheel-${{ matrix.branch }}-${{ 
matrix.python-version }}
-  #path: dist/*.whl
+  PATH=$HOME/${{ matrix.branch }}/bin:$PATH $HOME/${{ matrix.branch 
}}/bin/Mtest.py -r --debug=0 --ci --no-html
+  - name: Publish mtest results
+uses: actions/upload-artifact@v3
+with:
+  name: mtest-${{ matrix.branch }}
+  path: ${{ matrix.branch }}/mTests/*
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Mon Oct 30 2023 Sjoerd Mullender 
+- The ranges of merge partitions are now pushed down into the low
+  level GDK operations, giving them a handle to sometimes execute more
+  efficiently.
+
 * Thu Jul 27 2023 Niels Nes 
 - Removed the PYTHON MAP external language option, as after a fork the
   synchronization primitives could be in any state, leading to deadlocks.
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -123,6 +123,10 @@ BuildRequires: geos-devel >= 3.10.0
 BuildRequires: pkgconfig(libcurl)
 BuildRequires: pkgconfig(liblzma)
 BuildRequires: pkgconfig(libxml-2.0)
+%if 0%{?rhel} != 7
+BuildRequires: pkgconfig(openssl) >= 1.1.1
+%global with_openssl 1
+%endif
 %if %{with pcre}
 BuildRequires: pkgconfig(libpcre) >= 4.5
 %endif
@@ -369,6 +373,7 @@ developer.
 %{_bindir}/ODBCtester
 %{_bindir}/arraytest
 %{_bindir}/bincopydata
+%{_bindir}/murltest
 %{_bindir}/odbcsample1
 %{_bindir}/sample0
 %{_bindir}/sample1
@@ -805,6 +810,7 @@ fi
 -DWITH_CURL=ON \
 -DWITH_LZ4=ON \
 -DWITH_LZMA=ON \
+-DWITH_OPENSSL=%{?with_openssl:ON}%{!?with_openssl:OFF} \
 -DWITH_PCRE=ON \
 -DWITH_PROJ=OFF \
 -DWITH_READLINE=ON \
diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py
--- a/NT/mkodbcwxs.py
+++ b/NT/mkodbcwxs.py
@@ -36,10 +36,12 @@ def main():
 if sys.argv[2] == '64':
 folder = r'ProgramFiles64Folder'
 arch = 'x64'
+libcrypto = '-x64'
 vcpkg = r'C:\vcpkg\installed\x64-windows\{}'
 else:
 folder = r'ProgramFilesFolder'
 arch = 'x86'
+libcrypto = ''
 vcpkg = r'C:\vcpkg\installed\x86-windows\{}'
 vcdir = os.getenv('VCINSTALLDIR')
 if vcdir is None:
@@ -91,6 +93,8 @@ def main():
vcpkg.format(r'bin\iconv-2.dll'),
vcpkg.format(r'bin\bz2.dll'),
vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll
+   vcpkg.format(r'bin\libcrypto-3{}.dll'.format(libcrypto)),
+   vcpkg.format(r'bin\libssl-3{}.dll'.format(libcrypto)),
vcpkg.format(r'bin\lz4.dll'),
vcpkg.format(r'bin\liblzma.dll'),
vcpkg.format(r'bin\zlib1.dll')])
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -43,10 +43,12 @@ def main():
 if sys.argv[2] == '64':
 folder = r'ProgramFiles64Folder'
 arch = 

MonetDB: nilmask - merged with default

2023-10-31 Thread Niels Nes via checkin-list
Changeset: 8a2ae2a5b5a8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8a2ae2a5b5a8
Branch: nilmask
Log Message:

merged with default

Hg: Enter commit message.  Lines beginning with 'HG:' are removed.


diffs (37 lines):

diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
--- a/.github/workflows/linux.yml
+++ b/.github/workflows/linux.yml
@@ -3,7 +3,6 @@ name: MonetDB build and test
 on:
   push:
 branches: 
-  - '*'
   - 'branches/*'
   pull_request:
   # Allows you to run this workflow manually from the Actions tab
@@ -49,6 +48,13 @@ jobs:
 run: |
   cd build 
   cmake --build . --target test
+  - name: install pymonetdb
+run: pip3 install pymonetdb
+  - name: mtest 
+run: |
+  #cd build 
+  #cmake --build . --target mtest
+  $HOME/${{ matix.branch }}/Mtest.py -r --debug=0
   #-
   #uses: actions/upload-artifact@v3
   #name: Publish Linux binary wheels
diff --git a/sql/server/rel_psm.c b/sql/server/rel_psm.c
--- a/sql/server/rel_psm.c
+++ b/sql/server/rel_psm.c
@@ -950,7 +950,7 @@ rel_create_func(sql_query *query, dlist 
 
sql->params = NULL;
if (create) {
-   bit side_effect = (list_empty(restype) || 
list_empty(l)); /* TODO make this more precise? */
+   bit side_effect = (list_empty(restype) || (!vararg && 
list_empty(l))); /* TODO make this more precise? */
switch (mvc_create_func(, sql, sql->sa, s, fname, l, 
restype, type, lang, mod, imp, lang_body, (type == F_LOADER)?TRUE:FALSE, 
vararg, FALSE, side_effect)) {
case -1:
return sql_error(sql, 01, 
SQLSTATE(HY013) MAL_MALLOC_FAIL);
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: nilmask - merged with default

2023-10-28 Thread Niels Nes via checkin-list
Changeset: fcde82b8ec00 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fcde82b8ec00
Branch: nilmask
Log Message:

merged with default


diffs (71 lines):

diff --git a/common/stream/Tests/read_tests.py 
b/common/stream/Tests/read_tests.py
--- a/common/stream/Tests/read_tests.py
+++ b/common/stream/Tests/read_tests.py
@@ -148,4 +148,3 @@ if __name__ == "__main__":
 else:
 print("Usage: python3 read_tests.py [TESTDATANAME]", file=sys.stderr)
 sys.exit(1)
-
diff --git a/common/stream/Tests/testdata.py b/common/stream/Tests/testdata.py
--- a/common/stream/Tests/testdata.py
+++ b/common/stream/Tests/testdata.py
@@ -216,6 +216,7 @@ class TestFile:
 else:
 raise Exception("Unknown compression scheme: " + self.compression)
 f.write(content)
+f.close()
 return filename
 
 
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1642,11 +1642,23 @@ cleanup_and_swap(logger *lg, int *r, con
lg->catalog_id = noids;
lg->dcatalog = ndels;
 
+   /* failing to rename these two bats is not fatal */
+   if (BBPrename(lg->catalog_cnt, NULL) != GDK_SUCCEED)
+   GDKclrerr();
+   if (BBPrename(lg->catalog_lid, NULL) != GDK_SUCCEED)
+   GDKclrerr();
BBPunfix(lg->catalog_cnt->batCacheid);
BBPunfix(lg->catalog_lid->batCacheid);
 
lg->catalog_cnt = ncnts;
lg->catalog_lid = nlids;
+   char bak[FILENAME_MAX];
+   strconcat_len(bak, sizeof(bak), lg->fn, "_catalog_cnt", NULL);
+   if (BBPrename(lg->catalog_cnt, bak) < 0)
+   GDKclrerr();
+   strconcat_len(bak, sizeof(bak), lg->fn, "_catalog_lid", NULL);
+   if (BBPrename(lg->catalog_lid, bak) < 0)
+   GDKclrerr();
lg->cnt = BATcount(lg->catalog_bid);
lg->deleted -= cleanup;
return rcnt;
@@ -2061,16 +2073,24 @@ log_load(const char *fn, const char *log
BBPretain(lg->catalog_id->batCacheid);
BBPretain(lg->dcatalog->batCacheid);
}
+   /* failing to rename the catalog_cnt and catalog_lid bats is not
+* fatal */
lg->catalog_cnt = logbat_new(TYPE_lng, 1, SYSTRANS);
if (lg->catalog_cnt == NULL) {
GDKerror("failed to create catalog_cnt bat");
goto error;
}
+   strconcat_len(bak, sizeof(bak), fn, "_catalog_cnt", NULL);
+   if (BBPrename(lg->catalog_cnt, bak) < 0)
+   GDKclrerr();
lg->catalog_lid = logbat_new(TYPE_lng, 1, SYSTRANS);
if (lg->catalog_lid == NULL) {
GDKerror("failed to create catalog_lid bat");
goto error;
}
+   strconcat_len(bak, sizeof(bak), fn, "_catalog_lid", NULL);
+   if (BBPrename(lg->catalog_lid, bak) < 0)
+   GDKclrerr();
if (bm_get_counts(lg) != GDK_SUCCEED)
goto error;
 
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: nilmask - merged with default

2023-10-26 Thread Niels Nes via checkin-list
Changeset: 78b070926000 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/78b070926000
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 416 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -54,7 +54,7 @@
 # derivatives (CentOS, Scientific Linux), the geos library is not
 # available.  However, the geos library is available in the Extra
 # Packages for Enterprise Linux (EPEL).
-%if %{fedpkgs}
+%if %{fedpkgs} && (0%{?rhel} != 7) && (0%{?rhel} != 8)
 # By default create the MonetDB-geom-MonetDB5 package on Fedora and RHEL 7
 %bcond_without geos
 %endif
@@ -534,6 +534,7 @@ exit 0
 %if %{with cintegration}
 %{_libdir}/monetdb5/lib_capi.so
 %endif
+%{_libdir}/monetdb5/lib_csv.so
 %{_libdir}/monetdb5/lib_generator.so
 %doc %{_mandir}/man1/mserver5.1.gz
 %dir %{_datadir}/doc/MonetDB
diff --git a/debian/monetdb5-server.install b/debian/monetdb5-server.install
--- a/debian/monetdb5-server.install
+++ b/debian/monetdb5-server.install
@@ -4,4 +4,5 @@ debian/tmp/usr/lib/x86_64-linux-gnu/libm
 
 # usr/lib/x86_64-linux-gnu/monetdb5/lib_*.so EXCEPT: 
lib_{fits,geom,gsl,microbenchmark,opt_sql_append,pyapi*,rapi,sql,udf}.so
 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_capi.so 
usr/lib/x86_64-linux-gnu/monetdb5
+debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_csv.so 
usr/lib/x86_64-linux-gnu/monetdb5
 debian/tmp/usr/lib/x86_64-linux-gnu/monetdb5/lib_generator.so 
usr/lib/x86_64-linux-gnu/monetdb5
diff --git a/monetdb5/ChangeLog b/monetdb5/ChangeLog
--- a/monetdb5/ChangeLog
+++ b/monetdb5/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Fri Oct 20 2023 Panagiotis Koutsourakis 
+- Change how json is stored in the database: We now normalize json
+  strings after parsing, removing whitespace and eliminating duplicate
+  keys in objects.
+- The function json.filter now properly returns json scalars instead of
+  wrapping them in an array.
+
 * Wed Sep 13 2023 Sjoerd Mullender 
 - Removed the MAL tokenizer module.  It was never usable from SQL and
   in this form never would be.
diff --git a/monetdb5/ChangeLog.json-storage b/monetdb5/ChangeLog.json-storage
deleted file mode 100644
--- a/monetdb5/ChangeLog.json-storage
+++ /dev/null
@@ -1,10 +0,0 @@
-# ChangeLog file for monetdb5
-# This file is updated with Maddlog
-
-* Fri Oct 20 2023 Panagiotis Koutsourakis 
-- Change how json is stored in the database: We now normalize json
-  strings after parsing, removing whitespace and eliminating duplicate
-  keys in objects.
-- The function json.filter now properly returns json scalars instead of
-  wrapping them in an array.
-
diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -6315,6 +6315,8 @@ sql_update_default(Client c, mvc *sql, s
"RETURNS TABLE(\"table\" STRING, \"table_id\" INT, 
\"rowcount\" BIGINT)\n"
"EXTERNAL NAME sql.persist_unlogged;\n"
"GRANT EXECUTE ON FUNCTION sys.persist_unlogged() TO 
PUBLIC;\n"
+   "GRANT EXECUTE ON FUNCTION sys.persist_unlogged(string) 
TO PUBLIC;\n"
+   "GRANT EXECUTE ON FUNCTION sys.persist_unlogged(string, 
string) TO PUBLIC;\n"
"UPDATE sys.functions SET system = true WHERE system <> 
true AND\n"
"name = 'persist_unlogged' AND schema_id = 2000;\n";
printf("Running database upgrade commands:\n%s\n", query);
diff --git 
a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128 
b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
--- 
a/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
+++ 
b/sql/test/emptydb-previous-upgrade-chain-hge/Tests/upgrade.stable.out.int128
@@ -753,6 +753,8 @@ CREATE FUNCTION sys.persist_unlogged(sna
 RETURNS TABLE("table" STRING, "table_id" INT, "rowcount" BIGINT)
 EXTERNAL NAME sql.persist_unlogged;
 GRANT EXECUTE ON FUNCTION sys.persist_unlogged() TO PUBLIC;
+GRANT EXECUTE ON FUNCTION sys.persist_unlogged(string) TO PUBLIC;
+GRANT EXECUTE ON FUNCTION sys.persist_unlogged(string, string) TO PUBLIC;
 UPDATE sys.functions SET system = true WHERE system <> true AND
 name = 'persist_unlogged' AND schema_id = 2000;
 
diff --git a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out 
b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
--- a/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
+++ b/sql/test/emptydb-previous-upgrade-chain/Tests/upgrade.stable.out
@@ -753,6 +753,8 @@ CREATE FUNCTION sys.persist_unlogged(sna
 RETURNS TABLE("table" STRING, "table_id" INT, "rowcount" BIGINT)
 EXTERNAL NAME sql.persist_unlogged;
 GRANT EXECUTE ON FUNCTION sys.persist_unlogged() TO PUBLIC;
+GRANT EXECUTE ON FUNCTION sys.persist_unlogged(string) TO 

MonetDB: nilmask - merged with default

2023-10-25 Thread Niels Nes via checkin-list
Changeset: befa1b10e22b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/befa1b10e22b
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 3604 to 300 lines):

diff --git a/monetdb5/modules/atoms/Tests/All b/monetdb5/modules/atoms/Tests/All
--- a/monetdb5/modules/atoms/Tests/All
+++ b/monetdb5/modules/atoms/Tests/All
@@ -38,3 +38,5 @@ startswith
 endswith
 contains
 HAVE_ICONV?asciify
+
+ts_and_tstz_to_str_bug
diff --git a/monetdb5/modules/atoms/Tests/ts_and_tstz_to_str_bug.test 
b/monetdb5/modules/atoms/Tests/ts_and_tstz_to_str_bug.test
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/atoms/Tests/ts_and_tstz_to_str_bug.test
@@ -0,0 +1,16 @@
+statement ok
+CREATE TABLE t2 (dt TIMESTAMP)
+
+statement ok
+INSERT INTO t2 (dt) VALUES('2023-10-11 11:36')
+
+query I
+SELECT
+levenshtein(sys.timestamp_to_str(cast(dt as timestamp with time zone), 
'%Y-%d-%d %H:%M:%S'),
+sys.timestamp_to_str(dt, '%Y-%d-%d %H:%M:%S'))
+FROM t2
+
+0
+
+statement ok
+DROP TABLE t2
diff --git a/sql/backends/monet5/sql.h b/sql/backends/monet5/sql.h
--- a/sql/backends/monet5/sql.h
+++ b/sql/backends/monet5/sql.h
@@ -282,7 +282,6 @@ extern str SQLflush_log(Client cntxt, Ma
 extern str SQLsuspend_log_flushing(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 extern str SQLresume_log_flushing(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 extern str SQLhot_snapshot(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
pci);
-extern str SQLhot_snapshot_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 extern str SQLpersist_unlogged(Client cntxt, MalBlkPtr mb, MalStkPtr stk, 
InstrPtr pci);
 
 extern str SQLsession_prepared_statements(Client cntxt, MalBlkPtr mb, 
MalStkPtr stk, InstrPtr pci);
diff --git a/sql/backends/monet5/sql_upgrades.c 
b/sql/backends/monet5/sql_upgrades.c
--- a/sql/backends/monet5/sql_upgrades.c
+++ b/sql/backends/monet5/sql_upgrades.c
@@ -5179,6 +5179,7 @@ sql_update_jun2023(Client c, mvc *sql, s
char *err = NULL, *buf = GDKmalloc(bufsize);
res_table *output;
BAT *b;
+   sql_subtype t1, t2;
 
(void) sql;
if (buf == NULL)
@@ -5546,7 +5547,6 @@ sql_update_jun2023(Client c, mvc *sql, s
/* Add new sysadmin procedure calls: stop, pause and resume with two
   arguments, first arg is query OID and second the user username that
   the query in bound to. */
-   sql_subtype t1, t2;
sql_find_subtype(, "bigint", 64, 0);
sql_find_subtype(, "varchar", 0, 0);
if (!sql_bind_func(sql, "sys", "pause", , , F_PROC, true)) {
@@ -5781,6 +5781,38 @@ sql_update_jun2023(Client c, mvc *sql, s
 }
 
 static str
+sql_update_jun2023_sp3(Client c, mvc *sql, sql_schema *s)
+{
+   (void)s;
+   char *err = NULL;
+   sql_subtype t1, t2;
+
+   sql_find_subtype(, "timestamp", 0, 0);
+   sql_find_subtype(, "varchar", 0, 0);
+
+   if (!sql_bind_func(sql, "sys", "timestamp_to_str", , , F_FUNC, 
true)) {
+   sql->session->status = 0;
+   sql->errstr[0] = '\0';
+
+   char *query = GDKmalloc(512);
+   if (query == NULL)
+   throw(SQL, __func__, SQLSTATE(HY013) MAL_MALLOC_FAIL);
+
+   snprintf(query, 512, "CREATE FUNCTION timestamp_to_str(d 
TIMESTAMP, format STRING) RETURNS STRING "
+"EXTERNAL NAME mtime.\"timestamp_to_str\";\n"
+"GRANT EXECUTE ON FUNCTION 
timestamp_to_str(TIMESTAMP, STRING) TO PUBLIC;\n"
+"UPDATE sys.functions SET system = true WHERE 
system <> true AND name = 'timestamp_to_str' "
+"AND schema_id = 2000 and type = %d;\n", 
F_FUNC);
+
+   printf("Running database upgrade commands:\n%s\n", query);
+   err = SQLstatementIntern(c, query, "update", true, false, NULL);
+   GDKfree(query);
+   }
+
+   return err; /* usually MAL_SUCCEED */
+}
+
+static str
 sql_update_default_geom(Client c, mvc *sql, sql_schema *s)
 {
sql_subtype tp;
@@ -6278,10 +6310,10 @@ sql_update_default(Client c, mvc *sql, s
"EXTERNAL NAME sql.persist_unlogged;\n"
"CREATE FUNCTION sys.persist_unlogged(sname STRING)\n"
"RETURNS TABLE(\"table\" STRING, \"table_id\" INT, 
\"rowcount\" BIGINT)\n"
-   "EXTERNAL NAME sql.persist_unlogged(string);\n"
+   "EXTERNAL NAME sql.persist_unlogged;\n"
"CREATE FUNCTION sys.persist_unlogged(sname STRING, 
tname STRING)\n"
"RETURNS TABLE(\"table\" STRING, \"table_id\" INT, 
\"rowcount\" BIGINT)\n"
-   "EXTERNAL NAME sql.persist_unlogged(string, string);\n"
+   "EXTERNAL NAME sql.persist_unlogged;\n"
"GRANT EXECUTE ON FUNCTION sys.persist_unlogged() 

MonetDB: nilmask - merged with default

2023-10-25 Thread Niels Nes via checkin-list
Changeset: 79458994ca20 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/79458994ca20
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
clients/odbc/tests/ODBCmetadata.c
gdk/gdk.h
gdk/gdk_bat.c
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_builder.h
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_prelude.c
monetdb5/modules/mal/tablet.c
monetdb5/modules/mal/tablet.h
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_result.c
sql/backends/monet5/sql_statement.c
sql/backends/monet5/sql_statement.h
sql/common/sql_types.c
sql/include/sql_catalog.h
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_storage.h
sql/storage/sql_storage.h
sql/storage/store.c
tools/monetdbe/monetdbe.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 134029 to 300 lines):

diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml
new file mode 100644
--- /dev/null
+++ b/.github/workflows/linux.yml
@@ -0,0 +1,57 @@
+name: MonetDB build and test
+
+on:
+  push:
+branches: 
+  - '*'
+  - 'branches/*'
+  pull_request:
+  # Allows you to run this workflow manually from the Actions tab
+  workflow_dispatch:
+
+  schedule:
+- cron:  '15 1 * * *'
+
+jobs:
+  test:
+strategy:
+  fail-fast: false  # don't stop other jobs
+  matrix:
+branch: [ master ]
+os: [ ubuntu-latest, macos-latest ]
+runs-on: ${{ matrix.os }}
+steps:
+  - name: Checkout
+uses: actions/checkout@v3
+with:
+  ref: ${{ matrix.branch }}
+
+  - name: make MonetDB on linux
+run: |
+  mkdir build
+  cd build 
+  cmake ..  -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.branch }} 
-DPY3INTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DRINTEGRATION=OFF
+  make install -j3
+if: runner.os == 'Linux'
+  -
+name: brew packages
+run: brew install bison
+if: runner.os == 'macOS'
+  - name: make MonetDB on macos
+run: |
+  mkdir build
+  cd build 
+  cmake ..  -DCMAKE_INSTALL_PREFIX=$HOME/${{ matrix.branch }} 
-DPY3INTEGRATION=OFF -DCMAKE_BUILD_TYPE=Release -DASSERT=OFF -DRINTEGRATION=OFF 
 \
+-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison
+  make install -j3
+if: runner.os == 'macOS'
+  - name: ctest 
+run: |
+  cd build 
+  cmake --build . --target test
+  #-
+  #uses: actions/upload-artifact@v3
+  #name: Publish Linux binary wheels
+  #with:
+  #name: monetdbe-linux-wheel-${{ matrix.branch }}-${{ 
matrix.python-version }}
+  #path: dist/*.whl
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -805,3 +805,11 @@ d11af9398029c117b92a9be9efa971ac0299ffc4
 8b736d6dcfd63d0560c99fc5427b504c116b74b0 Sep2022_17
 8b736d6dcfd63d0560c99fc5427b504c116b74b0 Sep2022_SP3_release
 aba8c31c60480148cd388a09ac99b42679406258 Jun2023_1
+79dbf838f04483a2d9ccce8332090ff91b18caec Jun2023_3
+79dbf838f04483a2d9ccce8332090ff91b18caec Jun2023_release
+573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_5
+573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_SP1_release
+ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7
+1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9
+6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_11
+6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_SP2_release
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Thu Jul 27 2023 Niels Nes 
+- Removed the PYTHON MAP external language option, as after a fork the
+  synchronization primitives could be in any state, leading to deadlocks.
+  During the upgrade function definitions will fallback to the normal
+  PYTHON language option.
+
+* Mon Jul 17 2023 Panagiotis Koutsourakis 
+- Implemented direct masking for strimp construction. The strimps
+  datastructure now keeps an array of 65K 64-bit integers that is zero
+  everywhere except at the indexes that correspond to header pairs. The
+  entry for the nth pair in order has the nth bit of the bitstring
+  on. These can be used to quickly construct bitstrings.
diff --git a/ChangeLog-Archive b/ChangeLog-Archive
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -1,6 +1,19 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
+* Wed Aug 30 2023 Sjoerd Mullender  - 11.47.7-20230925
+- Do a lot more error checking, mostly for allocation failures.  More is
+  still needed, though.
+

MonetDB: nilmask - merged with default

2023-06-21 Thread Niels Nes via checkin-list
Changeset: 38f1ee2374db for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/38f1ee2374db
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
gdk/gdk.h
gdk/gdk_bat.c
sql/backends/monet5/sql.c
sql/storage/bat/bat_storage.c
sql/storage/sql_storage.h
sql/storage/store.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 27672 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -804,3 +804,4 @@ ed34ab4283cbfcc57fb9d7387bc9d781c91902b1
 d11af9398029c117b92a9be9efa971ac0299ffc4 Sep2022_15
 8b736d6dcfd63d0560c99fc5427b504c116b74b0 Sep2022_17
 8b736d6dcfd63d0560c99fc5427b504c116b74b0 Sep2022_SP3_release
+aba8c31c60480148cd388a09ac99b42679406258 Jun2023_1
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -89,7 +89,7 @@ Group: Applications/Databases
 License: MPL-2.0
 URL: https://www.monetdb.org/
 BugURL: https://github.com/MonetDB/MonetDB/issues
-Source: 
https://www.monetdb.org/downloads/sources/Sep2022-SP3/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Jun2023/%{name}-%{version}.tar.bz2
 
 # The Fedora packaging document says we need systemd-rpm-macros for
 # the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7
@@ -118,7 +118,7 @@ BuildRequires: pkgconfig(readline)
 BuildRequires: pkgconfig(cfitsio)
 %endif
 %if %{with geos}
-BuildRequires: geos-devel >= 3.4.0
+BuildRequires: geos-devel >= 3.10.0
 %endif
 BuildRequires: pkgconfig(libcurl)
 BuildRequires: pkgconfig(liblzma)
@@ -860,6 +860,120 @@ fi
 %endif
 
 %changelog
+* Fri Jun 16 2023 Sjoerd Mullender  - 11.47.1-20230616
+- Rebuilt.
+- GH#7311: Missing `REGEXP_REPLACE` function.
+- GH#7348: Subquery inside case always evaluated
+
+* Tue Jun  6 2023 Lucas Pereira  - 
11.47.1-20230616
+- sql: Function 'similarity(x string, y string)' marked as deprecated and will
+  be removed in the next release.
+
+* Tue Jun  6 2023 Martin van Dinther  
- 11.47.1-20230616
+- odbc: Extended Windows MonetDB ODBC Data Source setup program with option
+  to specify a logfile to enable tracing of ODBC Driver API calls.
+  On other platforms users can edit the  odbc.ini  file and add a line:
+  logfile=/home/username/odbctrace.log
+  When a logfile is specified it will start logging the ODBC Driver API calls
+  to the logfile after a new connection is made via SQLConnect() or
+  SQLDriverConnect() or SQLBrowseConnect().
+  Note that enabling ODBC logging will slow down the performance of ODBC
+  applications, so enable it only for analysing ODBC Driver problems.
+
+* Tue Jun  6 2023 Lucas Pereira  - 
11.47.1-20230616
+- sql: New functionality for string matching and similarity: startswith,
+  endswith, contains, Levenshtein distance and Jaro-Winkler similarity.
+  The functions startswith, endswith and contains have a version where
+  a case insentive flag can be used.
+  Also, there are new custom join functionality for startswith, endswith,
+  contains, Levenshtein distance and Jaro-Winkler similarity.
+- sql: Renamed previous Levenshtein distance to Damerau-Levenshtein distance.
+- sql: New string function that transform from UTF-8 encoding to Ascii called
+  asciify.
+
+* Tue Jun  6 2023 Martin van Dinther  
- 11.47.1-20230616
+- odbc: Enhanced SQLTables() by adding support for table type names: 'BASE 
TABLE',
+  'GLOBAL TEMPORARY' and 'LOCAL TEMPORARY' in parameter TableType. These are
+  synonyms of: 'TABLE', 'GLOBAL TEMPORARY TABLE' and 'LOCAL TEMPORARY TABLE'.
+
+* Tue Jun  6 2023 Lucas Pereira  - 
11.47.1-20230616
+- sql: Session timeout feature improvement to start evaluating from the moment
+  the procedure is called, instead of beginning of the session.
+
+* Tue Jun  6 2023 Lucas Pereira  - 
11.47.1-20230616
+- sql: Queries stopped with the stop procedure are now marked as 'aborted'
+  'finished'.
+
+* Tue Jun  6 2023 Niels Nes  - 11.47.1-20230616
+- monetdb5: The MAL debugger code has been removed.
+
+* Tue Jun  6 2023 Niels Nes  - 11.47.1-20230616
+- sql: The DEBUG statement has been removed.
+
+* Tue Jun  6 2023 Lucas Pereira  - 
11.47.1-20230616
+- sql: SQL function sys.queue() overloaded with sys.queue(username string),
+  SYSADMIN only, allowing to filter the global queue by username or
+  use 'ALL' to retrieve the global queue. Calling the function without
+  arguments returns the queue for the current user.
+- sql: SQL procedures sys.pause(tag bigint), sys.resume(tag bigint),
+  sys.stop(tag bigint) overloaded with sys.pause(tag bigint, username string),
+  sys.resume(tag bigint, username string) and sys.stop(tag bigint, username
+  string), SYSADMIN only, allowing to pause, resume and stop query
+  executions by TAG, USERNAME. The call without arguments is a public
+  procedure giving access to users to pause, resume and stop their
+  own query executions.
+
+* Tue Jun  6 2023 svetlin  - 

MonetDB: nilmask - merged with default

2023-06-15 Thread Niels Nes via checkin-list
Changeset: e2da898a6a26 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e2da898a6a26
Modified Files:
sql/storage/store.c
Branch: nilmask
Log Message:

merged with default


diffs (truncated from 690 to 300 lines):

diff --git a/documentation/source/manual_pages/mclient.rst 
b/documentation/source/manual_pages/mclient.rst
--- a/documentation/source/manual_pages/mclient.rst
+++ b/documentation/source/manual_pages/mclient.rst
@@ -196,7 +196,8 @@ SQL Options
 
 **--rows=**\ *nr* (**-r** *nr*)
If specified, query results will be paged by an internal pager at the
-   specified number of lines.
+   specified number of lines. If set to **0** (zero), use the height of
+   the terminal. The default is **-1** which means no pager is used.
 
 **--width=**\ *nr* (**-w** *nr*)
Specify the width of the screen. The default is the (initial) width
@@ -260,7 +261,8 @@ General Commands
 
 **\\r** *rows*
Use an internal pager using *rows* per page. If *rows* is **-1**,
-   stop using the internal pager.
+   stop using the internal pager, if *rows* is **0**, use the height of
+   the terminal.
 
 SQL Commands
 
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -35,7 +35,7 @@ static gdk_return log_del_bat(logger *lg
 #define LOG_CREATE 5
 #define LOG_DESTROY6
 #define LOG_SEQ7
-#define LOG_CLEAR  8 // DEPRECATED
+#define LOG_CLEAR  8 /* DEPRECATED */
 #define LOG_BAT_GROUP  9
 
 #ifdef NATIVE_WIN32
@@ -61,7 +61,7 @@ static const char *log_commands[] = {
"LOG_CREATE",
"LOG_DESTROY",
"LOG_SEQ",
-   "", // LOG_CLEAR IS DEPRECATED
+   "", /* LOG_CLEAR IS DEPRECATED */
"LOG_BAT_GROUP",
 };
 
@@ -376,10 +376,10 @@ log_read_updates(logger *lg, trans *tr, 
if (mnstr_readLng(lg->input_log, ) != 1)
return LOG_ERR;
if (cands) {
-   // This const range actually represents a 
segment of candidates corresponding to updated bat entries
+   /* This const range actually represents a 
segment of candidates corresponding to updated bat entries */
 
if (BATcount(*cands) == 0 || lg->flushing) {
-   // when flushing, we only need the 
offset and count of the last segment of inserts.
+   /* when flushing, we only need the 
offset and count of the last segment of inserts. */
assert((*cands)->ttype == TYPE_void);
BATtseqbase(*cands, (oid) offset);
BATsetcount(*cands, (BUN) nr);
@@ -407,7 +407,7 @@ log_read_updates(logger *lg, trans *tr, 
BBPreclaim(dense);
}
 
-   // We have to read the value to update the read 
cursor
+   /* We have to read the value to update the read 
cursor */
size_t tlen = lg->rbufsize;
void *t = rt(lg->rbuf, , lg->input_log, 1);
if (t == NULL) {
@@ -573,7 +573,7 @@ log_read_updates(logger *lg, trans *tr, 
if (tr_grow(tr) == GDK_SUCCEED) {
tr->changes[tr->nr].type = l->flag;
if (l->flag==LOG_UPDATE_BULK && offset == -1) {
-   assert(cands); // bat r is part of a 
group of bats logged together.
+   assert(cands); /* bat r is part of a 
group of bats logged together. */
struct canditer ci;
canditer_init(, NULL, *cands);
const oid first = canditer_peek();
@@ -1077,15 +1077,14 @@ log_open_output(logger *lg)
}
ATOMIC_INIT(_range->refcount, 1);
ATOMIC_INIT(_range->last_ts, 0);
-   ATOMIC_INIT(_range->end, 0);
-   ATOMIC_INIT(_range->pend, 0);
-   ATOMIC_INIT(_range->flushed_end, 0);
-   ATOMIC_INIT(_range->drops, 0);
+   ATOMIC_INIT(_range->flushed_ts, 0);
+   new_range->drops = 0;
new_range->id = lg->id;
new_range->next = NULL;
logged_range* current = lg->current;
assert(current && current->next == NULL);
current->next = new_range;
+   ATOMIC_INC(>nr_open_files);
return GDK_SUCCEED;
 }
 
@@ -1107,6 +1106,7 @@ log_close_output(logger *lg)
close_stream(lg->current->output_log);
}
lg->current->output_log = NULL;
+   ATOMIC_INC(>nr_open_files);
 }
 
 static gdk_return
@@ -1154,7 +1154,7 @@ log_read_transaction(logger *lg)
if (!lg->flushing)
ATOMIC_AND(, ~CHECKMASK);
 
-