Changeset: 6f839fbeb93c for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6f839fbeb93c Modified Files: gdk/gdk_bat.c monetdb5/mal/mal_listing.c monetdb5/mal/mal_private.h monetdb5/modules/kernel/algebra.c monetdb5/modules/mal/mal_mapi.c Branch: no_type_bat Log Message:
merged with default diffs (truncated from 2582 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -816,3 +816,4 @@ 6f88424ebfd9d82c072cf21d89070e04321983da e6eb06773c17035954ac5d001cfe1f09ff3425cc Jun2023_13 5683fd900f28d65ad7c98d1ed1efd992023a7fa4 Jun2023_15 c5b17681b55e6ca155db28be59913699e561502a Dec2023_root +c9e6096e7519636a4e840c7a0c2e27cccb7dc0fe Jun2023_17 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -867,6 +867,14 @@ fi %endif %changelog +* Thu Nov 16 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.17-20231116 +- Rebuilt. + +* Thu Nov 16 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.17-20231116 +- gdk: Fixed a regression where after a while the write-ahead log files + weren't being rotated, meaning from some point onwards, the newest + file just kept on growing. + * Thu Nov 09 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.15-20231109 - Rebuilt. - GH#7410: SIGSEGV cause database corruption diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c --- a/clients/mapilib/connect.c +++ b/clients/mapilib/connect.c @@ -111,7 +111,9 @@ scan_sockets(Mapi mid) errmsg = allocated_errmsg; } if (errmsg) { - return mapi_setError(mid, errmsg, __func__, MERROR); + MapiMsg err = mapi_setError(mid, errmsg, __func__, MERROR); + free(allocated_errmsg); + return err; } return establish_connection(mid); } @@ -697,11 +699,13 @@ mapi_handshake(Mapi mid) ) { mapi_close_handle(hdl); close_connection(mid); - return mapi_printError( + MapiMsg err = mapi_printError( mid, __func__, MERROR, "%s: %s", error_message ? error_message : "invalid redirect", red); + free(error_message); + return err; } if (strncmp("mapi:merovingian", red, 16) == 0) { diff --git a/clients/mapilib/connect_openssl.c b/clients/mapilib/connect_openssl.c --- a/clients/mapilib/connect_openssl.c +++ b/clients/mapilib/connect_openssl.c @@ -342,21 +342,25 @@ wrap_tls(Mapi mid, SOCKET sock) BIO_free_all(bio); // drops first ref BIO_free_all(bio); // drops second ref free(hostcolonport); - return croak_openssl(mid, __func__, "openssl_rstream: %s", mnstr_peek_error(rstream)); + msg = croak_openssl(mid, __func__, "openssl_rstream: %s", mnstr_peek_error(rstream)); + close_stream(rstream); + return msg; } // On error: free 'bio' and close 'rstream'. stream *wstream = openssl_wstream(hostcolonport ? hostcolonport : "ssl wstream", bio); free(hostcolonport); if (wstream == NULL || mnstr_errnr(wstream) != MNSTR_NO__ERROR) { BIO_free_all(bio); - mnstr_close(rstream); - return croak_openssl(mid, __func__, "openssl_wstream: %s", mnstr_peek_error(wstream)); + close_stream(rstream); + msg = croak_openssl(mid, __func__, "openssl_wstream: %s", mnstr_peek_error(wstream)); + close_stream(wstream); + return msg; } // On error: free 'rstream' and 'wstream'. msg = mapi_wrap_streams(mid, rstream, wstream); if (msg != MOK) { - mnstr_close(rstream); - mnstr_close(wstream); + close_stream(rstream); + close_stream(wstream); return msg; } // 'rstream' and 'wstream' are part of 'mid' now. diff --git a/clients/mapilib/connect_unix.c b/clients/mapilib/connect_unix.c --- a/clients/mapilib/connect_unix.c +++ b/clients/mapilib/connect_unix.c @@ -70,6 +70,7 @@ scan_unix_sockets(Mapi mid) candidates[ncandidates].port = port; candidates[ncandidates++].priority = st.st_uid == me ? 0 : 1; } + closedir(dir); } mapi_log_record(mid, "CONN", "Found %d Unix domain sockets", ncandidates); @@ -180,5 +181,3 @@ connect_socket_unix(Mapi mid) return wrap_socket(mid, s); } - - diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -1847,7 +1847,7 @@ set_uri(Mapi mid) const char *host = msetting_string(mid->settings, MP_HOST); const char *database = msetting_string(mid->settings, MP_DATABASE); int port = msetting_long(mid->settings, MP_PORT); - size_t urilen = strlen(host) + strlen(database) + 32; + size_t urilen = strlen(host) + (database ? strlen(database) : 0) + 32; char *uri = malloc(urilen); /* uri looks as follows: diff --git a/clients/mapilib/msettings.c b/clients/mapilib/msettings.c --- a/clients/mapilib/msettings.c +++ b/clients/mapilib/msettings.c @@ -572,7 +572,7 @@ validate_certhash(msettings *mp) if (i < sizeof(mp->certhash_digits_buffer) - 1) mp->certhash_digits_buffer[i++] = tolower(*r); } - mp->certhash_digits_buffer[i++] = '\0'; + mp->certhash_digits_buffer[i] = '\0'; if (i == 0) return "certhash: need at least one digit"; @@ -844,4 +844,3 @@ msettings_lang_is_sql(const msettings *m { return mp->lang_is_sql; } - 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 "6") +set(GDK_VERSION_PATCH "7") 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,17 @@ +monetdb (11.47.17) unstable; urgency=low + + * Rebuilt. + + -- Sjoerd Mullender <sjo...@acm.org> Thu, 16 Nov 2023 10:48:27 +0100 + +monetdb (11.47.17) unstable; urgency=low + + * gdk: Fixed a regression where after a while the write-ahead log files + weren't being rotated, meaning from some point onwards, the newest + file just kept on growing. + + -- Sjoerd Mullender <sjo...@acm.org> Thu, 16 Nov 2023 10:48:27 +0100 + monetdb (11.47.15) unstable; urgency=low * Rebuilt. diff --git a/debian/control b/debian/control --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 12), cmake libxml2-dev, pkg-config, python3, python3-dev, python3-numpy, unixodbc-dev, zlib1g-dev, r-base-dev, - libcfitsio-dev, openssl-dev (>= 1.1.1) + libcfitsio-dev, libssl-dev (>= 1.1.1) Standards-Version: 3.8.0 X-Python-Version: >= 2.6 diff --git a/documentation/source/manual_pages/monetdb.rst b/documentation/source/manual_pages/monetdb.rst --- a/documentation/source/manual_pages/monetdb.rst +++ b/documentation/source/manual_pages/monetdb.rst @@ -71,7 +71,7 @@ allows to do wildcard matches. For detai maintenance mode. This allows the database administrator to perform initialization steps before releasing it to users, unless the **-p** argument is supplied. See also **monetdb lock**. The name of the - database must match the expression [A-Za-z0-9_-]+. + database must match the expression [A-Za-z0-9\_-]+. **-m**\ *pattern* With the **-m** flag, instead of creating a database, a diff --git a/gdk/ChangeLog-Archive b/gdk/ChangeLog-Archive --- a/gdk/ChangeLog-Archive +++ b/gdk/ChangeLog-Archive @@ -1,6 +1,11 @@ # DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY # This file contains past ChangeLog entries +* Thu Nov 16 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.17-20231116 +- Fixed a regression where after a while the write-ahead log files + weren't being rotated, meaning from some point onwards, the newest + file just kept on growing. + * Tue Nov 7 2023 Sjoerd Mullender <sjo...@acm.org> - 11.47.15-20231109 - When saving the SQL catalog during a low-level commit, we should only save the part of the catalog that corresponds to the part of the diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -1286,12 +1286,12 @@ BUNappendmulti(BAT *b, const void *value (count > 1 || b->tseqbase + b->batCount != ((oid *) values)[0])) b->tseqbase = oid_nil; - if (b->tsorted && ((oid *) b->theap->base)[b->batCount - 1] > ((oid *) values)[0]) { + if (b->tsorted && !is_oid_nil(((oid *) b->theap->base)[b->batCount - 1]) && ((oid *) b->theap->base)[b->batCount - 1] > ((oid *) values)[0]) { b->tsorted = false; if (b->tnosorted == 0) b->tnosorted = b->batCount; } - if (b->trevsorted && ((oid *) b->theap->base)[b->batCount - 1] < ((oid *) values)[0]) { + if (b->trevsorted && !is_oid_nil(((oid *) values)[0]) && ((oid *) b->theap->base)[b->batCount - 1] < ((oid *) values)[0]) { b->trevsorted = false; if (b->tnorevsorted == 0) b->tnorevsorted = b->batCount; diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -4028,6 +4028,13 @@ bailout: return NULL; } +#define HANDLE_TIMEOUT \ + do { \ + GDKerror("%s\n", GDKexiting() ? EXITING_MSG : TIMEOUT_MSG); \ + BBPreclaim(bn); \ + bn = NULL; \ + } while (0) + BAT * BATcalcbetween(BAT *b, BAT *lo, BAT *hi, BAT *s, BAT *slo, BAT *shi, bool symmetric, bool linc, bool hinc, bool nils_false, bool anti) @@ -4064,20 +4071,50 @@ BATcalcbetween(BAT *b, BAT *lo, BAT *hi, BATiter bi = bat_iterator(b); BATiter loi = bat_iterator(lo); BATiter hii = bat_iterator(hi); - bn = BATcalcbetween_intern(bi.base, 1, - bi.vh ? bi.vh->base : NULL, - bi.width, - loi.base, 1, - loi.vh ? loi.vh->base : NULL, - loi.width, - hii.base, 1, - hii.vh ? hii.vh->base : NULL, - hii.width, - bi.type, - &ci, &cilo, &cihi, - b->hseqbase, lo->hseqbase, hi->hseqbase, - symmetric, anti, linc, hinc, - nils_false, __func__); + if (b->ttype == TYPE_void || lo->ttype == TYPE_void || hi->ttype == TYPE_void) { + lng timeoffset = 0; + QryCtx *qry_ctx = MT_thread_get_qry_ctx(); + if (qry_ctx != NULL) { + timeoffset = (qry_ctx->starttime && qry_ctx->querytimeout) ? (qry_ctx->starttime + qry_ctx->querytimeout) : 0; + } + bn = COLnew(ci.seq, TYPE_bit, ci.ncand, TRANSIENT); + if (bn) { + bit *restrict dst = (bit *) Tloc(bn, 0); + BUN i, j, k, l; + BUN nils = 0; + TIMEOUT_LOOP_IDX(l, ci.ncand, timeoffset) { + i = canditer_next(&ci) - b->hseqbase; + j = canditer_next(&cilo) - lo->hseqbase; + k = canditer_next(&cihi) - hi->hseqbase; + dst[l] = BETWEEN(BUNtoid(b, i), + BUNtoid(lo, j), + BUNtoid(hi, k), oid); + nils += is_bit_nil(dst[l]); + } + BATsetcount(bn, ci.ncand); + bn->tsorted = ci.ncand <= 1 || nils == ci.ncand; + bn->trevsorted = ci.ncand <= 1 || nils == ci.ncand; + bn->tkey = ci.ncand <= 1; + bn->tnil = nils != 0; + bn->tnonil = nils == 0; + TIMEOUT_CHECK(timeoffset, HANDLE_TIMEOUT); + } + } else { + bn = BATcalcbetween_intern(bi.base, 1, + bi.vh ? bi.vh->base : NULL, + bi.width, + loi.base, 1, + loi.vh ? loi.vh->base : NULL, + loi.width, + hii.base, 1, + hii.vh ? hii.vh->base : NULL, + hii.width, + bi.type, + &ci, &cilo, &cihi, _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org