Changeset: 7496a03e60d1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/7496a03e60d1
Modified Files:
gdk/gdk.h
gdk/gdk_batop.c
monetdb5/mal/mal_function.c
monetdb5/mal/mal_profiler.c
monetdb5/modules/mal/mal_mapi.c
sql/backends/monet5/rel_bin.c
sql/backends/monet5/sql.c
sql/backends/monet5/sql_statement.c
sql/server/rel_optimizer.c
sql/server/sql_parser.y
sql/storage/store.c
Branch: resource_management
Log Message:
merge with default
diffs (truncated from 3864 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
@@ -48,12 +48,7 @@ jobs:
ref: ${{ github.ref }}
- name: 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: |
diff --git a/ChangeLog.Aug2024 b/ChangeLog.Aug2024
--- a/ChangeLog.Aug2024
+++ b/ChangeLog.Aug2024
@@ -1,3 +1,10 @@
# ChangeLog file for devel
# This file is updated with Maddlog
+* Thu Oct 17 2024 Niels Nes <[email protected]>
+- Changed generic Decimal handling (ie without digits/scale), old cased
+ mapped always into dec(18,3) now this is only done in case of create of
+ a column. In other cases the coercion to the correct decimal type is
+ based on the input data type. For *api (LANG*PY/C(pp)/R) we no longer
+ allow generic decimal type in the function definitions.
+
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
@@ -49539,6 +49539,11 @@ pattern sql.rank(X_0:any_1, X_1:bit, X_2
SQLrank;
return the ranked groups
sql
+read_dump_rel
+pattern sql.read_dump_rel(X_0:str):str
+SQLread_dump_rel;
+Reads sql_rel string into sql_rel object and then writes it to the return value
+sql
register
unsafe pattern sql.register(X_0:str, X_1:str, X_2:str, X_3:str):int
RAstatement2;
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
@@ -37969,6 +37969,11 @@ pattern sql.rank(X_0:any_1, X_1:bit, X_2
SQLrank;
return the ranked groups
sql
+read_dump_rel
+pattern sql.read_dump_rel(X_0:str):str
+SQLread_dump_rel;
+Reads sql_rel string into sql_rel object and then writes it to the return value
+sql
register
unsafe pattern sql.register(X_0:str, X_1:str, X_2:str, X_3:str):int
RAstatement2;
diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -519,7 +519,7 @@
* zero is returned upon encountering an error or when the database value
* is NULL; this can be analyzed in using @code{mapi\_error()}.
*
- * @item size_t mapi_fetch_fiels_len(MapiHdl hdl, int fnr)
+ * @item size_t mapi_fetch_field_len(MapiHdl hdl, int fnr)
*
* Return the length of the C-string representation excluding trailing NULL
* byte of the value. Zero is returned upon encountering an error, when the
diff --git a/documentation/source/manual_pages/monetdbd.rst.in
b/documentation/source/manual_pages/monetdbd.rst.in
--- a/documentation/source/manual_pages/monetdbd.rst.in
+++ b/documentation/source/manual_pages/monetdbd.rst.in
@@ -251,6 +251,17 @@ using the **set** command. The following
use redirects instead of proxies. Changing this property takes effect
immediately at runtime.
+**keepalive**
+ Specifies the keepalive interval for incoming connections. If this is
+ set to a positive number, *monetdbd* configures the system to send
+ automatic periodic keepalive probes on all client connections. This
+ can help keep firewalls from killing connections that seem idle but
+ are in fact waiting for a long running query to finish. The default
+ is 60 seconds. When 127 consecutive probes have failed, the
+ connection is closed. With the default setting of 60 seconds this
+ means the connection is closed when the client has been unreachable
+ for more than two hours.
+
REMOTE DATABASES
================
diff --git a/documentation/source/manual_pages/mserver5.rst.in
b/documentation/source/manual_pages/mserver5.rst.in
--- a/documentation/source/manual_pages/mserver5.rst.in
+++ b/documentation/source/manual_pages/mserver5.rst.in
@@ -167,13 +167,16 @@ MSERVER5 OPTIONS
**268435456**
(HEAPMASK) trace/debug HEAPextend; used only for development &
- debugging **536870912** (FORCEMITOMASK) forcefully activate
- mitosis even on small tables, i.e., split small tables in as many
- (tiny) pieces as there are cores (threads) available; this allows
- us to test mitosis functionality without requiring large data sets
- (— at the expense of a potentially significant interpretation
- overhead for unnecessarily large plans); used only for development
- & testing; set automatically by Mtest.py
+ debugging
+
+ **536870912**
+ (FORCEMITOMASK) forcefully activate mitosis even on small tables,
+ i.e., split small tables in as many (tiny) pieces as there are
+ cores (threads) available; this allows us to test mitosis
+ functionality without requiring large data sets (— at the expense
+ of a potentially significant interpretation overhead for
+ unnecessarily large plans); used only for development & testing;
+ set automatically by Mtest.py
**--algorithms**
Equivalent to **--debug=**\ *(ALGOMASK)*.
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -390,6 +390,7 @@ gdk_export _Noreturn void GDKfatal(_In_z
#define IOMASK (1U<<4)
#define BATMASK (1U<<5)
#define PARMASK (1U<<7)
+#define TESTINGMASK (1U<<8)
#define TMMASK (1U<<9)
#define TEMMASK (1U<<10)
#define PERFMASK (1U<<12)
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -2443,7 +2443,7 @@ BATsort(BAT **sorted, BAT **order, BAT *
if (groups) {
if (BATtkey(b)) {
/* singleton groups */
- gn = BATdense(0, 0, BATcount(b));
+ gn = BATdense(b->hseqbase, 0, BATcount(b));
if (gn == NULL)
goto error;
} else {
@@ -2451,7 +2451,7 @@ BATsort(BAT **sorted, BAT **order, BAT *
const oid *o = 0;
assert(BATcount(b) == 1 ||
(b->tsorted && b->trevsorted));
- gn = BATconstant(0, TYPE_oid, &o, BATcount(b),
TRANSIENT);
+ gn = BATconstant(b->hseqbase, TYPE_oid, &o,
BATcount(b), TRANSIENT);
if (gn == NULL)
goto error;
}
diff --git a/gdk/gdk_logger.c b/gdk/gdk_logger.c
--- a/gdk/gdk_logger.c
+++ b/gdk/gdk_logger.c
@@ -2350,7 +2350,7 @@ log_new(int debug, const char *fn, const
lng max_file_age = GDKgetenv_int("wal_max_file_age", 600);
lng max_file_size = 0;
- if (GDKdebug & FORCEMITOMASK) {
+ if (GDKdebug & TESTINGMASK) {
max_file_size = 2048; /* 2 KiB */
} else {
const char *max_file_size_str = GDKgetenv("wal_max_file_size");
@@ -2548,7 +2548,7 @@ log_create(int debug, const char *fn, co
static logged_range *
log_next_logfile(logger *lg, ulng ts)
{
- int m = (ATOMIC_GET(&GDKdebug) & FORCEMITOMASK) ? 1000 : 100;
+ int m = (ATOMIC_GET(&GDKdebug) & TESTINGMASK) ? 1000 : 100;
if (!lg->pending || !lg->pending->next)
return NULL;
rotation_lock(lg);
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -164,9 +164,6 @@ gdk_return GDKtracer_init(const char *db
__attribute__((__visibility__("hidden")));
gdk_return GDKunlink(int farmid, const char *dir, const char *nme, const char
*extension)
__attribute__((__visibility__("hidden")));
-#define GDKwarning(...) \
- GDKtracer_log(__FILE__, __func__, __LINE__, M_WARNING, \
- GDK, NULL, __VA_ARGS__)
lng getBBPlogno(void)
__attribute__((__visibility__("hidden")));
BUN HASHappend(BAT *b, BUN i, const void *v)
diff --git a/gdk/gdk_strimps.c b/gdk/gdk_strimps.c
--- a/gdk/gdk_strimps.c
+++ b/gdk/gdk_strimps.c
@@ -94,7 +94,7 @@
#define STRIMP_HEADER_SIZE 64
#define STRIMP_PAIRS (STRIMP_HEADER_SIZE - 1)
#define STRIMP_CREATION_THRESHOLD \
- ((BUN) ((ATOMIC_GET(&GDKdebug) & FORCEMITOMASK)? 100 : 5000))
+ ((BUN) ((ATOMIC_GET(&GDKdebug) & TESTINGMASK)? 100 : 5000))
typedef struct {
#ifdef UTF8STRIMPS
diff --git a/gdk/gdk_system.c b/gdk/gdk_system.c
--- a/gdk/gdk_system.c
+++ b/gdk/gdk_system.c
@@ -1115,7 +1115,7 @@ MT_kill_threads(void)
for (struct mtthread *t = mtthreads; t; t = t->next) {
if (t == self)
continue;
- TRC_INFO(GDK, "Killing thread %s\n", t->threadname);
+ GDKwarning("Killing thread %s\n", t->threadname);
killed |= MT_kill_thread(t);
}
thread_unlock();
diff --git a/gdk/gdk_system_private.h b/gdk/gdk_system_private.h
--- a/gdk/gdk_system_private.h
+++ b/gdk/gdk_system_private.h
@@ -38,6 +38,9 @@ bool MT_thread_override_limits(void)
SetLastError(0); \
} while (0)
#endif
+#define GDKwarning(...) \
+ GDKtracer_log(__FILE__, __func__, __LINE__, M_WARNING, \
+ GDK, NULL, __VA_ARGS__)
struct freebats {
bat freebats;
diff --git a/gdk/gdk_tracer.c b/gdk/gdk_tracer.c
--- a/gdk/gdk_tracer.c
+++ b/gdk/gdk_tracer.c
@@ -605,7 +605,7 @@ GDKtracer_log(const char *file, const ch
if (interrupted)
reinit();
- if (level <= M_WARNING || (ATOMIC_GET(&GDKdebug) & FORCEMITOMASK)) {
+ if (level <= M_WARNING || (ATOMIC_GET(&GDKdebug) & TESTINGMASK)) {
fprintf(level <= M_ERROR && !isexit ? stderr : stdout,
"#%s%s%s: %s: %s: %s%s%s\n",
add_ts ? ts : "",
diff --git a/monetdb5/ChangeLog.Aug2024 b/monetdb5/ChangeLog.Aug2024
--- a/monetdb5/ChangeLog.Aug2024
+++ b/monetdb5/ChangeLog.Aug2024
@@ -1,3 +1,7 @@
# ChangeLog file for MonetDB5
# This file is updated with Maddlog
+* Mon Oct 14 2024 stefanos mavros <[email protected]>
+- The server prints out an informative message for the case of a graceful
+ termination.
+
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -165,5 +165,6 @@ void
mal_exit(int status)
{
mal_reset();
+ printf("# mserver5 exiting\n");
exit(status); /* properly end GDK */
}
diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c
--- a/monetdb5/mal/mal_function.c
+++ b/monetdb5/mal/mal_function.c
@@ -790,7 +790,7 @@ chkDeclarations(MalBlkPtr mb)
blks[++top] = blkId;
}
if (blockExit(p) && top > 0) {
- if (dflow == blkId) {
+ if (dflow == blks[top]) {
dflow = -1;
} else
/*
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -1081,7 +1081,7 @@ static void
profilerHeartbeat(void *dummy)
{
int t;
- const int timeout = ATOMIC_GET(&GDKdebug) & FORCEMITOMASK ? 10 : 25;
+ const int timeout = ATOMIC_GET(&GDKdebug) & TESTINGMASK ? 10 : 25;
(void) dummy;
for (;;) {
diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -475,8 +475,8 @@ CLTqueryTimeout(Client cntxt, MalBlkPtr
msg = createException(MAL, "clients.setquerytimeout",
"Session not active
anymore");
else {
- /* when testing (FORCEMITOMASK), reduce timeout of 1 sec to 1
msec */
- lng timeout_micro = ATOMIC_GET(&GDKdebug) & FORCEMITOMASK
+ /* when testing (TESTINGMASK), reduce timeout of 1 sec to 1
msec */
+ lng timeout_micro = ATOMIC_GET(&GDKdebug) & TESTINGMASK
&& qto == 1 ? 1000 : (lng) qto * 1000000;
mal_clients[idx].querytimeout = timeout_micro;
}
diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c
--- a/monetdb5/modules/mal/mal_mapi.c
+++ b/monetdb5/modules/mal/mal_mapi.c
@@ -292,7 +292,7 @@ SERVERlistenThread(SOCKET *Sock)
}
/* Wait up to 0.1 seconds (0.01 if testing) */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]