Changeset: 5753e9eb856b for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/5753e9eb856b Branch: const_aggr_elim Log Message:
merges with default diffs (truncated from 3965 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -835,3 +835,4 @@ dce400b68239412b1835fb28bd183bf50f5e8692 dce400b68239412b1835fb28bd183bf50f5e8692 Aug2024_release ab5d60be21cd1c65e9de476d71a86c2995f70785 Aug2024_5 ab5d60be21cd1c65e9de476d71a86c2995f70785 Aug2024_SP1_release +30e6380820842b9e0325536eb22d7cb3843ab095 Aug2024_7 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -95,7 +95,7 @@ Group: Applications/Databases License: MPL-2.0 URL: https://www.monetdb.org/ BugURL: https://github.com/MonetDB/MonetDB/issues -Source: https://www.monetdb.org/downloads/sources/Aug2024-SP1/MonetDB-%{version}.tar.bz2 +Source: https://www.monetdb.org/downloads/sources/Aug2024-SP2/MonetDB-%{version}.tar.bz2 # The Fedora packaging document says we need systemd-rpm-macros for # the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7 @@ -989,6 +989,26 @@ rm "${RPM_BUILD_ROOT}"%{_unitdir}/monetd %endif %changelog +* Mon Dec 16 2024 Sjoerd Mullender <sjo...@acm.org> - 11.51.7-20241216 +- Rebuilt. +- GH#7112: Need keyboard shortcut to interrupt query execution rather than + session +- GH#7205: Unpredictable performance when performing joins over nested + queries +- GH#7574: Assertion failure at `rel2bin_select` when using `STARTSWITH` +- GH#7588: incorrect output with single row inputs for var_samp(c) over() +- GH#7589: "SELECT * FROM sessions" crashes monetdb/e +- GH#7593: A value is being returned with unnecessary scientific notation +- GH#7595: SQLTestCase leaks pymonetdb connections +- GH#7597: Upgrade + quick restart causes database inconsistency +- GH#7599: str_to_date fails when combined with SQL CASE clause +- GH#7602: COPY INTO from multiple files causes an assertion error. +- GH#7603: COPY INTO from three or more files crashes the server. +- GH#7604: file_loader() causes server crash when csv file contains too + few field separators or contains empty lines +- GH#7607: Adding a column of serial type fails with "Access denied for + <user> to schema 'sys'" + * Thu Oct 24 2024 Sjoerd Mullender <sjo...@acm.org> - 11.51.5-20241024 - Rebuilt. - GH#7281: UDFs defined at compile time in a user schema should not become 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 @@ -282,7 +282,7 @@ bool GDKexiting(void); jmp_buf GDKfataljump; bit GDKfataljumpenable; str GDKfatalmsg; -char *GDKfilepath(int farmid, const char *dir, const char *nme, const char *ext); +gdk_return GDKfilepath(char *buf, size_t bufsize, int farmid, const char *dir, const char *nme, const char *ext) __attribute__((__access__(write_only, 1, 2))); void GDKfree(void *blk); char *GDKgetbuf(void); unsigned GDKgetdebug(void); @@ -301,7 +301,7 @@ MT_Lock *volatile GDKlocklist; ATOMIC_FLAG GDKlocklistlock; ATOMIC_TYPE GDKlocksleepcnt; void GDKlockstatistics(int); -void *GDKmalloc(size_t size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))) __attribute__((__warn_unused_result__)); +void *GDKmalloc(size_t size) __attribute__((__malloc__)) __attribute__((__malloc__(GDKfree, 1))) __attribute__((__alloc_size__(1))) __attribute__((__warn_unused_result__)); size_t GDKmallocated(const void *s); size_t GDKmem_cursize(void); gdk_return GDKmergeidx(BAT *b, BAT **a, int n_ar); @@ -324,9 +324,9 @@ stream *GDKstdout; ssize_t GDKstrFromStr(unsigned char *restrict dst, const unsigned char *restrict src, ssize_t len, char quote); int GDKstrcasecmp(const char *s1, const char *s2); char *GDKstrcasestr(const char *haystack, const char *needle); -str GDKstrdup(const char *s) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); +str GDKstrdup(const char *s) __attribute__((__malloc__)) __attribute__((__malloc__(GDKfree, 1))) __attribute__((__warn_unused_result__)); int GDKstrncasecmp(const char *str1, const char *str2, size_t l1, size_t l2); -str GDKstrndup(const char *s, size_t n) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)); +str GDKstrndup(const char *s, size_t n) __attribute__((__malloc__)) __attribute__((__malloc__(GDKfree, 1))) __attribute__((__warn_unused_result__)); gdk_return GDKtolower(char **restrict buf, size_t *restrict buflen, const char *restrict s) __attribute__((__access__(read_write, 1))) __attribute__((__access__(read_write, 2))); gdk_return GDKtoupper(char **restrict buf, size_t *restrict buflen, const char *restrict s) __attribute__((__access__(read_write, 1))) __attribute__((__access__(read_write, 2))); gdk_return GDKtracer_fill_comp_info(BAT *id, BAT *component, BAT *log_level); @@ -348,7 +348,7 @@ gdk_return GDKupgradevarheap(BAT *b, var lng GDKusec(void); const char *GDKversion(void) __attribute__((__const__)); size_t GDKvm_cursize(void); -void *GDKzalloc(size_t size) __attribute__((__malloc__)) __attribute__((__alloc_size__(1))) __attribute__((__warn_unused_result__)); +void *GDKzalloc(size_t size) __attribute__((__malloc__)) __attribute__((__malloc__(GDKfree, 1))) __attribute__((__alloc_size__(1))) __attribute__((__warn_unused_result__)); void HASHdestroy(BAT *b); BUN HASHlist(Hash *h, BUN i); BUN HASHprobe(const Hash *h, const void *v); @@ -527,15 +527,15 @@ int dlclose(void *handle); char *dlerror(void); void *dlopen(const char *file, int mode); void *dlsym(void *handle, const char *name); -_Noreturn void eb_error(exception_buffer *eb, char *msg, int val); +_Noreturn void eb_error(exception_buffer *eb, const char *msg, int val); exception_buffer *eb_init(exception_buffer *eb) __attribute__((__access__(write_only, 1))); size_t escapedStr(char *restrict dst, const char *restrict src, size_t dstlen, const char *sep1, const char *sep2, int quote); size_t escapedStrlen(const char *restrict src, const char *sep1, const char *sep2, int quote); ssize_t fltFromStr(const char *src, size_t *len, flt **dst, bool external); ssize_t fltToStr(str *dst, size_t *len, const flt *src, bool external); const flt flt_nil; -gdk_return gdk_add_callback(char *name, gdk_callback_func *f, int argc, void *argv[], int interval); -gdk_return gdk_remove_callback(char *, gdk_callback_func *f); +gdk_return gdk_add_callback(const char *name, gdk_callback_func *f, int argc, void *argv[], int interval); +gdk_return gdk_remove_callback(const char *, gdk_callback_func *f); bat getBBPsize(void); char *get_bin_path(void); int gettimeofday(struct timeval *tv, int *ignore_zone); @@ -912,8 +912,8 @@ const char corrRef[]; const char countRef[]; const char count_no_nilRef[]; int cpyConstant(MalBlkPtr mb, VarPtr vr); -str createException(enum malexception, const char *, _In_z_ _Printf_format_string_ const char *, ...) __attribute__((__format__(__printf__, 3, 4))) __attribute__((__returns_nonnull__)); -str createMalException(MalBlkPtr, int, enum malexception, _In_z_ _Printf_format_string_ const char *, ...) __attribute__((__format__(__printf__, 4, 5))) __attribute__((__returns_nonnull__)); +str createException(enum malexception, const char *, _In_z_ _Printf_format_string_ const char *, ...) __attribute__((__malloc__)) __attribute__((__malloc__(freeException, 1))) __attribute__((__format__(__printf__, 3, 4))) __attribute__((__returns_nonnull__)); +str createMalException(MalBlkPtr, int, enum malexception, _In_z_ _Printf_format_string_ const char *, ...) __attribute__((__malloc__)) __attribute__((__malloc__(freeException, 1))) __attribute__((__format__(__printf__, 4, 5))) __attribute__((__returns_nonnull__)); const char create_functionRef[]; const char create_roleRef[]; const char create_schemaRef[]; @@ -1026,7 +1026,7 @@ int getStrConstant(MalBlkPtr mb, str val const char getTraceRef[]; str getTypeIdentifier(malType tpe); str getTypeName(malType tpe); -char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, char *buf); +char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, char *buf) __attribute__((__access__(write_only, 3))); const char getVariableRef[]; Module globalModule(const char *nme); const char grantRef[]; @@ -1069,6 +1069,7 @@ str loadLibrary(const char *modulename, char *locate_file(const char *basename, const char *ext, bit recurse); const char lockRef[]; const char lookupRef[]; +const char mainRef[]; str mal2str(MalBlkPtr mb, int first, int last); int malAtomSize(int size, const char *name); str malBootstrap(char *modules[], bool embedded, const char *initpasswd); diff --git a/clients/examples/C/streamcat.c b/clients/examples/C/streamcat.c --- a/clients/examples/C/streamcat.c +++ b/clients/examples/C/streamcat.c @@ -624,11 +624,10 @@ int cmd_bstream(char *argv[]) } } - mnstr_destroy(bs); if (additional) { mnstr_printf(s, "%s", additional); } - mnstr_close(s); + close_stream(bs); /* this also closes and destroys s */ return 0; } diff --git a/clients/examples/C/testcondvar.c b/clients/examples/C/testcondvar.c --- a/clients/examples/C/testcondvar.c +++ b/clients/examples/C/testcondvar.c @@ -12,7 +12,6 @@ #include "monetdb_config.h" #include "gdk.h" -#include "gdk_system.h" #define NN (3) diff --git a/clients/mapilib/connect.c b/clients/mapilib/connect.c --- a/clients/mapilib/connect.c +++ b/clients/mapilib/connect.c @@ -797,10 +797,11 @@ mapi_handshake(Mapi mid) if (motdlen > 0) { mid->motd = malloc(motdlen + 1); *mid->motd = 0; + char *p = mid->motd; for (i = 0; i < result->cache.writer; i++) if (result->cache.line[i].rows && result->cache.line[i].rows[0] == '#') { - strcat(mid->motd, result->cache.line[i].rows); - strcat(mid->motd, "\n"); + p = stpcpy(p, result->cache.line[i].rows); + p = stpcpy(p, "\n"); } } diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -1561,10 +1561,8 @@ add_error(struct MapiResultSet *result, REALLOC(result->errorstr, size + strlen(error) + 2); if (result->errorstr == NULL) result->errorstr = mapi_nomem; - else { - strcpy(result->errorstr + size, error); - strcat(result->errorstr + size, "\n"); - } + else + stpcpy(stpcpy(result->errorstr + size, error), "\n"); } const char * diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -44,7 +44,7 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M # common/options and common/utils) set(GDK_VERSION_MAJOR "29") set(GDK_VERSION_MINOR "0") -set(GDK_VERSION_PATCH "1") +set(GDK_VERSION_PATCH "2") set(GDK_VERSION "${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}") # version of the MAPI library (subdirectory clients/mapilib) @@ -57,7 +57,7 @@ set(MAPI_VERSION "${MAPI_VERSION_MAJOR}. # extras, and tools/utils/msabaoth.[ch]) set(MONETDB5_VERSION_MAJOR "36") set(MONETDB5_VERSION_MINOR "0") -set(MONETDB5_VERSION_PATCH "2") +set(MONETDB5_VERSION_PATCH "3") set(MONETDB5_VERSION "${MONETDB5_VERSION_MAJOR}.${MONETDB5_VERSION_MINOR}.${MONETDB5_VERSION_PATCH}") # version of the MONETDBE library (subdirectory tools/monetdbe) @@ -75,5 +75,5 @@ set(STREAM_VERSION "${STREAM_VERSION_MAJ # version of the SQL library (subdirectory sql) set(SQL_VERSION_MAJOR "15") set(SQL_VERSION_MINOR "0") -set(SQL_VERSION_PATCH "2") +set(SQL_VERSION_PATCH "3") set(SQL_VERSION "${SQL_VERSION_MAJOR}.${SQL_VERSION_MINOR}.${SQL_VERSION_PATCH}") diff --git a/common/stream/memio.c b/common/stream/memio.c --- a/common/stream/memio.c +++ b/common/stream/memio.c @@ -20,9 +20,11 @@ buffer_init(buffer *restrict b, char *re { if (b == NULL || buf == NULL) return; - b->pos = 0; - b->buf = buf; - b->len = size; + *b = (buffer) { + .pos = 0, + .buf = buf, + .len = size, + }; } buffer * diff --git a/common/utils/matomic.h b/common/utils/matomic.h --- a/common/utils/matomic.h +++ b/common/utils/matomic.h @@ -87,7 +87,7 @@ typedef unsigned long ATOMIC_BASE_TYPE; #error "we need a 64 bit atomic type" #endif -#else +#else /* not C++ */ #include <stdatomic.h> diff --git a/common/utils/mstring.h b/common/utils/mstring.h --- a/common/utils/mstring.h +++ b/common/utils/mstring.h @@ -23,8 +23,17 @@ #define GCC_Pragma(pragma) #endif +#if defined(__has_attribute) +#if ! __has_attribute(__access__) +#define __access__(...) +#endif +#else +#define __access__(...) +#endif + /* copy at most (n-1) bytes from src to dst and add a terminating NULL * byte; return length of src (i.e. can be more than what is copied) */ +__attribute__((__access__(write_only, 1, 3))) static inline size_t strcpy_len(char *restrict dst, const char *restrict src, size_t n) { @@ -33,36 +42,15 @@ strcpy_len(char *restrict dst, const cha if ((dst[i] = src[i]) == 0) return i; } - /* for correctness, the decrement isn't needed (just assigning 0 - * to dst[n-1] would be sufficient), but to work around a too - * strict GNU C compiler, we do need it */ - dst[--n] = 0; -/* in some versions of GCC (at least gcc (Ubuntu 7.5.0-3ubuntu1~18.04) - * 7.5.0), the error just can't be turned off when using - * --enable-strict, so we just use the (more) expensive way of getting the - * right answer (rescan the whole string) */ -#if !defined(__GNUC__) || __GNUC__ > 7 || (__GNUC__ == 7 && __GNUC_MINOR__ > 5) -/* This code is correct, but GCC gives a warning in certain - * conditions, so we disable the warning temporarily. - * The warning happens e.g. in - * strcpy_len(buf, "fixed string", sizeof(buf)) - * where buf is larger than the string. In that case we never get here - * since return is executed in the loop above, but the compiler - * complains anyway about reading out-of-bounds. - * For GCC we use _Pragma to disable the warning (and hence error). - * Since other compilers may warn (and hence error out) on - * unrecognized pragmas, we use some preprocessor trickery. */ -GCC_Pragma("GCC diagnostic push") -GCC_Pragma("GCC diagnostic ignored \"-Warray-bounds\"") _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org