MonetDB: Jun2023 - Fix regression: don't auto-enable or auto-sta...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 0d81654ca8b1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0d81654ca8b1
Modified Files:
debian/rules
Branch: Jun2023
Log Message:

Fix regression: don't auto-enable or auto-start the monetdbd service on Debian.


diffs (10 lines):

diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -57,3 +57,6 @@ override_dh_auto_install:
rm debian/tmp/usr/lib/*/monetdb5/lib_opt_sql_append.so
rm debian/tmp/usr/lib/*/monetdb5/lib_microbenchmark*.so
rm debian/tmp/usr/lib/*/monetdb5/lib_udf*.so
+
+override_dh_installsystemd:
+   dh_installsystemd --no-enable --no-start
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Merge with Jun2023 branch.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: dbd7c49851cb for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/dbd7c49851cb
Branch: default
Log Message:

Merge with Jun2023 branch.


diffs (10 lines):

diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -57,3 +57,6 @@ override_dh_auto_install:
rm debian/tmp/usr/lib/*/monetdb5/lib_opt_sql_append.so
rm debian/tmp/usr/lib/*/monetdb5/lib_microbenchmark*.so
rm debian/tmp/usr/lib/*/monetdb5/lib_udf*.so
+
+override_dh_installsystemd:
+   dh_installsystemd --no-enable --no-start
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Produce really stable output, even if patch l...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: e1abdb337aac for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e1abdb337aac
Modified Files:
clients/odbc/tests/ODBCtester.c
Branch: Jun2023
Log Message:

Produce really stable output, even if patch level >= 10.


diffs (16 lines):

diff --git a/clients/odbc/tests/ODBCtester.c b/clients/odbc/tests/ODBCtester.c
--- a/clients/odbc/tests/ODBCtester.c
+++ b/clients/odbc/tests/ODBCtester.c
@@ -88,11 +88,7 @@ retrieveDiagMsg(SQLHANDLE stmt, char * o
/* The message layout is: "[MonetDB][ODBC Driver 
11.46.0][MonetDB-Test]error/warning text".
   The ODBC driver version numbers changes in time. Overwrite 
it to get a stable output */
if (strncmp(msg, "[MonetDB][ODBC Driver 11.", 25) == 0) {
-   for (int i = 25; msg[i] != ']'; i++) {
-   if (isdigit(msg[i])) {
-   msg[i] = '#';
-   }
-   }
+   return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, 
Message [MonetDB][ODBC Driver 11.##.#]%s\n", (char*)state, (int)errnr, 
strchr(msg + 25, ']') + 1);
}
return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, Message 
%s\n", (char*)state, (int)errnr, (char*)msg);
}
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Use defined instead of static inline for lock...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: ad1e7ae319a2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ad1e7ae319a2
Modified Files:
gdk/gdk_logger.c
Branch: Jun2023
Log Message:

Use defined instead of static inline for lock functions.
Usually I like using static inline functions instead of function-like
defines, but not if it's in the way of debugging (in this case,
MT_lock_set may record the location from which it is called, which only
works if it's called directly, i.e. not through a static inline
function).


diffs (43 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1038,17 +1038,8 @@ log_create_types_file(logger *lg, const 
return GDK_SUCCEED;
 }
 
-static inline void
-rotation_lock(logger *lg)
-{
-   MT_lock_set(&lg->rotation_lock);
-}
-
-static inline void
-rotation_unlock(logger *lg)
-{
-   MT_lock_unset(&lg->rotation_lock);
-}
+#define rotation_lock(lg)  MT_lock_set(&(lg)->rotation_lock)
+#define rotation_unlock(lg)MT_lock_unset(&(lg)->rotation_lock)
 
 static gdk_return
 log_open_output(logger *lg)
@@ -3036,17 +3027,8 @@ log_tend(logger *lg)
return result;
 }
 
-static inline void
-flush_lock(logger *lg)
-{
-   MT_lock_set(&lg->flush_lock);
-}
-
-static inline void
-flush_unlock(logger *lg)
-{
-   MT_lock_unset(&lg->flush_lock);
-}
+#define flush_lock(lg) MT_lock_set(&(lg)->flush_lock)
+#define flush_unlock(lg)   MT_lock_unset(&(lg)->flush_lock)
 
 static inline gdk_return
 do_flush(logged_range *range)
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Add some rotation locks to protect manipulati...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 81851f049418 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/81851f049418
Modified Files:
gdk/gdk_logger.c
Branch: Jun2023
Log Message:

Add some rotation locks to protect manipulation of pending list.
Hopefully this prevents the occasional crash in segments-corruption.


diffs (51 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2276,7 +2276,6 @@ do_flush_range_cleanup(logger *lg)
logged_range *flast = frange;
 
lg->flush_ranges = flast;
-   rotation_unlock(lg);
 
for (frange = first; frange && frange != flast; frange = frange->next) {
ATOMIC_DEC(&frange->refcount);
@@ -2287,6 +2286,7 @@ do_flush_range_cleanup(logger *lg)
ATOMIC_DEC(&lg->nr_open_files);
}
}
+   rotation_unlock(lg);
return flast;
 }
 
@@ -2407,6 +2407,7 @@ log_next_logfile(logger *lg, ulng ts)
 static void
 log_cleanup_range(logger *lg, ulng id)
 {
+   rotation_lock(lg);
while (lg->pending && lg->pending->id <= id) {
logged_range *p;
p = lg->pending;
@@ -2414,6 +2415,7 @@ log_cleanup_range(logger *lg, ulng id)
lg->pending = p->next;
GDKfree(p);
}
+   rotation_unlock(lg);
 }
 
 static void
@@ -3058,6 +3060,7 @@ gdk_return
 log_tflush(logger *lg, ulng file_id, ulng commit_ts)
 {
if (lg->flushnow) {
+   rotation_lock(lg);
assert(lg->flush_ranges == lg->current);
assert(ATOMIC_GET(&lg->current->flushed_ts) == 
ATOMIC_GET(&lg->current->last_ts));
log_tdone(lg, lg->current, commit_ts);
@@ -3067,6 +3070,7 @@ log_tflush(logger *lg, ulng file_id, uln
if (log_open_output(lg) != GDK_SUCCEED)
GDKfatal("Could not create new log file\n");/* 
TODO: does not have to be fatal (yet) */
do_rotate(lg);
+   rotation_unlock(lg);
(void) do_flush_range_cleanup(lg);
assert(lg->flush_ranges == lg->current);
return log_commit(lg, NULL, 0);
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Changelog.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 5b68d1e0a856 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5b68d1e0a856
Modified Files:
ChangeLog.Jun2023
Branch: Jun2023
Log Message:

Changelog.


diffs (11 lines):

diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,3 +1,7 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Fri Sep 29 2023 Sjoerd Mullender 
+- Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Merge with Jun2023 branch.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 6f7c8b58a852 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6f7c8b58a852
Branch: default
Log Message:

Merge with Jun2023 branch.


diffs (118 lines):

diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,3 +1,7 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Fri Sep 29 2023 Sjoerd Mullender 
+- Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
diff --git a/clients/odbc/tests/ODBCtester.c b/clients/odbc/tests/ODBCtester.c
--- a/clients/odbc/tests/ODBCtester.c
+++ b/clients/odbc/tests/ODBCtester.c
@@ -88,11 +88,7 @@ retrieveDiagMsg(SQLHANDLE stmt, char * o
/* The message layout is: "[MonetDB][ODBC Driver 
11.46.0][MonetDB-Test]error/warning text".
   The ODBC driver version numbers changes in time. Overwrite 
it to get a stable output */
if (strncmp(msg, "[MonetDB][ODBC Driver 11.", 25) == 0) {
-   for (int i = 25; msg[i] != ']'; i++) {
-   if (isdigit(msg[i])) {
-   msg[i] = '#';
-   }
-   }
+   return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, 
Message [MonetDB][ODBC Driver 11.##.#]%s\n", (char*)state, (int)errnr, 
strchr(msg + 25, ']') + 1);
}
return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, Message 
%s\n", (char*)state, (int)errnr, (char*)msg);
}
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -1038,17 +1038,8 @@ log_create_types_file(logger *lg, const 
return GDK_SUCCEED;
 }
 
-static inline void
-rotation_lock(logger *lg)
-{
-   MT_lock_set(&lg->rotation_lock);
-}
-
-static inline void
-rotation_unlock(logger *lg)
-{
-   MT_lock_unset(&lg->rotation_lock);
-}
+#define rotation_lock(lg)  MT_lock_set(&(lg)->rotation_lock)
+#define rotation_unlock(lg)MT_lock_unset(&(lg)->rotation_lock)
 
 static gdk_return
 log_open_output(logger *lg)
@@ -2285,7 +2276,6 @@ do_flush_range_cleanup(logger *lg)
logged_range *flast = frange;
 
lg->flush_ranges = flast;
-   rotation_unlock(lg);
 
for (frange = first; frange && frange != flast; frange = frange->next) {
ATOMIC_DEC(&frange->refcount);
@@ -2296,6 +2286,7 @@ do_flush_range_cleanup(logger *lg)
ATOMIC_DEC(&lg->nr_open_files);
}
}
+   rotation_unlock(lg);
return flast;
 }
 
@@ -2416,6 +2407,7 @@ log_next_logfile(logger *lg, ulng ts)
 static void
 log_cleanup_range(logger *lg, ulng id)
 {
+   rotation_lock(lg);
while (lg->pending && lg->pending->id <= id) {
logged_range *p;
p = lg->pending;
@@ -2423,6 +2415,7 @@ log_cleanup_range(logger *lg, ulng id)
lg->pending = p->next;
GDKfree(p);
}
+   rotation_unlock(lg);
 }
 
 static void
@@ -3036,17 +3029,8 @@ log_tend(logger *lg)
return result;
 }
 
-static inline void
-flush_lock(logger *lg)
-{
-   MT_lock_set(&lg->flush_lock);
-}
-
-static inline void
-flush_unlock(logger *lg)
-{
-   MT_lock_unset(&lg->flush_lock);
-}
+#define flush_lock(lg) MT_lock_set(&(lg)->flush_lock)
+#define flush_unlock(lg)   MT_lock_unset(&(lg)->flush_lock)
 
 static inline gdk_return
 do_flush(logged_range *range)
@@ -3076,6 +3060,7 @@ gdk_return
 log_tflush(logger *lg, ulng file_id, ulng commit_ts)
 {
if (lg->flushnow) {
+   rotation_lock(lg);
assert(lg->flush_ranges == lg->current);
assert(ATOMIC_GET(&lg->current->flushed_ts) == 
ATOMIC_GET(&lg->current->last_ts));
log_tdone(lg, lg->current, commit_ts);
@@ -3085,6 +3070,7 @@ log_tflush(logger *lg, ulng file_id, uln
if (log_open_output(lg) != GDK_SUCCEED)
GDKfatal("Could not create new log file\n");/* 
TODO: does not have to be fatal (yet) */
do_rotate(lg);
+   rotation_unlock(lg);
(void) do_flush_range_cleanup(lg);
assert(lg->flush_ranges == lg->current);
return log_commit(lg, NULL, 0);
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - manual merge of subqueryfun branch.

2023-09-29 Thread Niels Nes via checkin-list
Changeset: ac93c378055c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ac93c378055c
Added Files:
sql/test/SQLancer/Tests/sqlancer24.test
Modified Files:
monetdb5/mal/mal_client.c
sql/server/rel_exp.c
sql/server/rel_exp.h
sql/server/rel_select.c
sql/server/rel_unnest.c
sql/server/rel_unnest.h
sql/server/sql_semantic.h
sql/storage/store.c
sql/test/SQLancer/Tests/All
sql/test/SQLancer/Tests/sqlancer19.test.in
sql/test/SQLancer/Tests/sqlancer20.test.in
Branch: default
Log Message:

manual merge of subqueryfun branch.

Fixed some more subquery problems, related to not binding variables.


diffs (truncated from 426 to 300 lines):

diff --git a/monetdb5/mal/mal_client.c b/monetdb5/mal/mal_client.c
--- a/monetdb5/mal/mal_client.c
+++ b/monetdb5/mal/mal_client.c
@@ -378,7 +378,6 @@ MCcloseClient(Client c)
c->promptlength = -1;
if (c->errbuf) {
/* no client threads in embedded mode */
-   //if (!GDKembedded())
GDKsetbuf(NULL);
if (c->father == NULL)
GDKfree(c->errbuf);
diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c
--- a/sql/server/rel_exp.c
+++ b/sql/server/rel_exp.c
@@ -3039,18 +3039,6 @@ check_distinct_exp_names(mvc *sql, list 
return exps;
 }
 
-void
-exps_reset_freevar(list *exps)
-{
-   if (exps)
-   for(node *n=exps->h; n; n=n->next) {
-   sql_exp *e = n->data;
-
-   /*later use case per type */
-   reset_freevar(e);
-   }
-}
-
 static int rel_find_parameter(mvc *sql, sql_subtype *type, sql_rel *rel, const 
char *relname, const char *expname);
 
 static int
diff --git a/sql/server/rel_exp.h b/sql/server/rel_exp.h
--- a/sql/server/rel_exp.h
+++ b/sql/server/rel_exp.h
@@ -207,7 +207,6 @@ extern void exp_sum_scales(sql_subfunc *
 
 extern int exp_aggr_is_count(sql_exp *e);
 extern list *check_distinct_exp_names(mvc *sql, list *exps);
-extern void exps_reset_freevar(list *exps);
 
 extern sql_exp *exp_check_type(mvc *sql, sql_subtype *t, sql_rel *rel, sql_exp 
*exp, check_type tpe);
 extern int rel_set_type_param(mvc *sql, sql_subtype *type, sql_rel *rel, 
sql_exp *rel_exp, int upcast);
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
@@ -4116,7 +4116,7 @@ static sql_exp *
if (!group && !all_freevar)
return e;
if (all_freevar) {
-   exps_reset_freevar(exps);
+   rel_bind_vars(sql, groupby->l, exps);
assert(!is_simple_project(res->op));
e->card = CARD_ATOM;
set_freevar(e, all_freevar-1);
@@ -5438,7 +5438,9 @@ rel_value_exp2(sql_query *query, sql_rel
r = rel_values(query, se, NULL);
} else {
assert(se->token == SQL_SELECT);
-   r = rel_subquery(query, se, ek);
+   exp_kind nek = ek;
+   nek.aggr = is_sql_aggr(f);
+   r = rel_subquery(query, se, nek);
}
if (rel && *rel) {
*rel = query_pop_outer(query);
@@ -5977,7 +5979,7 @@ rel_select_exp(sql_query *query, sql_rel
 * and rel_table_exp.
 */
list *te = NULL;
-   sql_exp *ce = rel_column_exp(query, &inner, n->data.sym, 
sql_sel | group_totals);
+   sql_exp *ce = rel_column_exp(query, &inner, n->data.sym, 
sql_sel | group_totals | (ek.aggr?sql_aggr:0));
 
if (ce) {
pexps = append(pexps, ce);
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
@@ -290,20 +290,23 @@ freevar_equal( sql_exp *e1, sql_exp *e2)
 }
 
 static list *
-merge_freevar(list *l, list *r)
+merge_freevar(list *l, list *r, bool all)
 {
if (!l)
return r;
if (!r)
return l;
-   return list_distinct(list_merge(l, r, (fdup)NULL), (fcmp)freevar_equal, 
(fdup)NULL);
+   r  = list_merge(l, r, (fdup)NULL);
+   if (all)
+   return r;
+   return list_distinct(r, (fcmp)freevar_equal, (fdup)NULL);
 }
 
 static list * exps_freevar(mvc *sql, list *exps);
 static list * rel_freevar(mvc *sql, sql_rel *rel);
 
 static list *
-exp_freevar(mvc *sql, sql_exp *e)
+exp_freevar(mvc *sql, sql_exp *e, bool all)
 {
if (mvc_highwater(sql))
return sql_error(sql, 10, SQLSTATE(42000) "Query too complex: 
running out of stack space");
@@ -314,7 +317,7 @@ exp_freevar(mvc *sql, sql_exp *e)
return append(sa_list(sql->sa), e);
break;
case e_convert:
-   return exp_

MonetDB: Jun2023 - Clear the correct (i.e. the recently allocate...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: fd9d5887226a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fd9d5887226a
Modified Files:
gdk/gdk_logger.c
Branch: Jun2023
Log Message:

Clear the correct (i.e. the recently allocated) piece of memory.


diffs (14 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2529,9 +2529,9 @@ log_flush(logger *lg, ulng ts)
log_unlock(lg);
return GDK_FAIL;
}
+   updated = p;
memset(updated + allocated / 4, 0, a - 
allocated);
allocated = a;
-   updated = p;
}
nupdated = n;
}
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: subqueryfun - Closing branch subqueryfun.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 3035462cb397 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3035462cb397
Branch: subqueryfun
Log Message:

Closing branch subqueryfun.

___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Merge with Jun2023 branch.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 0beb72f1491f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0beb72f1491f
Branch: default
Log Message:

Merge with Jun2023 branch.


diffs (14 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2529,9 +2529,9 @@ log_flush(logger *lg, ulng ts)
log_unlock(lg);
return GDK_FAIL;
}
+   updated = p;
memset(updated + allocated / 4, 0, a - 
allocated);
allocated = a;
-   updated = p;
}
nupdated = n;
}
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: literal_features - Do not mutate query string stream, h...

2023-09-29 Thread Yunus Koning via checkin-list
Changeset: 05e3646b0eb7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/05e3646b0eb7
Modified Files:
sql/server/sql_scan.c
Branch: literal_features
Log Message:

Do not mutate query string stream, handle underscores later


diffs (161 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
@@ -960,45 +960,33 @@ skip_sql_comment(struct scanner * lc)
 
 static int tokenize(mvc * lc, int cur);
 
+static inline bool is_valid_decimal_digit(int cur) { return (iswdigit(cur)); }
 static inline bool is_valid_binary_digit(int cur) { return (iswdigit(cur) && 
cur < '2'); }
 static inline bool is_valid_octal_digit(int cur) { return (iswdigit(cur) && 
cur < '8'); }
 static inline bool is_valid_hexadecimal_digit(int cur) { return 
iswxdigit(cur); }
 
-static inline int non_decimal_number(mvc* c, int *token, bool 
(*is_valid_n_ary_digit)(int), int type, char type2) {
+static inline int check_validity_number(mvc* c, bool 
initial_underscore_allowed, int *token, bool (*is_valid_n_ary_digit)(int), int 
type, char type2) {
struct scanner *lc = &c->scanner;
int cur = scanner_getc(lc);
-   bool underscore_allowed = true;
-   int underscore_shifts = 0;
+   bool underscore_allowed = initial_underscore_allowed;
while (cur != EOF) {
if (cur == '_') {
-   if (underscore_allowed) { // so previous character was 
not an underscore
-   // we have to apply a swap
-   underscore_shifts++;
+   if (underscore_allowed) // so previous character was 
not an underscore
underscore_allowed = false;
-   }
else /* ERROR */ {
*token = 0;
-   cur = '_';
break;
}   
}
-   else if (is_valid_n_ary_digit(cur)) {
+   else if (is_valid_n_ary_digit(cur))
underscore_allowed = true;
-   if (underscore_shifts) {
-   
lc->rs->buf[lc->rs->pos+lc->yycur-underscore_shifts-1] = cur; // do shift
-   lc->rs->buf[lc->rs->pos+lc->yycur-1] = ' '; // 
mark last character with null terminator
-   }
-   }
else
break;
*token = type;
cur = scanner_getc(lc);
}
 
-   for (int i = 0; i < underscore_shifts; i++)
-   utf8_putchar(lc, ' ');
-
-   if (cur == EOF || cur == '_')
+   if (cur == EOF)
return cur;
 
if (*token != type) {
@@ -1007,7 +995,6 @@ static inline int non_decimal_number(mvc
cur = type2;
*token = 0;
}
-
return cur;
 }
 
@@ -1015,7 +1002,7 @@ static int
 number(mvc * c, int cur)
 {
struct scanner *lc = &c->scanner;
-   int token = cur == '0' ? sqlINT : 0;
+   int token = sqlINT;
 
/* a number has one of these forms (expressed in regular expressions):
 * 0x[0-9A-Fa-f]+   -- (hexadecimal) INTEGER
@@ -1031,26 +1018,21 @@ number(mvc * c, int cur)
if (cur == '0') {
switch ((cur = scanner_getc(lc))) {
case 'b':
-   if ((cur = non_decimal_number(c, &token, 
&is_valid_binary_digit , BINARYNUM , 'b')) == EOF) 
return cur;
+   if ((cur = check_validity_number(c, true, &token, 
&is_valid_binary_digit, BINARYNUM , 'b')) 
== EOF) return cur;
is_decimal = false;
break;
case 'o':
-   if ((cur = non_decimal_number(c, &token, 
&is_valid_octal_digit  , OCTALNUM  , 'o')) == EOF) 
return cur;
+   if ((cur = check_validity_number(c, true, &token, 
&is_valid_octal_digit , OCTALNUM  , 'o')) == EOF) 
return cur;
is_decimal = false;
break;
case 'x':
-   if ((cur = non_decimal_number(c, &token, 
&is_valid_hexadecimal_digit, HEXADECIMALNUM, 'x')) == EOF) return cur;
+   if ((cur = check_validity_number(c, true, &token, 
&is_valid_hexadecimal_digit   , HEXADECIMALNUM, 'x')) == EOF) return cur;
is_decimal = false;
break;
}
}
-   if (is_decimal) {
-   while (cur != EOF && (iswdigit(cur) || cur == '_')) {
-   token = sqlINT;
-   cur = scanner_getc(lc);
-   }
-   if (cur == EOF)
-   return cur;
+   

MonetDB: literal_features - merged with default

2023-09-29 Thread Niels Nes via checkin-list
Changeset: 9847e6d6f8f7 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/9847e6d6f8f7
Modified Files:
sql/server/sql_parser.y
sql/server/sql_scan.c
Branch: literal_features
Log Message:

merged with default


diffs (truncated from 41139 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -809,3 +809,5 @@ 79dbf838f04483a2d9ccce8332090ff91b18caec
 79dbf838f04483a2d9ccce8332090ff91b18caec Jun2023_release
 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_5
 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_SP1_release
+ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7
+1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,3 +7,9 @@
   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,15 @@
 # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
 # This file contains past ChangeLog entries
 
+* 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.
+
+* Thu Aug 10 2023 Panagiotis Koutsourakis  - 
11.47.7-20230925
+- Improve performance of the ILIKE operator when the pattern contains only
+  ASCII characters. In this case we do not need to treat any characters as
+  UTF-8 and we can use much faster routines that perform byte comparisons.
+
 * Wed Jan 12 2022 Sjoerd Mullender  - 11.43.5-20220118
 - A couple of concurrency issues have been fixed.
 
diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,8 +1,7 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Thu Aug 10 2023 Panagiotis Koutsourakis 
-- Improve performance of the ILIKE operator when the pattern contains only
-  ASCII characters. In this case we do not need to treat any characters as
-  UTF-8 and we can use much faster routines that perform byte comparisons.
+* Fri Sep 29 2023 Sjoerd Mullender 
+- Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
 
diff --git a/ChangeLog.strimps-updates b/ChangeLog.strimps-updates
deleted file mode 100644
--- a/ChangeLog.strimps-updates
+++ /dev/null
@@ -1,10 +0,0 @@
-# ChangeLog file for strimpsv2
-# This file is updated with Maddlog
-
-* 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/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/Jun2023-SP1/%{name}-%{version}.tar.bz2
+Source: 
https://www.monetdb.org/downloads/sources/Jun2023-SP2/%{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
@@ -860,6 +860,48 @@ fi
 %endif
 
 %changelog
+* Wed Sep 27 2023 Sjoerd Mullender  - 11.47.9-20230927
+- Rebuilt.
+- GH#7402: Privileges on merge table not propagated to partition tables
+
+* Mon Sep 25 2023 Sjoerd Mullender  - 11.47.7-20230925
+- Rebuilt.
+- GH#7094: Drop remote tables in transactions and rollback
+- GH#7303: Improve the performance of multi-column filters
+- GH#7400: VM max memory is not check correctly for cgroups v2
+- GH#7401: Column aliases used incorrectly in UNION subqueries
+
+* Fri Sep 22 2023 Sjoerd Mullender  - 11.47.7-20230925
+- gdk: Fixed a number of data races (race conditions).
+
+* Mon Sep 18 2023 Sjoerd Mullender  - 11.47.7-20230925
+- gdk: Fixed a reference counting problem when a BAT could nog be loaded,
+  e.g. because of resource limitations.
+
+* Wed Aug 30 2023 Sjoerd Mullender  - 11.47.7-20230925
+- gdk: Only check for virtual memory limits when creating or growing bats,
+  not for general memory allocations.  There is (still) too much code
+  that doesn't properly handle failing allocations, so we need to avoid
+  those as much as possible.  This has mostly an effect if there are
+  virtual memory size restrictions imposed by cgroups (memory.swap.max
+  in cgroups v2, memory.memsw.limit_

MonetDB: Jun2023 - Pre-release version number update.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 5d7c9d96a972 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5d7c9d96a972
Modified Files:
.bumpversion.cfg
MonetDB.spec
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
cmake/monetdb-versions.cmake
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
Branch: Jun2023
Log Message:

Pre-release version number update.


diffs (191 lines):

diff --git a/.bumpversion.cfg b/.bumpversion.cfg
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 11.47.10
+current_version = 11.47.11
 commit = False
 tag = False
 
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -7,7 +7,7 @@
 # Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
 
 %global name MonetDB
-%global version 11.47.10
+%global version 11.47.11
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # Use bcond_with to add a --with option; i.e., "without" is default.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U
 #define sversion(major,minor,patch)#major "." #minor "." #patch "\0"
 
 1 VERSIONINFO
-  FILEVERSION version(11,47,10)
-  PRODUCTVERSION version(11,47,10)
+  FILEVERSION version(11,47,11)
+  PRODUCTVERSION version(11,47,11)
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -21,14 +21,14 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", sversion(11,47,10)
+  VALUE "FileVersion", sversion(11,47,11)
   VALUE "InternalName", "Mapi\0"
   VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2023\0"
   VALUE "LegalTrademarks", "\0"
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", sversion(11,47,10)
+  VALUE "ProductVersion", sversion(11,47,11)
   VALUE "SpecialBuild", "\0"
 END
   END
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U
 #define sversion(major,minor,patch)#major "." #minor "." #patch "\0"
 
 1 VERSIONINFO
-  FILEVERSION version(11,47,10)
-  PRODUCTVERSION version(11,47,10)
+  FILEVERSION version(11,47,11)
+  PRODUCTVERSION version(11,47,11)
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -21,14 +21,14 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", sversion(11,47,10)
+  VALUE "FileVersion", sversion(11,47,11)
   VALUE "InternalName", "MonetODBC\0"
   VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2023\0"
   VALUE "LegalTrademarks", "\0"
   VALUE "OriginalFilename", "MonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", sversion(11,47,10)
+  VALUE "ProductVersion", sversion(11,47,11)
   VALUE "SpecialBuild", "\0"
 END
   END
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -65,8 +65,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION version(11,47,10)
- PRODUCTVERSION version(11,47,10)
+ FILEVERSION version(11,47,11)
+ PRODUCTVERSION version(11,47,11)
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -83,12 +83,12 @@ BEGIN
 BEGIN
 VALUE "CompanyName", "MonetDB B.V."
 VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-VALUE "FileVersion", sversion(11,47,10)
+VALUE "FileVersion", sversion(11,47,11)
 VALUE "InternalName", "MonetODBCs.dll"
 VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2023"
 VALUE "OriginalFilename", "MonetODBCs.dll"
 VALUE "ProductName", "MonetDB SQL Server"
-VALUE "ProductVersion", sversion(11,47,10)
+VALUE "ProductVersion", sversion(11,47,11)
 END
 END
 BLOCK "VarFileInfo"
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -10,10 +10,10 @@
 
 set(MONETDB_VERSION_MAJOR "11")
 set(MONETDB_VERSION_MINOR "47")
-set(MONETDB_VERSION_PATCH "10")
+set(MONETDB_VERSION_PATCH "11")
 
 if(RELEASE_VERSION)
-  set(MONETDB_RELEASE "unreleased")
+  set(MONETDB_RELEASE "Jun2023-SP2")
 endif()
 set(MONETDB_VERSION 
"${MONETDB_VERSION_MAJOR}.${MONETDB_VERSION_MINOR}.${MONETDB_VERSION_PATCH}")
 
diff --git a/gdk/libbat.rc b/gdk/libbat.rc
--- a/gdk/libba

MonetDB: default - Merge with Jun2023 branch, not changing any f...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 04db6bd231d1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/04db6bd231d1
Modified Files:
.bumpversion.cfg
MonetDB.spec
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
cmake/monetdb-versions.cmake
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
Branch: default
Log Message:

Merge with Jun2023 branch, not changing any files.

___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Updated library versions.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: fea530f0e3ba for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/fea530f0e3ba
Modified Files:
cmake/monetdb-versions.cmake
Branch: Jun2023
Log Message:

Updated library versions.


diffs (12 lines):

diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -42,7 +42,7 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M
 # common/options and common/utils)
 set(GDK_VERSION_MAJOR "27")
 set(GDK_VERSION_MINOR "0")
-set(GDK_VERSION_PATCH "3")
+set(GDK_VERSION_PATCH "4")
 set(GDK_VERSION 
"${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}")
 
 # version of the MAPI library (subdirectory clients/mapilib)
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Moved contents of ChangeLog.Jun2023 to MonetD...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 6f88424ebfd9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6f88424ebfd9
Modified Files:
ChangeLog-Archive
ChangeLog.Jun2023
MonetDB.spec
debian/changelog
misc/packages/deb/changelog
misc/packages/rpm/changelog
Branch: Jun2023
Log Message:

Moved contents of ChangeLog.Jun2023 to MonetDB.spec, debian/changelog and 
ChangeLog-Archive.


diffs (96 lines):

diff --git a/ChangeLog-Archive b/ChangeLog-Archive
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -1,6 +1,10 @@
 # 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.
diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,7 +1,3 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Fri Sep 29 2023 Sjoerd Mullender 
-- Fixed an installation issue on Debian and Ubuntu introduced in the
-  last build.
-
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -860,6 +860,13 @@ fi
 %endif
 
 %changelog
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- Rebuilt.
+
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
 * Wed Sep 27 2023 Sjoerd Mullender  - 11.47.9-20230927
 - Rebuilt.
 - GH#7402: Privileges on merge table not propagated to partition tables
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+monetdb (11.47.11) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
+monetdb (11.47.11) unstable; urgency=low
+
+  * MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+last build.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
 monetdb (11.47.9) unstable; urgency=low
 
   * Rebuilt.
diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog
--- a/misc/packages/deb/changelog
+++ b/misc/packages/deb/changelog
@@ -1,3 +1,16 @@
+monetdb (11.47.11) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
+monetdb (11.47.11) unstable; urgency=low
+
+  * MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+last build.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
 monetdb (11.47.9) unstable; urgency=low
 
   * Rebuilt.
diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog
--- a/misc/packages/rpm/changelog
+++ b/misc/packages/rpm/changelog
@@ -1,3 +1,10 @@
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- Rebuilt.
+
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
 * Wed Sep 27 2023 Sjoerd Mullender  - 11.47.9-20230927
 - Rebuilt.
 - GH#7402: Privileges on merge table not propagated to partition tables
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: groupjoin - merged with default

2023-09-29 Thread Niels Nes via checkin-list
Changeset: f6aa163ef5de for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f6aa163ef5de
Branch: groupjoin
Log Message:

merged with default


diffs (truncated from 833 to 300 lines):

diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,3 +1,7 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
+* Fri Sep 29 2023 Sjoerd Mullender 
+- Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
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
@@ -214,7 +214,7 @@ BBPrec *BBP[N_BBPINIT];
 gdk_return BBPaddfarm(const char *dirname, uint32_t rolemask, bool logerror);
 void BBPcold(bat i);
 int BBPfix(bat b);
-unsigned BBPheader(FILE *fp, int *lineno, bat *bbpsize, lng *logno, lng 
*transid);
+unsigned BBPheader(FILE *fp, int *lineno, bat *bbpsize, lng *logno, lng 
*transid, bool allow_hge_upgrade);
 bat BBPindex(const char *nme);
 void BBPkeepref(BAT *b) __attribute__((__nonnull__(1)));
 bat BBPlimit;
diff --git a/clients/odbc/tests/ODBCtester.c b/clients/odbc/tests/ODBCtester.c
--- a/clients/odbc/tests/ODBCtester.c
+++ b/clients/odbc/tests/ODBCtester.c
@@ -88,11 +88,7 @@ retrieveDiagMsg(SQLHANDLE stmt, char * o
/* The message layout is: "[MonetDB][ODBC Driver 
11.46.0][MonetDB-Test]error/warning text".
   The ODBC driver version numbers changes in time. Overwrite 
it to get a stable output */
if (strncmp(msg, "[MonetDB][ODBC Driver 11.", 25) == 0) {
-   for (int i = 25; msg[i] != ']'; i++) {
-   if (isdigit(msg[i])) {
-   msg[i] = '#';
-   }
-   }
+   return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, 
Message [MonetDB][ODBC Driver 11.##.#]%s\n", (char*)state, (int)errnr, 
strchr(msg + 25, ']') + 1);
}
return snprintf(outp, outp_len, "SQLstate %s, Errnr %d, Message 
%s\n", (char*)state, (int)errnr, (char*)msg);
}
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -57,3 +57,6 @@ override_dh_auto_install:
rm debian/tmp/usr/lib/*/monetdb5/lib_opt_sql_append.so
rm debian/tmp/usr/lib/*/monetdb5/lib_microbenchmark*.so
rm debian/tmp/usr/lib/*/monetdb5/lib_udf*.so
+
+override_dh_installsystemd:
+   dh_installsystemd --no-enable --no-start
diff --git a/gdk/ChangeLog b/gdk/ChangeLog
--- a/gdk/ChangeLog
+++ b/gdk/ChangeLog
@@ -1,3 +1,9 @@
 # ChangeLog file for GDK
 # This file is updated with Maddlog
 
+* Thu Sep 28 2023 Sjoerd Mullender 
+- We now prevent accidental upgrades from a database without 128 bit
+  integers to one with 128 bit integers (also known as HUGEINT) from
+  happening.  Upgrades will only be done if the server is started with
+  the option --set allow_hge_upgrade=yes.
+
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -985,7 +985,7 @@ BBPcheckbats(unsigned bbpversion)
 #endif
 
 unsigned
-BBPheader(FILE *fp, int *lineno, bat *bbpsize, lng *logno, lng *transid)
+BBPheader(FILE *fp, int *lineno, bat *bbpsize, lng *logno, lng *transid, bool 
allow_hge_upgrade)
 {
char buf[BUFSIZ];
int sz, ptrsize, oidsize, intsize;
@@ -1034,6 +1034,13 @@ BBPheader(FILE *fp, int *lineno, bat *bb
 SIZEOF_MAX_INT, intsize);
return 0;
}
+   if (intsize < SIZEOF_MAX_INT && !allow_hge_upgrade) {
+   TRC_CRITICAL(GDK, "database created with incompatible server: "
+"expected max. integer size %d, got %d; "
+"use --set allow_hge_upgrade=yes to upgrade.",
+SIZEOF_MAX_INT, intsize);
+   return 0;
+   }
if (fgets(buf, sizeof(buf), fp) == NULL) {
TRC_CRITICAL(GDK, "short BBP");
return 0;
@@ -1548,7 +1555,7 @@ BBPmanager(void *dummy)
 static MT_Id manager;
 
 gdk_return
-BBPinit(void)
+BBPinit(bool allow_hge_upgrade)
 {
FILE *fp = NULL;
struct stat st;
@@ -1678,7 +1685,7 @@ BBPinit(void)
bbpversion = GDKLIBRARY;
} else {
lng logno, transid;
-   bbpversion = BBPheader(fp, &lineno, &bbpsize, &logno, &transid);
+   bbpversion = BBPheader(fp, &lineno, &bbpsize, &logno, &transid, 
allow_hge_upgrade);
if (bbpversion == 0) {
ATOMIC_SET(&GDKdebug, dbg);
return GDK_FAIL;
@@ -3692,7 +3699,7 @@ BBPcheckBBPdir(void)
if (fp == NULL)
return;
}
-   bbpversion = BBPheader(fp, &lineno, &bbpsize, &logno, &transid);
+   bbpversion = BBPheader(fp, &lineno, &bbpsize, &logno, &transid, false);
   

MonetDB: Jun2023 - Setting tag Jun2023_11 for the release build.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: cff5bf01662b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cff5bf01662b
Modified Files:
.hgtags
Branch: Jun2023
Log Message:

Setting tag Jun2023_11 for the release build.


diffs (8 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -811,3 +811,4 @@ 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2
 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_SP1_release
 ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7
 1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9
+6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_11
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Merge with Jun2023 branch.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 6d61c8a73476 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6d61c8a73476
Modified Files:
.hgtags
MonetDB.spec
cmake/monetdb-versions.cmake
debian/changelog
misc/packages/deb/changelog
misc/packages/rpm/changelog
Branch: default
Log Message:

Merge with Jun2023 branch.


diffs (116 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -811,3 +811,4 @@ 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2
 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_SP1_release
 ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7
 1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9
+6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_11
diff --git a/ChangeLog-Archive b/ChangeLog-Archive
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -1,6 +1,10 @@
 # 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.
diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,7 +1,3 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Fri Sep 29 2023 Sjoerd Mullender 
-- Fixed an installation issue on Debian and Ubuntu introduced in the
-  last build.
-
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -860,6 +860,13 @@ fi
 %endif
 
 %changelog
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- Rebuilt.
+
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
 * Wed Sep 27 2023 Sjoerd Mullender  - 11.47.9-20230927
 - Rebuilt.
 - GH#7402: Privileges on merge table not propagated to partition tables
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -42,7 +42,7 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M
 # common/options and common/utils)
 set(GDK_VERSION_MAJOR "27")
 set(GDK_VERSION_MINOR "0")
-set(GDK_VERSION_PATCH "3")
+set(GDK_VERSION_PATCH "4")
 set(GDK_VERSION 
"${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}")
 
 # version of the MAPI library (subdirectory clients/mapilib)
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+monetdb (11.47.11) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
+monetdb (11.47.11) unstable; urgency=low
+
+  * MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+last build.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
 monetdb (11.47.9) unstable; urgency=low
 
   * Rebuilt.
diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog
--- a/misc/packages/deb/changelog
+++ b/misc/packages/deb/changelog
@@ -1,3 +1,16 @@
+monetdb (11.47.11) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
+monetdb (11.47.11) unstable; urgency=low
+
+  * MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+last build.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
 monetdb (11.47.9) unstable; urgency=low
 
   * Rebuilt.
diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog
--- a/misc/packages/rpm/changelog
+++ b/misc/packages/rpm/changelog
@@ -1,3 +1,10 @@
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- Rebuilt.
+
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
 * Wed Sep 27 2023 Sjoerd Mullender  - 11.47.9-20230927
 - Rebuilt.
 - GH#7402: Privileges on merge table not propagated to partition tables
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: Jun2023 - Post release build.

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: a6cf30b63a69 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a6cf30b63a69
Modified Files:
.bumpversion.cfg
MonetDB.spec
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
cmake/monetdb-versions.cmake
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
Branch: Jun2023
Log Message:

Post release build.


diffs (191 lines):

diff --git a/.bumpversion.cfg b/.bumpversion.cfg
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
 [bumpversion]
-current_version = 11.47.11
+current_version = 11.47.12
 commit = False
 tag = False
 
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -7,7 +7,7 @@
 # Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
 
 %global name MonetDB
-%global version 11.47.11
+%global version 11.47.12
 %{!?buildno: %global buildno %(date +%Y%m%d)}
 
 # Use bcond_with to add a --with option; i.e., "without" is default.
diff --git a/clients/mapilib/mapi.rc b/clients/mapilib/mapi.rc
--- a/clients/mapilib/mapi.rc
+++ b/clients/mapilib/mapi.rc
@@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U
 #define sversion(major,minor,patch)#major "." #minor "." #patch "\0"
 
 1 VERSIONINFO
-  FILEVERSION version(11,47,11)
-  PRODUCTVERSION version(11,47,11)
+  FILEVERSION version(11,47,12)
+  PRODUCTVERSION version(11,47,12)
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -21,14 +21,14 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB Application Interface DLL\0"
-  VALUE "FileVersion", sversion(11,47,11)
+  VALUE "FileVersion", sversion(11,47,12)
   VALUE "InternalName", "Mapi\0"
   VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2023\0"
   VALUE "LegalTrademarks", "\0"
   VALUE "OriginalFilename", "Mapi.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB Client Libraries\0"
-  VALUE "ProductVersion", sversion(11,47,11)
+  VALUE "ProductVersion", sversion(11,47,12)
   VALUE "SpecialBuild", "\0"
 END
   END
diff --git a/clients/odbc/driver/driver.rc b/clients/odbc/driver/driver.rc
--- a/clients/odbc/driver/driver.rc
+++ b/clients/odbc/driver/driver.rc
@@ -6,8 +6,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_U
 #define sversion(major,minor,patch)#major "." #minor "." #patch "\0"
 
 1 VERSIONINFO
-  FILEVERSION version(11,47,11)
-  PRODUCTVERSION version(11,47,11)
+  FILEVERSION version(11,47,12)
+  PRODUCTVERSION version(11,47,12)
   FILEFLAGSMASK 0x3fL
   FILEFLAGS 0
   FILEOS VOS_NT_WINDOWS32
@@ -21,14 +21,14 @@ BEGIN
   VALUE "Comments", "\0"
   VALUE "CompanyName", "MonetDB B.V.\0"
   VALUE "FileDescription", "MonetDB ODBC Driver DLL\0"
-  VALUE "FileVersion", sversion(11,47,11)
+  VALUE "FileVersion", sversion(11,47,12)
   VALUE "InternalName", "MonetODBC\0"
   VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2023\0"
   VALUE "LegalTrademarks", "\0"
   VALUE "OriginalFilename", "MonetODBC.dll\0"
   VALUE "PrivateBuild", "\0"
   VALUE "ProductName", "MonetDB SQL Server\0"
-  VALUE "ProductVersion", sversion(11,47,11)
+  VALUE "ProductVersion", sversion(11,47,12)
   VALUE "SpecialBuild", "\0"
 END
   END
diff --git a/clients/odbc/winsetup/setup.rc b/clients/odbc/winsetup/setup.rc
--- a/clients/odbc/winsetup/setup.rc
+++ b/clients/odbc/winsetup/setup.rc
@@ -65,8 +65,8 @@ END
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION version(11,47,11)
- PRODUCTVERSION version(11,47,11)
+ FILEVERSION version(11,47,12)
+ PRODUCTVERSION version(11,47,12)
  FILEFLAGSMASK 0x3fL
 #ifdef _DEBUG
  FILEFLAGS 0x1L
@@ -83,12 +83,12 @@ BEGIN
 BEGIN
 VALUE "CompanyName", "MonetDB B.V."
 VALUE "FileDescription", "MonetDB ODBC Setup DLL"
-VALUE "FileVersion", sversion(11,47,11)
+VALUE "FileVersion", sversion(11,47,12)
 VALUE "InternalName", "MonetODBCs.dll"
 VALUE "LegalCopyright", "Copyright (c) MonetDB B.V. 2008-2023"
 VALUE "OriginalFilename", "MonetODBCs.dll"
 VALUE "ProductName", "MonetDB SQL Server"
-VALUE "ProductVersion", sversion(11,47,11)
+VALUE "ProductVersion", sversion(11,47,12)
 END
 END
 BLOCK "VarFileInfo"
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -10,10 +10,10 @@
 
 set(MONETDB_VERSION_MAJOR "11")
 set(MONETDB_VERSION_MINOR "47")
-set(MONETDB_VERSION_PATCH "11")
+set(MONETDB_VERSION_PATCH "12")
 
 if(RELEASE_VERSION)
-  set(MONETDB_RELEASE "Jun2023-SP2")
+  set(MONETDB_RELEASE "unreleased")
 endif()
 set(MONETDB_VERSION 
"${MONETDB_VERSION_MAJOR}.${MONETDB_VERSION_MINOR}.${MONETDB_VERSION_PATCH}")
 
diff --git a/gdk/libbat.rc b/gdk/libbat.rc
--- a/gdk/libbat.rc
+++ b/gdk/

MonetDB: default - Merge with Jun2023 branch, not changing any f...

2023-09-29 Thread Sjoerd Mullender via checkin-list
Changeset: 63ed66a4dad5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/63ed66a4dad5
Modified Files:
.bumpversion.cfg
MonetDB.spec
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
cmake/monetdb-versions.cmake
gdk/libbat.rc
monetdb5/tools/libmonetdb5.rc
Branch: default
Log Message:

Merge with Jun2023 branch, not changing any files..

___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: literal_features - small tests for literals.

2023-09-29 Thread Niels Nes via checkin-list
Changeset: eeff470bdd3f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/eeff470bdd3f
Added Files:
sql/test/2023/Tests/literals.test
Branch: literal_features
Log Message:

small tests for literals.


diffs (14 lines):

diff --git a/sql/test/2023/Tests/literals.test 
b/sql/test/2023/Tests/literals.test
new file mode 100644
--- /dev/null
+++ b/sql/test/2023/Tests/literals.test
@@ -0,0 +1,9 @@
+
+query III rowsort  
 
+SELECT 0x, 0o755, 0b1100
+
+
+query II rowsort   

+SELECT 1_000_000, 0x__
+
+
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: insertonly - insertonly_nowal = true sets log_size to f...

2023-09-29 Thread Lucas Pereira via checkin-list
Changeset: db7ad92d788d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/db7ad92d788d
Modified Files:
gdk/gdk_logger.c
Branch: insertonly
Log Message:

insertonly_nowal = true sets log_size to forcemito size.


diffs (24 lines):

diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2996,7 +2996,6 @@ log_delta(logger *lg, BAT *uid, BAT *uva
 #define DBLKSZ 8192
 #define SEGSZ  (64*DBLKSZ)
 
-#define LOG_TINY(LL_CONSTANT(2))
 #define LOG_MINI   (LL_CONSTANT(2)*1024)
 #define LOG_LARGE  (LL_CONSTANT(2)*1024*1024*1024)
 
@@ -3012,9 +3011,9 @@ check_rotation_conditions(logger *lg)
return true;
const lng p = (lng) getfilepos(getFile(lg->current->output_log));
 
-   const lng log_large = (ATOMIC_GET(&GDKdebug) & FORCEMITOMASK) ? 
LOG_MINI :
-  GDKgetenv_istrue("insertonly_nowal") ? LOG_TINY : LOG_LARGE;
-   bool res = (lg->saved_id + 1 >= lg->id && 
ATOMIC_GET(&lg->current->drops) > 10) || (p > log_large);
+   const lng log_size = (ATOMIC_GET(&GDKdebug) & FORCEMITOMASK) || 
GDKgetenv_istrue("insertonly_nowal") ?
+   LOG_MINI : LOG_LARGE;
+   bool res = (lg->saved_id + 1 >= lg->id && 
ATOMIC_GET(&lg->current->drops) > 10) || (p > log_size);
if (res)
return (ATOMIC_GET(&lg->nr_open_files) < 8);
return res;
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: insertonly - Overload insertonly_persist with a call wi...

2023-09-29 Thread Lucas Pereira via checkin-list
Changeset: 1752fd07b4da for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1752fd07b4da
Modified Files:
sql/backends/monet5/Tests/insertonly_persist.SQL.py
sql/backends/monet5/sql.c
sql/scripts/77_storage.sql
Branch: insertonly
Log Message:

Overload insertonly_persist with a call with no args, defaulting to current 
schema.


diffs (129 lines):

diff --git a/sql/backends/monet5/Tests/insertonly_persist.SQL.py 
b/sql/backends/monet5/Tests/insertonly_persist.SQL.py
--- a/sql/backends/monet5/Tests/insertonly_persist.SQL.py
+++ b/sql/backends/monet5/Tests/insertonly_persist.SQL.py
@@ -11,28 +11,25 @@ with tempfile.TemporaryDirectory() as fa
 
 with process.server(mapiport='0', dbname='db1',
 dbfarm=os.path.join(farm_dir, 'db1'),
-args=["--set", "insertonly_nowal=true", "--set", 
"embedded_py=true"],
+args=["--set", "insertonly_nowal=true"],
 stdin=process.PIPE,
 stdout=process.PIPE, stderr=process.PIPE) as s:
-print(os.path.join(farm_dir, 'db1'))
 with SQLTestCase() as tc:
 tc.connect(username="monetdb", password="monetdb", port=s.dbport, 
database='db1')
 tc.execute("CREATE OR REPLACE FUNCTION sleep(msecs int) RETURNS 
INT EXTERNAL NAME alarm.sleep")
 tc.execute("CREATE TABLE foo (x INT)").assertSucceeded()
 tc.execute("ALTER TABLE foo SET INSERT ONLY").assertSucceeded()
-tc.execute("CREATE LOADER up() LANGUAGE PYTHON { _emit.emit({'x': 
list(range(1,101))}) }").assertSucceeded()
-tc.execute("COPY LOADER INTO foo FROM up()").assertSucceeded()
-tc.execute("SELECT count(*) FROM 
foo").assertSucceeded().assertDataResultMatch([(100,)])
-tc.execute("SELECT sleep(5000)")
-tc.execute("SELECT * FROM 
insertonly_persist('sys')").assertSucceeded().assertDataResultMatch([('foo', 
7891, 100)])
+tc.execute("INSERT INTO foo SELECT * FROM generate_series(0,500)")
+tc.execute("SELECT count(*) FROM 
foo").assertSucceeded().assertDataResultMatch([(500,)])
+tc.execute("SELECT sleep(2000)")
+tc.execute("SELECT * FROM 
insertonly_persist('sys')").assertSucceeded().assertDataResultMatch([('foo', 
7891, 500)])
 s.communicate()
 
 with process.server(mapiport='0', dbname='db1',
 dbfarm=os.path.join(farm_dir, 'db1'),
 stdin=process.PIPE,
 stdout=process.PIPE, stderr=process.PIPE) as s:
-print(os.path.join(farm_dir, 'db1'))
 with SQLTestCase() as tc:
 tc.connect(username="monetdb", password="monetdb", port=s.dbport, 
database='db1')
-tc.execute("SELECT COUNT(*) FROM 
foo").assertSucceeded().assertDataResultMatch([(100,)])
+tc.execute("SELECT COUNT(*) FROM 
foo").assertSucceeded().assertDataResultMatch([(500,)])
 s.communicate()
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -4327,14 +4327,13 @@ SQLinsertonly_persist(Client cntxt, MalB
(void)stk;
(void)pci;
 
-   bool schema_wide = pci->argc == 4 ? true : false;
-   assert(pci->argc == 4 || pci->argc == 5);
+   bool schema_wide = pci->argc == 3 || pci->argc == 4 ? true : false;
 
bat *o0 = getArgReference_bat(stk, pci, 0),
*o1 = getArgReference_bat(stk, pci, 1),
*o2 = getArgReference_bat(stk, pci, 2);
 
-   str i1 = *getArgReference_str(stk, pci, 3);
+   str i1 = schema_wide && pci->argc == 4 ? *getArgReference_str(stk, pci, 
3) : NULL;
str i2 = !schema_wide ? *getArgReference_str(stk, pci, 4) : NULL;
 
str msg = MAL_SUCCEED;
@@ -4358,11 +4357,18 @@ SQLinsertonly_persist(Client cntxt, MalB
throw(SQL, "sql.insertonly_persist", "Function cannot be used 
without setting"
  " insertonly_nowal flag at server startup.");
 
-   sql_schema *s = mvc_bind_schema(m, i1);
-   if (!s)
-   throw(SQL, "sql.insertonly_persist", SQLSTATE(3F000) "Schema 
missing %s.", i1);
-
-   if (!mvc_schema_privs(m, s))
+   sql_schema *s = NULL;
+   if (i1) {
+   s = mvc_bind_schema(m, i1);
+   if (s == NULL)
+   throw(SQL, "sql.insertonly_persist", SQLSTATE(3F000) 
"Schema missing %s.", i1);
+   } else {
+   s = m->session->schema;
+   /* throw(SQL, "sql.insertonly_persist", SQLSTATE(3F000) "Schema 
missing %s.", i1); */
+   }
+
+
+   if (pci->argc != 3 && !mvc_schema_privs(m, s))
throw(SQL, "sql.insertonly_persist", SQLSTATE(42000) "Access 
denied for %s to schema '%s'.",
  get_string_global_var(m, "current_user"), 
s->base.name);
 
@@ -4408,9 +4414,6 @@ SQLinsertonly_persist(Client cntxt,

MonetDB: insertonly - Fix ugprade code.

2023-09-29 Thread Lucas Pereira via checkin-list
Changeset: 7befd84ed7d5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7befd84ed7d5
Modified Files:
sql/backends/monet5/sql_upgrades.c
Branch: insertonly
Log Message:

Fix ugprade code.


diffs (33 lines):

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
@@ -6173,16 +6173,22 @@ sql_update_default(Client c, mvc *sql, s
}
 
/* 77_storage.sql */
-   if (!sql_bind_func(sql, s->base.name, "insertonly_persist", &tp, NULL, 
F_UNION, true)) {
+   if (!sql_bind_func(sql, s->base.name, "insertonly_persist", NULL, NULL, 
F_UNION, true)) {
sql->session->status = 0;
sql->errstr[0] = '\0';
const char *query =
-   "create function sys.insertonly_persist()\n"
-   "returns table(\"table\" string, \"table_id\" bigint, 
\"rowcount\" bigint)\n"
-   "external name sql.insertonly_persist;\n"
-   "grant execute on function sys.insertonly_persist() to 
public;\n"
-   "update sys.functions set system = true where system <> 
true and\n"
-   "name = 'insertonly_persist' and schema_id = 2000;\n";
+   "CREATE FUNCTION sys.insertonly_persist()\n"
+   "RETURNS TABLE(\"table\" STRING, \"table_id\" BIGINT, 
\"rowcount\" BIGINT)\n"
+   "EXTERNAL NAME sql.insertonly_persist;\n"
+   "CREATE FUNCTION sys.insertonly_persist(sname STRING)\n"
+   "RETURNS TABLE(\"table\" STRING, \"table_id\" BIGINT, 
\"rowcount\" BIGINT)\n"
+   "EXTERNAL NAME sql.insertonly_persist(string);\n"
+   "CREATE FUNCTION sys.insertonly_persist(sname STRING, 
tname STRING)\n"
+   "RETURNS TABLE(\"table\" STRING, \"table_id\" BIGINT, 
\"rowcount\" BIGINT)\n"
+   "EXTERNAL NAME sql.insertonly_persist(string, 
string);\n"
+   "GRANT EXECUTE ON FUNCTION sys.insertonly_persist() TO 
PUBLIC;\n"
+   "UPDATE sys.functions SET system = true WHERE system <> 
true AND\n"
+   "name = 'insertonly_persist' AND schema_id = 2000;\n";
printf("Running database upgrade commands:\n%s\n", query);
fflush(stdout);
err = SQLstatementIntern(c, query, "update", true, false, NULL);
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - Change JSON path to return scalars when appro...

2023-09-29 Thread Panagiotis Koutsourakis via checkin-list
Changeset: d94504c0eae4 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d94504c0eae4
Modified Files:
monetdb5/modules/atoms/Tests/json01.maltest
monetdb5/modules/atoms/Tests/json05.maltest
monetdb5/modules/atoms/Tests/json08.maltest
monetdb5/modules/atoms/Tests/json09.maltest
monetdb5/modules/atoms/Tests/json12.maltest
monetdb5/modules/atoms/Tests/json13.maltest
monetdb5/modules/atoms/json.c
sql/test/json/Tests/bulkjson.test
sql/test/json/Tests/pathexpr.test
sql/test/json/Tests/pgexample.test
sql/test/json/Tests/shop.test
Branch: default
Log Message:

Change JSON path to return scalars when appropriate

Before these changes the json.filter function would always wrap the
result in square brackets, i.e. it would always return a JSON
array. These changes make it so that when the result is a scalar or
a single JSON object it gets returned on its own.


diffs (truncated from 781 to 300 lines):

diff --git a/monetdb5/modules/atoms/Tests/json01.maltest 
b/monetdb5/modules/atoms/Tests/json01.maltest
--- a/monetdb5/modules/atoms/Tests/json01.maltest
+++ b/monetdb5/modules/atoms/Tests/json01.maltest
@@ -18,7 +18,7 @@ f:= json.filter(b,"f1")
 query T rowsort
 io.print(f)
 
-"[1]"
+"1"
 
 statement ok
 b:= json.new("{\"f1\":1,\"f2\":2}")
@@ -29,7 +29,7 @@ f:= json.filter(b,"f2")
 query T rowsort
 io.print(f)
 
-"[2]"
+"2"
 
 statement ok
 f:= json.filter(b,"f1,f2")
@@ -48,7 +48,7 @@ f:= json.filter(b,"f1[0]")
 query T rowsort
 io.print(f)
 
-"[1]"
+"3"
 
 statement ok
 f:= json.filter(b,"f1[1]")
@@ -56,7 +56,7 @@ f:= json.filter(b,"f1[1]")
 query T rowsort
 io.print(f)
 
-"[3]"
+"3"
 
 statement ok
 f:= json.filter(b,"f1[2]")
@@ -91,7 +91,7 @@ f:= json.filter(b,"f1")
 query T rowsort
 io.print(f)
 
-"[{\"f12\":3}]"
+"{\"f12\":3}"
 
 statement ok
 f:= json.filter(b,"f1.f12")
@@ -99,7 +99,7 @@ f:= json.filter(b,"f1.f12")
 query T rowsort
 io.print(f)
 
-"[3]"
+"3"
 
 statement ok
 f:= json.filter(b,"$.f1.f12")
@@ -107,7 +107,7 @@ f:= json.filter(b,"$.f1.f12")
 query T rowsort
 io.print(f)
 
-"[3]"
+"3"
 
 statement ok
 f:= json.filter(b,"..f12")
@@ -126,7 +126,7 @@ f:= json.filter(b,"[0]")
 query T rowsort
 io.print(f)
 
-"[1]"
+"1"
 
 statement ok
 f:= json.filter(b,"[1]")
@@ -134,7 +134,7 @@ f:= json.filter(b,"[1]")
 query T rowsort
 io.print(f)
 
-"[\"f2\"]"
+"\"f2\""
 
 statement ok
 f:= json.filter(b,"[2]")
@@ -142,7 +142,7 @@ f:= json.filter(b,"[2]")
 query T rowsort
 io.print(f)
 
-"[2]"
+"2"
 
 statement ok
 f:= json.filter(b,"[3]")
@@ -169,7 +169,7 @@ f:= json.filter(b,"[0]")
 query T rowsort
 io.print(f)
 
-"[{\"boter\":1}]"
+"{\"boter\":1}"
 
 statement ok
 f:= json.filter(b,"[0].boter")
@@ -177,7 +177,7 @@ f:= json.filter(b,"[0].boter")
 query T rowsort
 io.print(f)
 
-"[1]"
+"1"
 
 statement ok
 f:= json.filter(b,"[1]")
@@ -185,7 +185,7 @@ f:= json.filter(b,"[1]")
 query T rowsort
 io.print(f)
 
-"[{\"kaas\":2}]"
+"{\"kaas\":2}"
 
 statement ok
 f:= json.filter(b,"[1].kaas")
@@ -193,7 +193,7 @@ f:= json.filter(b,"[1].kaas")
 query T rowsort
 io.print(f)
 
-"[2]"
+"2"
 
 statement ok
 f:= json.filter(b,"[2]")
@@ -201,7 +201,7 @@ f:= json.filter(b,"[2]")
 query T rowsort
 io.print(f)
 
-"[{\"eieren\":3}]"
+"{\"eieren\":3}"
 
 statement ok
 f:= json.filter(b,"[2].eieren")
@@ -209,7 +209,7 @@ f:= json.filter(b,"[2].eieren")
 query T rowsort
 io.print(f)
 
-"[3]"
+"3"
 
 statement ok
 f:= json.filter(b,"[3]")
diff --git a/monetdb5/modules/atoms/Tests/json05.maltest 
b/monetdb5/modules/atoms/Tests/json05.maltest
--- a/monetdb5/modules/atoms/Tests/json05.maltest
+++ b/monetdb5/modules/atoms/Tests/json05.maltest
@@ -12,7 +12,7 @@ p:= json.filter(js,"[0].book")
 query T rowsort
 io.print(p)
 
-"[{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 },{ \"category\": \"fiction\", 
\"author\": \"Evelyn Waugh\", \"title\": \"Sword of Honour\", \"price\": 12.99 
},{ \"category\": \"fiction\", \"author\": \"Herman Melville\", \"title\": 
\"Moby Dick\", \"isbn\": \"0-553-21311-3\", \"price\": 8.99 },{ \"category\": 
\"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": \"The Lord of the 
Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 }]"
+"{ \"category\": \"fiction\", \"author\": \"J. R. R. Tolkien\", \"title\": 
\"The Lord of the Rings\", \"isbn\": \"0-395-19395-8\", \"price\": 22.99 }"
 
 statement ok
 p:= json.filter(js,"[1].pencil")
@@ -20,7 +20,7 @@ p:= json.filter(js,"[1].pencil")
 query T rowsort
 io.print(p)
 
-"[{ \"color\": \"red\", \"price\": 19.95 }]"
+"{ \"color\": \"red\", \"price\": 19.95 }"
 
 statement ok
 p:= json.filter(js,"..author")
@@ -44,7 +44,7 @@ p:= json.filter(js,"[0].book[0]")
 query T rowsort
 io.print(p)
 
-"[{ \"category\": \"reference\", \"author\": \"Nigel Rees\", \"title\": 
\"Sayings of the Century\", \"price\": 8.95 }]"
+"{ \"category\": \"refere

MonetDB: default - correct cardinality for rank functions, solve...

2023-09-29 Thread Niels Nes via checkin-list
Changeset: 43248a76c9b5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/43248a76c9b5
Modified Files:
sql/server/rel_exp.c
sql/server/rel_unnest.c
Branch: default
Log Message:

correct cardinality for rank functions, solves issue # 7403


diffs (24 lines):

diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c
--- a/sql/server/rel_exp.c
+++ b/sql/server/rel_exp.c
@@ -383,7 +383,7 @@ exp_rank_op( sql_allocator *sa, list *l,
sql_exp *e = exp_create(sa, e_func);
if (e == NULL)
return NULL;
-   e->card = exps_card(l);
+   e->card = list_empty(l)?CARD_MULTI:exps_card(l);
e->l = l;
e->r = append(append(sa_list(sa), gbe), obe);
e->f = f;
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
@@ -2236,7 +2236,7 @@ exp_reset_card_and_freevar_set_physical_
switch(e->type) {
case e_aggr:
case e_func: {
-   e->card = exps_card(e->l);
+   e->card = list_empty(e->l)?CARD_MULTI:exps_card(e->l);
} break;
case e_column: {
sql_exp *le = NULL, *re = NULL;
___
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org


MonetDB: default - merged

2023-09-29 Thread Niels Nes via checkin-list
Changeset: 3ca9c804d37a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/3ca9c804d37a
Branch: default
Log Message:

merged


diffs (truncated from 911 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -811,3 +811,4 @@ 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2
 573511e0e7bf2f7ab11f00b45711aab5f1aff6f2 Jun2023_SP1_release
 ce63ebe9a78c52ef0cbe8fd6f2159d2637f0387c Jun2023_7
 1efa83c6409769d13b2ee30e497d5f7ab42fa955 Jun2023_9
+6f88424ebfd9d82c072cf21d89070e04321983da Jun2023_11
diff --git a/ChangeLog-Archive b/ChangeLog-Archive
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -1,6 +1,10 @@
 # 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.
diff --git a/ChangeLog.Jun2023 b/ChangeLog.Jun2023
--- a/ChangeLog.Jun2023
+++ b/ChangeLog.Jun2023
@@ -1,7 +1,3 @@
 # ChangeLog file for devel
 # This file is updated with Maddlog
 
-* Fri Sep 29 2023 Sjoerd Mullender 
-- Fixed an installation issue on Debian and Ubuntu introduced in the
-  last build.
-
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -860,6 +860,13 @@ fi
 %endif
 
 %changelog
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- Rebuilt.
+
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
 * Wed Sep 27 2023 Sjoerd Mullender  - 11.47.9-20230927
 - Rebuilt.
 - GH#7402: Privileges on merge table not propagated to partition tables
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -42,7 +42,7 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M
 # common/options and common/utils)
 set(GDK_VERSION_MAJOR "27")
 set(GDK_VERSION_MINOR "0")
-set(GDK_VERSION_PATCH "3")
+set(GDK_VERSION_PATCH "4")
 set(GDK_VERSION 
"${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}")
 
 # version of the MAPI library (subdirectory clients/mapilib)
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+monetdb (11.47.11) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
+monetdb (11.47.11) unstable; urgency=low
+
+  * MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+last build.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
 monetdb (11.47.9) unstable; urgency=low
 
   * Rebuilt.
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2529,9 +2529,9 @@ log_flush(logger *lg, ulng ts)
log_unlock(lg);
return GDK_FAIL;
}
+   updated = p;
memset(updated + allocated / 4, 0, a - 
allocated);
allocated = a;
-   updated = p;
}
nupdated = n;
}
diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog
--- a/misc/packages/deb/changelog
+++ b/misc/packages/deb/changelog
@@ -1,3 +1,16 @@
+monetdb (11.47.11) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
+monetdb (11.47.11) unstable; urgency=low
+
+  * MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+last build.
+
+ -- Sjoerd Mullender   Fri, 29 Sep 2023 12:00:43 +0200
+
 monetdb (11.47.9) unstable; urgency=low
 
   * Rebuilt.
diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog
--- a/misc/packages/rpm/changelog
+++ b/misc/packages/rpm/changelog
@@ -1,3 +1,10 @@
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- Rebuilt.
+
+* Fri Sep 29 2023 Sjoerd Mullender  - 11.47.11-20230929
+- MonetDB: Fixed an installation issue on Debian and Ubuntu introduced in the
+  last build.
+
 * Wed Sep 27 2023 Sjoerd Mullender  - 11.47.9-20230927
 - Rebuilt.
 - GH#7402: Privileges on merge table not propagated to partition tables
diff --git a/monetdb5/modules/atoms/Tests/json01.maltest 
b/monetdb5/modules/atoms/Tests/json01.maltest
--- a/monetdb5/modules/atoms/Tests/json01.maltest
+++ b/monetdb5/modules/atoms/Tests/json01.maltest
@@ -18,7 +18,7 @@ f:= json.filter(b,"f1")
 query T rowsort
 io.print(f)
 
-"[1]"
+"1"
 
 statement ok
 b:= json.new("{\"f1\":1,\"f2\":2}")
@@ -29,7 +29,7 @@ f:= json.filter(b,"f2")
 query T rowsort
 io